@aku11i/phantom v1.0.0
š» Phantom
A powerful CLI tool for seamless parallel development with Git worktrees
ę„ę¬čŖ ⢠Installation ⢠Why Phantom? ⢠Basic Usage ⢠Documentation
⨠What is Phantom?
Phantom is a powerful CLI tool that dramatically boosts your development productivity by making Git worktrees simple and intuitive. Run multiple tasks in isolated environments simultaneously and achieve true multitask development. Built for the next generation of parallel development workflows, including AI-powered coding with multiple agents.
Key Features
- š Simple worktree management - Create and manage Git worktrees with intuitive commands
- š True multitasking - Create separate working directories per branch and run multiple tasks simultaneously
- šÆ Execute commands from anywhere - Run commands in any worktree with
phantom exec <worktree> <command>
- šŖ Built-in tmux integration - Open worktrees in new panes or windows
- š Interactive selection with fzf - Use built-in fzf option for worktree selection
- š® Shell completion - Full autocomplete support for Fish and Zsh
- ā” Zero dependencies - Fast and lightweight
š Installation
Using Homebrew (recommended)
brew install aku11i/tap/phantom
Using npm
npm install -g @aku11i/phantom
š¤ Why Phantom?
Git worktrees are powerful but require manual management of paths and branches. Also, navigating between multiple worktrees is cumbersome. Phantom eliminates these problems:
# Without Phantom
git worktree add -b feature-awesome ../project-feature-awesome origin/main
cd ../project-feature-awesome
# With Phantom
phantom create feature-awesome --shell
How Phantom Works
When you run phantom create feature-awesome
, a new Git worktree named feature-awesome
is created in .git/phantom/worktrees/
.
All worktrees created with phantom are centrally managed in this location.
your-project/ # Git repository
āāā .git/
ā āāā phantom/
ā āāā worktrees/ # Phantom-managed directory
ā āāā feature-awesome/ # branch name = worktree name
ā āāā bugfix-login/ # another worktree
ā āāā hotfix-critical/ # yet another worktree
āāā ...
This convention means you never need to remember worktree paths - just use the branch name for easy worktree operations.
āļø Features for a Comfortable Development Experience
Phantom provides perfect functionality as a command-line tool. Developers feel the trust and comfort of flying first class.
Shell Completion
Phantom supports full shell completion for fish and zsh. Use tab key to complete commands and worktree names.
tmux Integration
When creating worktrees, you can use tmux to open them in new windows or panes. This allows you to manage multiple work environments simultaneously.
# Create and open worktree in new window
phantom create feature-x --tmux
# Create with split panes
phantom create feature-y --tmux-vertical
phantom create feature-z --tmux-horizontal
# Open existing worktrees in tmux
phantom shell feature-x --tmux
phantom shell feature-y --tmux-v
# Result: Multiple worktrees displayed simultaneously, each allowing independent work
Editor Integration
Phantom works seamlessly with editors like VS Code and Cursor. You can specify an editor to open worktrees.
# Open with VS Code
phantom create feature --exec "code ."
# Or open existing worktree
phantom exec feature code .
# Open with Cursor
phantom create feature --exec "cursor ."
phantom exec feature cursor .
fzf Integration
Interactive search with fzf allows quick worktree selection.
# Open shell with fzf selection
phantom shell --fzf
# Delete with fzf selection
phantom delete --fzf
š Basic Usage
Create a new worktree
phantom create feature-awesome
phantom list
Start a new shell in the worktree
phantom shell feature-awesome
# Start development work
# Exit the shell when done
exit
Run commands in any worktree
phantom exec feature-awesome {command to run}
# Example: phantom exec feature-awesome npm run build
Clean up when done
phantom delete feature-awesome
š Documentation
- Getting Started - Common workflows and tips
- Commands Reference - All commands and options
- Configuration - Set up automatic file copying and post-create commands
š¤ Contributing
Contributions are welcome! See our Contributing Guide for:
- Development setup
- Code style guidelines
- Testing requirements
- Pull request process
š License
MIT License - see LICENSE