Closed jpshackelford closed 4 months ago
Hey @jpshackelford, thank you for opening a feature request! This is indeed useful, just implemented it right away using code2prompt
itself! :)
You can update code2prompt
by building the latest commits from source or simply with the following command if you've cargo installed:
cargo install --git https://github.com/mufeedvh/code2prompt
Use relative paths instead of absolute paths:
code2prompt path/to/codebase --relative-paths
Thanks again! 🙌
Amazing. Verified. Thanks again!
@mufeedvh This is an awesome tool!
Feature request:
A
--relative-paths
flag truncates paths to the directory passed as an argument so that parent directories are not included in the file paths of the output.Today if I run
code2prompt projectdir
when files are listed in the prompt payload the paths are displayed as$HOME/code/projectdir/somefile.txt
instead of/projectdir/somefile.txt
. Stripping the parent path saves tokens and keep details of my filesystem and username private.