https://github.com/milisp/treepick
Interactive file tree picker for Claude Code and other AI CLI tools
https://github.com/milisp/treepick
claude-code codex filetree gemini-cli tui
Last synced: 6 months ago
JSON representation
Interactive file tree picker for Claude Code and other AI CLI tools
- Host: GitHub
- URL: https://github.com/milisp/treepick
- Owner: milisp
- License: mit
- Created: 2025-08-10T13:24:22.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-10T13:25:22.000Z (6 months ago)
- Last Synced: 2025-08-10T14:39:46.702Z (6 months ago)
- Topics: claude-code, codex, filetree, gemini-cli, tui
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TreePick 🌲
Interactive file tree picker for AI CLI tools like Claude Code, OpenAI Codex, and Google Gemini CLI.
## Features
- 🌲 **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
## Quick Start
### npm
```bash
# Install dependencies
npm install
# Run the tool
npm start
# Or use directly
node bin/fselect.js
```
### bun
```bash
# Install dependencies
bun i
# Link for global usage
bun link treepick
```
## Usage
### Basic Usage
```bash
# 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
```
### Interactive Controls
| 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 |
## How It Works
1. **File Tree Display** - Shows your project structure in an interactive tree
2. **Multi-Select** - Use spacebar to select files and folders you want to work with
3. **AI Integration** - Automatically starts your chosen AI tool (Claude, Codex, etc.)
4. **File Context** - Selected files are automatically added using the tool's syntax (e.g., `@file.js`)
5. **Interactive Session** - You can then chat with the AI about your selected files
## Example Workflow
```bash
$ 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"
```
## Configuration
The tool automatically ignores common directories:
- `node_modules`
- `.git`
- `.next`
- `target`
- `dist`
- `build`
- `.venv`
- `__pycache__`
## Supported AI Tools
- **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
## Requirements
- Node.js 16+
- The AI tool you want to use must be installed and accessible in PATH
- For Claude Code: Follow [installation guide](https://docs.anthropic.com/claude-code)
- For OpenAI Codex: `npm install -g @openai/codex`
- For Google Gemini: Install Google AI CLI
## Installation
```bash
# Install globally from npm
npm install -g treepick
# Or for development
cd /path/to/treepick
npm install
npm link
```
## Development
```bash
# Run in development mode
npm run dev
# Test with dry run
npm start -- --dry-run
```
## License
MIT License - feel free to use and modify!
## Contributing
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** 🚀