Interactive file tree picker for AI CLI tools like Claude Code, OpenAI Codex, and Google Gemini CLI.
- 🌲 Interactive File Tree - Beautiful terminal-based file picker
- ✅ Multi-select - Choose multiple files and folders easily
- 🚀 AI Integration - Automatically passes selected files to AI tools
- 🎯 Smart Filtering - Ignores common non-essential directories
- ⚡ Fast & Lightweight - Built with Node.js and blessed
# Install dependencies
npm install
# Run the tool
npm start
# Or use directly
node bin/fselect.js# Install dependencies
bun i
# Link for global usage
bun link treepick# Start with default settings (scans current directory for Claude)
treepick
# Specify a different directory
treepick -d /path/to/your/project
# Use with different AI tools
treepick -t codex # OpenAI Codex
treepick -t gemini # Google Gemini CLI
# Dry run (see selected files without executing)
treepick --dry-run| Key | Action |
|---|---|
↑/↓ |
Navigate through files |
Space |
Select/deselect file or folder |
Enter |
Confirm selection and start AI tool |
Ctrl+A |
Select all files |
Ctrl+D |
Clear all selections |
Esc or Q |
Cancel and exit |
- File Tree Display - Shows your project structure in an interactive tree
- Multi-Select - Use spacebar to select files and folders you want to work with
- AI Integration - Automatically starts your chosen AI tool (Claude, Codex, etc.)
- File Context - Selected files are automatically added using the tool's syntax (e.g.,
@file.js) - Interactive Session - You can then chat with the AI about your selected files
$ treepick
# Interactive file tree appears
# Select src/components/Header.jsx
# Select src/utils/api.js
# Select README.md
# Press Enter
🚀 Starting claude...
📎 Adding 3 files to claude...
✅ Files added successfully!
# Claude starts with: @src/components/Header.jsx @src/utils/api.js @README.md
# You can now type: "Please review these files for potential bugs"The tool automatically ignores common directories:
node_modules.git.nexttargetdistbuild.venv__pycache__
- Claude Code (
claude) - Anthropic's terminal coding assistant - OpenAI Codex (
codex) - OpenAI's CLI coding tool - Google Gemini (
gemini) - Google's CLI tool - Easily extensible for other tools
- Node.js 16+
- The AI tool you want to use must be installed and accessible in PATH
- For Claude Code: Follow installation guide
- For OpenAI Codex:
npm install -g @openai/codex - For Google Gemini: Install Google AI CLI
# Install globally from npm
npm install -g treepick
# Or for development
cd /path/to/treepick
npm install
npm link# Run in development mode
npm run dev
# Test with dry run
npm start -- --dry-runMIT License - feel free to use and modify!
This is an MVP - contributions welcome! Areas for improvement:
- Better error handling
- Configuration file support
- More AI tool integrations
- Performance optimizations
- Tests
Made for developers who want to work smarter with AI tools 🚀