A lightweight session manager for efficiently managing Claude CLI across multiple projects
claunch is a development support tool that separates Claude sessions by project with optional tmux support for persistent interaction.
- π§ Claude session management per project (automatic resume)
- β‘ Lightweight direct execution by default
- π§° Optional tmux support for persistent sessions
- π» Supports macOS / Debian-based Linux
- π Automatically includes
--dangerously-skip-permissionsflag - π Easy session ID storage and reuse
bash <(curl -s https://raw.githubusercontent.com/0xkaz/claunch/main/install.sh)Or with wget:
bash <(wget -qO- https://raw.githubusercontent.com/0xkaz/claunch/main/install.sh)Note: This will install
claunchto$HOME/bin/claunch. Make sure$HOME/binis in your PATH.
claunch automatically runs Claude CLI with the --dangerously-skip-permissions flag. This means:
- Claude will have full access to your file system without asking for permissions
- All file read/write operations will be executed immediately without confirmation
- Use with caution and only in trusted project directories
- Not recommended for production environments or sensitive data
This flag is included for development convenience, allowing Claude to work efficiently without permission prompts. However, be aware of the security implications when using this tool.
Navigate to your project directory and run:
claunch # Start direct Claude session (default)
claunch --tmux # Start with tmux for persistent sessionsOn first run, it will:
- Install tmux automatically if not present (tmux mode only)
- Start a new Claude session
- Display the session ID to save
- Direct mode (default): Lightweight, no tmux dependency, direct Claude interaction
- tmux mode (
--tmux): Persistent sessions, background execution, scroll history
When Claude starts, you'll see a session ID like sess-xxxxxxxx. Save it:
echo "sess-xxxxxxxx" > ~/.claude_session_PROJECT_NAMEJust run claunch (or claunch --tmux) again in the same project directory. It will automatically:
- Detect the saved session ID
- Resume your previous Claude conversation
- Maintain all context from before
claunch list # List all active sessions
claunch clean # Clean up orphaned session files
claunch --help # Show help and optionsclaunch automatically detects and installs tmux if not present when using --tmux option:
- macOS: Uses Homebrew (
brew install tmux) - Debian/Ubuntu: Uses apt (
sudo apt install tmux) - Other systems: Provides manual installation instructions
Each project gets its own:
- Session ID file at
~/.claude_session_PROJECT_NAME - Isolated Claude conversation context
- Optional tmux session named
claude-PROJECT_NAME(with--tmux)
With claunch --tmux:
- Sessions survive terminal closures
- Reconnect anytime with
claunch --tmux - Multiple projects can run simultaneously in background
When running Claude through claunch --tmux, you're in a tmux session. Here are essential commands:
- Detach from session: Press
Ctrl+BthenD- This leaves Claude running in the background
- Return to your normal terminal
- Scroll up/down: Press
Ctrl+Bthen[to enter copy mode- Use arrow keys or Page Up/Down to scroll
- Press
qto exit copy mode
- Copy text: In copy mode (
Ctrl+Bthen[):- Move cursor to start position
- Press
Spaceto start selection - Move to end position
- Press
Enterto copy
- Paste text: Press
Ctrl+Bthen] - Kill session: Press
Ctrl+Bthen&(use with caution)
Tip: You can also manually attach to sessions with
tmux attach -t claude-PROJECT_NAME
- Claude CLI (
claudecommand) - tmux (auto-installed if missing)
- macOS or Debian-based Linux
- curl or wget for installation
- Project isolation: Keep Claude conversations separate by project
- Session persistence: Never lose your context when closing terminal
- Automatic setup: No manual tmux configuration needed
- Multi-tasking: Work on multiple projects simultaneously
Simply cd to a different project directory and run claunch. Each project maintains its own session.
Session IDs are stored in your home directory as .claude_session_PROJECT_NAME files.
Yes! Sessions are named claude-PROJECT_NAME, so you can:
tmux attach -t claude-myprojectThe script should auto-install tmux. If it fails:
- macOS: Install Homebrew first from https://brew.sh
- Linux: Ensure you have sudo permissions
- Other: Install tmux manually from https://github.com/tmux/tmux
- Make sure you saved the session ID correctly
- Check the file exists:
ls ~/.claude_session_* - Verify the session ID format:
sess-xxxxxxxx
If Claude can't resume your session:
- The session may have expired
- Start a new session and save the new ID
- Check Claude's documentation for session limits
MIT License - feel free to use and modify!
Pull requests welcome! Please:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a pull request
Made with β€οΈ for the Claude community
