Skip to content

Jump in-n-out of Claude Code sessions via tmux

Notifications You must be signed in to change notification settings

curusarn/crabctl

Repository files navigation

crabctl

crabctl-v1-logo-256

Manage Claude Code sessions in tmux.

crabctl screenshot

Install

brew tap curusarn/tap
brew install crabctl

# install skill
crabctl skill 

# run crabctl
crabctl

Quickstart

  • Ask your Claude it to delegate a task to a /crab
  • Use crabctl to manage running crab sessions (tmuxed Claude instances)
    • Double Enter to open a session
    • Ctrl+B then D to detach in tmux and return to crabctl
    • Enter + type + Enter to send a one-off message to an agent
    • Ctrl+K to kill a session
  • crabctl new my-session-name --dir somewhere to launch a new crab manually
    • ⚠️ Bypasses permissions by default

Tips

Recommended tmux config

Add this to ~/.tmux.conf:

set -g mouse on

# Prevent scrolling from initiating copy mode in tmux.
unbind -T root WheelUpPane
bind -T root WheelUpPane if -F '#{pane_in_mode}' 'send -X scroll-up' ''
unbind -T root WheelDownPane
bind -T root WheelDownPane if -F '#{pane_in_mode}' 'send -X scroll-down' ''

Then reload the config in any running tmux sessions:

tmux source-file ~/.tmux.conf

Development

Build from source

git clone git@github.com:curusarn/crabctl.git
cd crabctl && make install

# run crabctl
bin/crabctl

Add crabctl/bin to your ~/.zshrc:

echo "export PATH=\"$PWD/bin:\$PATH\"" >> ~/.zshrc

Then restart your shell or run source ~/.zshrc.

About

Jump in-n-out of Claude Code sessions via tmux

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors