agentbar

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT

README

agentbar

Plugs Claude into tmux so you know when you're needed, without getting in your way.

agentbar watches every Claude Code session you run in tmux. One indicator in your status line tells you when a session needs you. One key opens a picker in the middle of the screen with every session, what it is doing, and its subagents. Enter takes you there.

The indicator has three states:

Install

go install github.com/ssnxd/agentbar/cmd/agentbar@latest
agentbar install

Add to tmux.conf and reload:

run-shell "$HOME/.local/bin/agentbar tmux-init"

Needs tmux 3.2+ and Claude Code 2.1.26x+.

Use

Put the indicator in your status line:

set -g status-right '#{E:@agentbar_pill}#{session_name} '
  • prefix a, or a click on the indicator, opens the picker on the oldest request. Type to search; words match in any order.
  • In the picker: arrows or ctrl-n/ctrl-p move, enter jumps, tab goes to the next session that needs you, ctrl-y accepts a permission prompt, ctrl-x kills, esc clears the search, then closes.
  • prefix A opens the same list as a sidebar instead. There: j/k move, 1-9 jump, y accept, x kill, / filter, q close.

After upgrading, run agentbar install again to add any new hooks.

Options for tmux.conf, set before the tmux-init line:

  • @agentbar-key (popup, default a), @agentbar-focus-key (default A), @agentbar-sidebar-key (toggle sidebars, default none).
  • @agentbar-cap-left, @agentbar-cap-right: the glyphs that end the indicator, to match the pills of your own status line. Without them it is a plain block.
  • @agentbar-accent: the colour of the list's title and here bar, as #rrggbb or a format that gives one, such as #{@accent}.
  • @agentbar-side (left/right), @agentbar-width.
  • @agentbar-bell: on rings the bell in a session's pane when it needs you, so tmux flags the window.

A click opens the popup only while MouseDown1Status has tmux's own binding; a binding you wrote is left alone.

To style the numbers yourself, @agentbar_status reads like 5 · 2 need you and @agentbar_hot is the bare count for conditionals such as #{?#{@agentbar_hot},#[fg=orange],}.

Something off? agentbar doctor.

Directories

Path Synopsis
cmd
agentbar command
agentbar — a tmux sidebar for running Claude Code sessions.
agentbar — a tmux sidebar for running Claude Code sessions.
internal
cli
Package cli implements agentbar's subcommands.
Package cli implements agentbar's subcommands.
daemon
Package daemon builds the sidebar snapshot once, centrally, and streams it to every viewer over a Unix socket.
Package daemon builds the sidebar snapshot once, centrally, and streams it to every viewer over a Unix socket.
hooks
Package hooks understands Claude Code hook payloads, maps them to sidebar statuses, and installs agentbar's hook entries into settings.json.
Package hooks understands Claude Code hook payloads, maps them to sidebar statuses, and installs agentbar's hook entries into settings.json.
paths
Package paths centralises every filesystem location agentbar reads or writes.
Package paths centralises every filesystem location agentbar reads or writes.
registry
Package registry reads Claude Code's own session registry: ~/.claude/sessions/<pid>.json, one file per running claude process.
Package registry reads Claude Code's own session registry: ~/.claude/sessions/<pid>.json, one file per running claude process.
session
Package session merges Claude's registry, agentbar's hook state, and the transcript tail into the rows the sidebar shows.
Package session merges Claude's registry, agentbar's hook state, and the transcript tail into the rows the sidebar shows.
state
Package state stores one small JSON record per Claude session, written by the hook receiver and read by the sidebar.
Package state stores one small JSON record per Claude session, written by the hook receiver and read by the sidebar.
tmuxctl
Package tmuxctl drives the user's tmux server: finding the tagged sidebar pane, opening and moving it, jumping to session panes, and sending the accept keystroke.
Package tmuxctl drives the user's tmux server: finding the tagged sidebar pane, opening and moving it, jumping to session panes, and sending the accept keystroke.
transcript
Package transcript reads the tail of a Claude Code transcript (.jsonl) for display metadata: title, first prompt, model, branch, context size, and whether a turn is open.
Package transcript reads the tail of a Claude Code transcript (.jsonl) for display metadata: title, first prompt, model, branch, context size, and whether a turn is open.
ui
Package ui is the sidebar viewer: a Bubble Tea app fed by the daemon's snapshots, offering jump, accept, kill, and filter.
Package ui is the sidebar viewer: a Bubble Tea app fed by the daemon's snapshots, offering jump, accept, kill, and filter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL