A CLI tool that creates and manages preconfigured tmux coding environments.
The following dependencies must be installed before using cde:
| Dependency | Required for | Link |
|---|---|---|
| Go | Building/installing cde |
https://go.dev/dl/ |
| tmux | All modes | https://github.com/tmux/tmux/wiki/Installing |
| Neovim | ide mode |
https://neovim.io/ |
| Claude Code | wtree, mrepo modes |
https://docs.anthropic.com/en/docs/claude-code |
| lazygit | wtree, mrepo modes |
https://github.com/jesseduffield/lazygit#installation |
go install github.com/JohnVicenteAA/cde@latestCreate a new tmux coding environment.
cde create [name] [flags]If no name is given, the current directory name is used.
| Flag | Short | Default | Description |
|---|---|---|---|
--mode |
-m |
ide |
Session mode (ide, wtree, mrepo) |
--num |
-n |
2 |
Number of columns in wtree mode |
--label |
-l |
Session label for mrepo mode (non-interactive) | |
--repo |
-r |
Repo to include in mrepo mode (repeatable, non-interactive) |
Attach to an existing cde tmux session.
cde attach --name <session_name>List and manage cde sessions.
cde session --list # list all cde sessions
cde session delete --name <n> # delete a specific session
cde session delete --all # delete all cde sessionsDefault mode. Opens a tmux session with nvim and two shell panes.
+----------+----------+
| | |
| nvim | shell |
| +----------+
| | shell |
+----------+----------+
cde create # uses current dir name
cde create myproject # named session: myproject_ideOpens a tmux session with N paired columns, each containing a Claude Code worktree on top and a lazygit instance watching that same worktree on the bottom. Requires a git repository.
+--------------------+--------------------+
| claude --worktree | claude --worktree |
| <name>-0 | <name>-1 |
| (60%) | (60%) |
+--------------------+--------------------+
| lazygit -p | lazygit -p |
| .claude/worktrees/| .claude/worktrees/|
| <name>-0 (40%) | <name>-1 (40%) |
+--------------------+--------------------+
cde create -m wtree # 2 columns (default)
cde create -m wtree -n 3 # 3 columnsMulti-repo mode. Run from a parent directory that contains multiple git repos. Creates a tmux session with a single Claude Code instance on top (with --add-dir for each repo) and one lazygit worktree pane per repo on the bottom. Must be run from outside a git repo.
+-------------------------------------------+
| claude --add-dir repo1 --add-dir repo2 |
| (60%) |
+--------------------+----------------------+
| lazygit -p | lazygit -p |
| repo1/.claude/ | repo2/.claude/ |
| worktrees/ | worktrees/ |
| label-repo1 | label-repo2 |
| (40%) | (40%) |
+--------------------+----------------------+
cde create -m mrepo # interactive: prompts for repo selection and label
cde create -m mrepo -l bugfix -r repo-a -r repo-b # non-interactive: specify label and repos directlySessions are named {name}_{mode}, with dots replaced by underscores. This allows running multiple modes side by side:
cde create -m ide # session: dirname_ide
cde create -m wtree # session: dirname_wtree
cde create -m mrepo # session: mrepo_label_repo1_repo2If a session already exists, you'll be prompted to reattach or replace it.
The following .tmux.conf is optional but recommended for a better experience with cde:
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g mouse on
set -g set-titles on
set -g set-titles-string "#{window_name}"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'