code2prompt icon indicating copy to clipboard operation
code2prompt copied to clipboard

feature: TUI file selector on `--tui` option

Open mufeedvh opened this issue 9 months ago • 1 comments

Create a TUI file selector for easier inclusion/exclusion of files and directories. Use ratatui, great library for TUI creation.

mufeedvh avatar Mar 20 '25 13:03 mufeedvh

@mufeedvh awesome, I was looking for a library like this !

I already separated the logic into session to prepare a stateful way to add/remove files.

ODAncona avatar Mar 20 '25 17:03 ODAncona

How do you run the TUI?

I tried to run the command in the readme, but I got an error (see below).

antonio@president ~> code2prompt --tui
error: unexpected argument '--tui' found

  tip: to pass '--tui' as a value, use '-- --tui'

Usage: code2prompt [OPTIONS] <PATH>

For more information, try '--help'.
antonio@president ~> code2prompt -- --tui
▹▹▹▹▸ Failed!                                                                                                                                                                                                                               [2025-12-02T16:28:02Z ERROR code2prompt] Failed to build directory tree: Failed to traverse directory

antonio@president ~/W/C3P1-frontend (calibration_mono_images) [1]> code2prompt --version
code2prompt 3.0.2

MysterHawk avatar Dec 02 '25 16:12 MysterHawk

@MysterHawk

Hey hello,

Documentation will come soon !

For now, update your code2prompt to v4.1.1 and then do code2prompt . --tui you forgot to specify path.

Have a great day

ODAncona avatar Dec 03 '25 09:12 ODAncona