Skip to content

seyallius/treeclip.v2

Repository files navigation

TreeClip 🌳✨

A delightfully fast CLI tool that bundles your code into a single, AI-friendly format

Author’s Note: This README was drafted with AI assistance.
I’m usually too lazy to write proper docs, but I actually reviewed this one, so it shouldn’t be too cursed...
Besides, it writes better than me ( ¬ ࡇ,¬ )
Though the code is written by me! no AI in that!


What's This All About? (◕‿◕✿)

Ever tried explaining your entire codebase to an AI assistant, only to spend 20 minutes copy-pasting files? Yeah, me too. That's why TreeClip exists!

TreeClip traverses your project directory, gathers all your code files, and bundles them into one neat package with proper headers showing where each piece came from. It's like creating a "highlight reel" of your project that AI models can actually digest in one go.

Think of it as: Your project, but as a single, well-organized document that preserves all the context.


Documentation 📚

For comprehensive documentation, please visit our GitBook documentation.

Installation 🚀

From Crates.io (Recommended)

You can install treeclip directly from crates.io using Cargo:

Crates.io

cargo install treeclip

This will install the binary on your system, making it available from anywhere!

From Source

If you'd rather build it yourself from the source code:

git clone https://github.com/seyallius/treeclip.v2.git
cd treeclip.v2
cargo build --release

The binary will be located at target/release/treeclip. You can also run cargo install --path . to install it locally from the repository folder.

# Bundle the current directory and copy it to the clipboard
treeclip run --clipboard

Curl

You can install TreeClip with a single command:

Unix-like systems (Linux/macOS)

curl -fsSL https://raw.githubusercontent.com/seyallius/treeclip.v2/main/install.sh | bash

# Or with custom options
curl -fsSL https://raw.githubusercontent.com/seyallius/treeclip.v2/main/install.sh | bash -s -- --prefix ~/.local/bin

Windows (PowerShell)

iwr -useb https://raw.githubusercontent.com/seyallius/treeclip.v2/main/install.ps1 | iex

Manual Installation from GitHub Releases

Visit the GitHub Releases page and download the appropriate binary for your system:

Platform File Instructions
Linux (x86_64) treeclip-linux-x86_64.tar.gz tar xzf treeclip-linux-x86_64.tar.gz && mv treeclip /usr/local/bin/
Linux (ARM64) treeclip-linux-aarch64.tar.gz tar xzf treeclip-linux-aarch64.tar.gz && mv treeclip /usr/local/bin/
macOS (Intel) treeclip-macos-x86_64.tar.gz tar xzf treeclip-macos-x86_64.tar.gz && mv treeclip /usr/local/bin/
macOS (Apple Silicon) treeclip-macos-aarch64.tar.gz tar xzf treeclip-macos-aarch64.tar.gz && mv treeclip /usr/local/bin/
Windows treeclip-windows-x86_64.exe.zip Unzip and move treeclip.exe to your PATH

Package Managers (Future)

We're working on adding TreeClip to popular package managers:

# Coming soon!
# brew install treeclip           # macOS
# apt install treeclip            # Ubuntu/Debian
# yum install treeclip            # RHEL/Fedora
# choco install treeclip          # Windows (Chocolatey)

Now you can paste the entire project structure into your favorite AI chat! Easy peasy. (づ。◕‿‿◕。)づ

For comprehensive documentation, including detailed usage patterns, troubleshooting, and advanced features, please visit our GitBook documentation.

TODO (Future Plans) 🚧

  • Configuration file support (.treecliprc)
  • Interactive mode for selecting files
  • Multiple output format support (JSON, Markdown, HTML)
  • Token counting for AI models
  • Smart exclusion patterns (auto-detect .gitignore)
  • Streaming for huge projects
  • Plugin system for custom processors
  • Multiple inputs
  • Commands and Options completion
  • Add don't overwrite output file option
  • Add tree option showing and writing a tree structure of traversed file(s)
  • Optimize performance (use concurrency and parallelism)
  • Add init option for basic init (.treeclipignore with basic init like .gitignore)
  • Add link to existing ignore file ↑ (done in different way - reads already present ignore files)
  • Make it not depndant to cargo and on new release, also release pre-built binaries for multiple OSes

But honestly? I built this to learn Rust and solve my immediate problem. If you find it useful, awesome! If you want to contribute, even better! ♡


Contributing

Found a bug? Have an idea? Want to make it cuter?

  1. Fork the repo
  2. Make your changes
  3. Submit a PR with a description

I'm still learning Rust, so if you spot any anti-patterns or improvements, I'm all ears! (ノ◕ヮ◕)ノ*:・゚✧


License

MIT License - feel free to use this however you want!


Credits

Built with:

  • Rust 🦀
  • Intention of becoming a rustacean
  • A genuine desire to stop copy-pasting code files

Made with ♡ by someone tired of copy-pasting code files!

About

A simple CLI Tool to facilitate your AI copy pasting ٩(ˊᗜˋ*)و ♡ (V2 - Rust)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors