An interactive file selector for Repomix with vim-like navigation and Ranger integration.
cherrypiq is a terminal-based UI tool that lets you:
- Navigate through your codebase with vim-style keybindings
- Select specific files/directories to include in your Repomix output
- Automatically respect .gitignore patterns
- Integrate with Ranger file manager (if installed)
This makes it much easier to create AI-friendly, focused code snapshots by allowing you to cherry-pick exactly which files to include.
# Quick install with curl
curl -o- https://raw.githubusercontent.com/ya1sec/cherrypiq/main/install.sh | bash
# Or clone and install manually
git clone https://github.com/ya1sec/cherrypiq.git
cd cherrypiq
npm install
npm linkTo uninstall cherrypiq, you can use the provided uninstall script:
# Quick uninstall with curl
curl -o- https://raw.githubusercontent.com/ya1sec/cherrypiq/main/uninstall-cherrypiq.sh | bash
# Or if you have the repository cloned
cd cherrypiq
./uninstall-cherrypiq.shThe uninstall script will:
- Remove the global npm link for cherrypiq
- Remove the ranger integration (if installed)
- Delete the ~/.cherrypiq directory
- Optionally uninstall global packages (repomix and blessed) that were installed by cherrypiq
- Clean up any temporary files
You can also uninstall manually by:
# Remove npm global link
npm unlink -g cherrypiq
# Delete cherrypiq directory
rm -rf ~/.cherrypiq
# Remove ranger integration (if it exists)
sudo rm -f /usr/local/bin/ranger-repomix
# Optionally uninstall global packages
npm uninstall -g repomix blessedIf you see an error like /opt/homebrew/bin/cherrypiq: line 1: 404:: command not found when running cherrypiq, it means the installation script failed to download the script properly. To fix this:
-
Run the uninstall script first to clean up the broken installation:
./uninstall-cherrypiq.sh
-
Then reinstall using the local files:
./fix-cherrypiq.sh
This fix script will:
- Remove the broken installation
- Install cherrypiq using the local files in the repository
- Set up the proper symlinks and permissions
If you see an error like Error: Cannot find module 'blessed' when running cherrypiq, it means the dependencies weren't installed correctly. To fix this:
-
Run the fix script which will properly install all dependencies:
./fix-cherrypiq.sh
-
Or manually install the missing dependencies:
cd ~/.cherrypiq npm install
- Permission denied: If you see permission errors, try running the installation with sudo.
- Node.js not found: Make sure Node.js and npm are installed on your system.
- Ranger integration not working: Ensure Ranger is installed and the integration script is properly linked.
# Navigate to your project directory
cd /path/to/your/project
# Launch the interactive selector
cherrypiq| Key | Action |
|---|---|
| j / down | Move down |
| k / up | Move up |
| g | Go to top |
| G | Go to bottom |
| space | Toggle selection of file/directory |
| enter | Open directory |
| h / left | Go up one directory |
| r | Run repomix with selected files |
| R | Launch ranger (if installed) |
| q / Ctrl+c | Quit |
If you have Ranger installed, you can also use it for file selection:
# Launch ranger with repomix integration
ranger-repomixInside Ranger:
- Use
spaceto mark/unmark files - Press
,rto run repomix with selected files - Press
,hfor help - Press
,cto clear selection
- Vim-like Navigation: Familiar keybindings for efficient movement
- .gitignore Aware: Automatically grays out and excludes files in .gitignore
- Interactive UI: Visual feedback on selected files
- Ranger Integration: Leverage Ranger's powerful file management features
- Directory Selection: Select entire directories at once
- Node.js 14+ and npm
- Repomix (
npm install -g repomix) - Optional: Ranger file manager
cherrypiq reads your .gitignore file to determine which files should be excluded. It then provides an interface for you to navigate your codebase and select specific files/directories to include in the Repomix output.
When you select files and run repomix, it uses the --include flag to specify exactly which files to process, allowing for more focused and relevant AI analysis.
MIT
