1.0.0 • Published 4 months ago

@aku11i/phantom v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

šŸ‘» Phantom

A powerful CLI tool for seamless parallel development with Git worktrees

npm version License: MIT Node.js Version Ask DeepWiki

ę—„ęœ¬čŖž • 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

šŸ¤ Contributing

Contributions are welcome! See our Contributing Guide for:

  • Development setup
  • Code style guidelines
  • Testing requirements
  • Pull request process

šŸ“„ License

MIT License - see LICENSE

šŸ™ Acknowledgments

Built with šŸ‘» by @aku11i and Claude

1.0.0

4 months ago

0.9.0

4 months ago

0.8.1

4 months ago

0.8.0

4 months ago

0.7.0

4 months ago

0.6.0

4 months ago

0.5.0

4 months ago

0.4.0

4 months ago

0.3.0

4 months ago

0.2.0

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.1.0

4 months ago