Skip to content

Repository files navigation

clave 🥁 - Command Line Agent View Engine

Coordinate your many agents with ease from a terminal sidebar - giving you glanceable information and quick navigation - where you are right at home already.

Stop dealing with everyone creating yet another Electron app to manage agents and just do it from your favourite place. We've come to love vertical tabs in a browser, and chatbot interfaces, now it's in your terminal - where you can see what state each agent is in and visually distinguish between them. And you can still have terminals interleaved between your agents.

Every agent is a four-line card, and the sidebar has an expanded and a collapsed view:

expanded collapsed
The expanded clave sidebar: six four-line cards. Each card shows a coloured status mark, a rename chip and a description on its first line, then a branch or worktree mark, the repo, the branch, a PR number, a provider icon, the model and its effort level, then a mark for agents still running under it, a token count, time since you last touched it, and what a waiting agent is blocked on, then a hairline that closes the card. The same six cards collapsed to a narrow strip: the description and the branch drop, the chip, the repo, the token count and the clock stay put.

Want it denser? Two shorter row heights fold the card back to two lines, or to the classic dense list. It takes effect at your next launch.

What the colours and glyphs mean

status waiting on you · working · finished while you were away · idle · last turn failed · its directory is gone · dormant, half-faded; opens where it left off · opening · a terminal tab (colours mean the same)
battery105k context spent, in tokens, coloured by how much of your smart zone is gone
TERM, a terminal tab
blank, nothing measured yet
markblank, the repo's ordinary checkout · on a branch · in its own git worktree
chipthe name you gave the session with /rename; blank until you do
on a terminal row, the tab's name
repo one colour per repo, wherever it appears
textClaude's own description of the session, not your prompt
on a terminal row, the last command it ran
branchthe branch this checkout is on, beside the repo; expanded view only
blank, an ordinary checkout
PR#232, the pull request this branch is driving, looked up in the background
blank, there isn't one
agent who is running the conversation, in their own colour, and the model beside it (fable, sonnet). Codex isn't supported yet: the icon is ready, the launch profile is on its way
efforthow hard the agent is thinking, as set with /effort: lo md hi xh mx au
blank, nothing read yet
clockwhile the agent is working, how long this turn has been running, lit blue: seconds under a minute (42s), then minutes and seconds through 9m59s (1m 7s), then minutes from ten (10m)
once it stops, the same number dimmed and coarser: how long since you last spoke to it (4m, 3h, 2w)
subagents something is still running under this agent
blank, nothing is
askwhat a waiting agent is blocked on, in the colour of its dot: Bash (cargo publish), the tool it wants permission for
blank, it isn't waiting on you

Seeing used context per agent is powerful, so the token count sits on every card in both views, coloured by how close that conversation is to the end of its useful thinking. You can set where you believe the smart zone of your model ends, which is where the count turns red:

export CLAVE_AGENT_SMART_ZONE_TOKENS=150000   # the default

Pairs well with rot-reducer, a plugin that informs Claude itself when its context is running low.

Try it

You need zellij (0.44.3 is what's tested), claude, git, plus fzf and zoxide for the directory picker (your fleet ranks it, zoxide fills in the rest), and a Nerd Font in your terminal, version 3.5 or newer so the provider icons have glyphs. macOS and Linux.

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/olliegilbey/clave/releases/latest/download/clave-installer.sh | sh

clave   # from a terminal OUTSIDE zellij; clave makes its own session

First launch sets the machine up: Zellij config and keybinds, clave's status hooks in ~/.claude/settings.json (additive, your own hooks are left alone), a wrap around your Claude status line command so the battery reads live (your command still runs, unchanged; with none of your own, the wrap prints nothing), and the plugin permission cache. That's what lets an agent report its own state. clave doctor explains anything that didn't land.

Then Alt+a, pick a directory, choose new. That's your first agent.

Upgrading? Re-run the installer, quit every running clave session, start fresh.

Building from source

Rust (stable) and just, then:

git clone https://github.com/olliegilbey/clave && cd clave
git checkout v0.5.1        # `just release` refuses a dirty or untagged tree
just setup-toolchain       # adds the wasm32-wasip1 target, once
just release               # builds, then installs the launcher and versioned artifacts

# Put the launcher on your PATH in your SHELL CONFIG, not just this shell.
echo 'export PATH="$HOME/.local/share/clave/bin:$PATH"' >> ~/.zshrc    # zsh
echo 'export PATH="$HOME/.local/share/clave/bin:$PATH"' >> ~/.bashrc   # bash
exec $SHELL

The keys

Alt+a add an agent: pick a directory, then new or resume
Alt+↑ Alt+↓ (or Alt+k Alt+j) walk the running agents
Alt+1Alt+9 jump straight to a row, running or closed
Alt+Enter wake the selected closed row
Alt+o back to where you were
Alt+c toggle collapsed or expanded view of the sidebar
Alt+t Alt+w new terminal tab, close tab
Alt+f toggle a floating shell over the current tab, great for your terminal based editor at the same time

Everything clave binds lives on Alt. Five stock Zellij Ctrl bindings that Claude Code needs (Ctrl+g/t/o/b/q) are unbound for you; the rest of Zellij's keys still belong to Zellij.

How it works

  • Each tab is a terminal. As usual. But with extra info shown in the tab text.
  • If the terminal is an agent TUI (like Claude Code), the sidebar is populated with rich information about the agent state.
  • Sidebar state comes from either Claude Code hooks, or from your .claude jsonl store that Claude Code already keeps.
  • Your agents survive restarts. Relaunch and every agent tab you had open comes back, in the order you had them. The top one picks up straight away, the rest pick up when you arrive at them. Plain terminal tabs do not come back. Tabs you had CLOSED stay closed as dormant rows: open one with Alt+Enter and it resumes where it left off.
  • Running tabs sit above closed ones, so the agents and terminals you're using are quick to cycle through (with Alt+↑ Alt+↓).
  • The tab list orders itself by attention. A modified "frecency" algorithm is used to keep the tabs you're most likely to reuse at the top.

Contributing

Want to work on it? Start with CONTRIBUTING. Something broke? Open an issue.

Why "clave"?

The clave is the foundational rhythm an entire ensemble locks to, the part everything else syncs around. It's also Spanish for key / keystone (it's keyboard-driven), and the archaic past tense of cleave, to split, as in splitting the screen into panes.

License

MIT © Oliver Gilbey

About

The tool for Conducting Lots of Agents, Very Effectively. A terminal sidebar for your Claude Code fleet, in Zellij.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages