Monitor progress of and switch between lemons (go on... say 'LLMs' three times fast) running in the terminal.
The inbox can live in a pane that follows you across every window and session switch, so it is ambient rather than something you summon:
lemonaid tmux scratch --follow # left or top, from config
lemonaid tmux scratch --flip # move it to the other edgeOn the left, above, each session is a card: name, then time, cwd and branch,
then the message wrapped over as many lines as the pane can spare. With
brief_status on, a card also shows its lemon's brief:
a red headline and what it needs from you when alert, yellow when blocked,
green when merge, purple when approve, brown when review, blue when done,
teal while running, dimmed while waiting.
Across the top, it has room for columns instead, one row per session, with
alert rows red, blocked rows amber, merge rows green, approve rows purple,
review rows brown, done rows blue, and running rows teal:
The inbox's title turns teal while it has keyboard focus, and in the top strip
the column header turns the unread marker's colour while something is waiting
for you. prefix+l toggles focus between the inbox and your work; q parks it
until you want it back.
To see it with invented sessions before wiring up your own:
uv run scripts/demo-inbox.py # a throwaway tmux server, own inbox
uv run scripts/demo-inbox.py --killThe screenshots here come from that demo:
uv run scripts/demo-inbox.py --no-attach (add --top for the strip), then
uv run scripts/demo-screenshot.py docs/images/inbox-left.png.
Full setup, keybindings, and behaviour: docs/tmux.md.
Lemonaid has two parts: hooks that fire when your lemons need attention, and a TUI (lma) that shows what's going on and lets you jump to sessions.
- You add hooks to Claude Code, Codex CLI, and/or OpenCode (see Integrations below)
- When a session stops or needs input, the hook writes a notification to a local SQLite database
- The
lmaTUI displays active notifications, watches transcripts for live activity, and auto-archives sessions when they end - When you select an active session, you are taken directly to that pane/tab in
tmux, WezTerm or cmux - Over time, archived sessions accumulate into a searchable session history β press
hto browse past sessions across all projects and resume them
The TUI doesn't need to be running for notifications to arrive (hooks write directly to the DB), but it does need to run for live activity updates and automatic archiving.
-
Jump from a link:
lemonaid go <Lemon-ID | channel>switches to a lemon's tmux pane, and--linkprints a clickable link. macOS URL-handler setup is documented. -
PR numbers in the inbox: A session with one PR shows its number beside its name, from its brief or an optional per-root branch lookup hook. When a URL is available, modifier-click opens the PR.
-
Notification inbox: Track which Claude Code, Codex CLI, OpenClaw, and OpenCode sessions need your attention, and what they're doing as they do it
-
Project names within a root: An optional per-root hook maps working directories to project labels in the inbox
-
Quiet reviewer sessions: Reviewer lemons stay out of the default inbox until you switch to them, select or pin them, or their brief enters a specially ranked status
-
Terminal integration: Hit enter to jump directly to the waiting session's pane (supports
tmux, WezTerm and cmux). If the session has since died, it is resumed in a new pane in the same directory rather than the jump failing -
Session history & resume: Browse archived sessions across all projects, filter by name/cwd/branch, and resume directly or copy the command
-
Integrated search: Press
/to filter inbox and archive sessions as you type, including attached brief names; inbox rows keep their formatting and fill the list first, with archive matches below a divider when room remains -
Places: Spin up a directory and its session in one command, and tear both down in one command. What "spin up a directory" means is a shell command you configure per repo, so worktrees (or whatever else you use) stay out of lemonaid's model
-
Briefs:
bon a session shows its brief name,Brief-ID, parent,Status:, what it needs from you, and the rest of## Nowbeside the lemon or in a tmux popup, without switching to it, with the live state of any PR the brief names when[brief] pr_stateis configured. The name after the dot is bold in brief IDs and children;[tui] brief_names_in_inbox = truealso shows it after the session name in the inbox.lemonaid brief showprints the same from anywhere. Questions a brief explains under## Questionsshow under what the lemon needs, andaanswers one ordasks for more detail, sent to the lemon's inbox -
Harness handoff: Move an attached brief from Claude to Codex, or back, with
lemonaid brief handoff --to <harness>. In tmux, the target replaces the old harness in the same pane after readiness; a failed cutover resumes the old session there. After Ctrl-Z returns control to an interactive shell, run the same command there; Lemonaid finds the stopped harness on the controlling TTY, waits for its handoff brief, and starts the replacement in that terminal. It refuses to guess when TTY matches are ambiguous. Without a live tmux pane, pass--brief FILEto select an attached source explicitly and use the manually staged status/start-command flow. The old session stays available by its original ID. -
Lemon messages: Each brief carries a stable ID for its file inbox. Send Markdown by ID, channel, or brief name with
lemonaid tell; receive one withlemonaid inbox next --selfor wait withlemonaid inbox watch --self. Codex lemons get messages queued into their threads by a self-starting delivery service; an optional Stop hook keeps each Claude lemon's waiter armed -
Starting lemons from config:
lemonaid lemon start SESSION:WINDOWruns a template's harness line in another window of a session, with a brief, parent, and name, and never over a live process. Codex starts past its trust and update prompts. -
Child briefs from templates:
lemonaid brief new --childwrites a brief for a lemon not started yet, with its parent filled in, ready forplace open --brieforlemon start --brief.--template reviewwrites a PR reviewer's brief with its waiters; your own templates go in~/.lemons/brief-templates/ -
Parent links: Record which lemon handed another its work, by Lemon-ID, with
place open --parent selforlemonaid lemon parent.lemon childrenlists a parent's children with their brief status, andtell --parentandtell --childmessage along the links -
Watches:
lemonaid watch doc,watch pr, andwatch filewait, at no token cost, for a Relay Comment on a document, activity on a GitHub PR, or a changed file, then wake the lemon: a Claude background task exits or a Codex thread gets a queued message. OpenClaw sessions get an agent turn for document comments. A lemon's own edits to a document it watches don't wake it -
Skills:
lemonaid skills installinstallswatch-docandwatch-prskills for Claude Code and Codex, with your own additions appended from~/.lemons/skills/<name>/overlay.md -
Brief status cards: Opt in with
[tui] brief_status = trueto color cards by attached brief status, show what a lemon needs from you or is waiting on, and flag stale briefs -
Brief edit verbs:
brief bulletandbrief prchange one line of a brief's## Nowand keep its layout, andbrief waiterone line of its## Waiters;brief checkfinds what a hand edit broke, and the Claude Stop hook runs it -
Auto-read: Regexes in
[inbox] auto_readleave a session read when its turn ends with a matching final message, so routine turns don't ask for attention -
Arrangers:
[inbox] arrangenames a program, in any language, that reorderslma's list and chooses what folds.lmakeeps it running and falls back to its own order when it fails, andlemonaid inbox arrange checktries one against your inbox -
Restore (
tmux):lemonaid restore tmuxrebuilds the tmux sessions your lemons were in after a crash or restart, starts each lemon with a prompt to rearm the waiters its brief lists, and reports which ones came back working -
Notes: Keep a Markdown file of your own in view under the sessions in the sidebar, such as tmux key hints while you learn them.
Nhides it -
Pins: Hold a session at the top of the list, in an order you choose
-
Snooze: Hold a session that needs attention "but not yet" until a time you pick, with a snoozed list so nothing goes missing. A lemon can snooze itself with
lemonaid inbox snooze --self -
Undo: Reverse an accidental archive, mark-read, snooze, or rename - multi-level, with a toast naming what changed
-
Bootstrap:
lemonaid claude bootstrapimports historical Claude sessions from before lemonaid was installed into the archive -
Always-visible sidebar (
tmux): Follow mode keeps the inbox in view across every window and session switch, on the left or across the top. Sessions render as cards when the pane is too narrow for columns. Without follow mode it is still a scratch pane you toggle with a keybinding, with no startup delay -
Brief beside the lemon (
tmux): When the scratch pane follows on the left,breplaces the inbox with the selected lemon's brief and keeps keyboard focus there.prefix+bopens the brief from the lemon and focuses the scratch pane; switching away restores the inbox -
Auto-refresh TUI: See new notifications appear without losing your place
- Claude statusline: Colorful statusline showing time, elapsed, git branch, context %, vim mode
tmuxsession templates: Spin up new named workspaces with a predefined window layouttmuxwindow status formatting: An optionaltmuxintegration to keep your status bar sane
uv tool install lemonaid-inboxThe package on PyPI is lemonaid-inbox, because lemonaid there is an
unrelated project. The commands are still lemonaid and lma.
After installing or upgrading, install lemonaid's skills for Claude Code and Codex:
lemonaid skills installlma also refreshes skills you've installed when it starts after an upgrade, but a fresh
install needs the command once. See Skills.
To run from a checkout instead:
git clone https://github.com/petergaultney/lemonaid.git
cd lemonaid
# Install globally with uv, then install the skills
uv tool install --editable .
lemonaid skills install
# For development
uv sync
uv run pre-commit installAn install made before the rename is a uv tool named
lemonaid, which holds the same commands. Remove it once with
uv tool uninstall lemonaid before either install above.
On macOS, check the tmux server setup before using follow mode, especially the file-descriptor limit and window options.
Before running or extending the test suite, read docs/testing.md, especially its watcher-isolation safety invariant. For this repo's multi-lemon merge and live-install workflow, see docs/development.md.
Add hooks to ~/.claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "lemonaid claude submit" }] }],
"Stop": [{ "hooks": [{ "type": "command", "command": "lemonaid claude notify" }] }],
"PermissionRequest": [{ "matcher": "AskUserQuestion", "hooks": [{ "type": "command", "command": "lemonaid claude notify" }] }],
"Notification": [{ "matcher": "permission_prompt", "hooks": [{ "type": "command", "command": "lemonaid claude notify" }] }]
}
}Features: sessions appear in the inbox the moment a prompt is submitted (UserPromptSubmit), questions asked mid-turn with AskUserQuestion notify you (PermissionRequest), auto-dismiss via transcript watching, live activity updates, binary patch for faster notifications.
Full documentation: docs/claude.md | Binary patch
Add to ~/.codex/config.toml at the very top (before any [table] headers):
notify = ["lemonaid", "codex", "notify"]Features: auto-dismiss via session watching, live activity updates.
Full documentation: docs/codex.md
Register from within an OpenClaw TUI session:
!lemonaid openclaw register
Features: turn-complete detection, live activity updates, auto-dismiss on user input.
Full documentation: docs/openclaw.md
Add this plugin at ~/.config/opencode/plugins/lemonaid.js (or .opencode/plugins/lemonaid.js in a project):
export const LemonaidPlugin = async ({ $ }) => ({
event: async ({ event }) => {
if (event.type === "session.idle" || event.type === "permission.asked") {
await $`lemonaid opencode notify ${JSON.stringify(event)}`
}
},
})Features: idle/permission notifications via plugin hooks, auto-dismiss via session DB watching, live activity updates.
Full documentation: docs/opencode.md
tmux(3.0 or later; follow mode needs 3.6): See docs/tmux.md for pane switching, back navigation, session templates, and window colors- WezTerm: See docs/wezterm.md for workspace/pane switching setup
- cmux: Switching to a session's workspace and surface, and resuming a dead one, needs no cmux configuration; see docs/cmux.md for the hooks and for running
lmain the Dock
# Open the inbox TUI
lma
# Or via the full CLI
lemonaid inbox
# List notifications (non-interactive)
lemonaid inbox listThe inbox and the scratch sidebar list sessions in the same order:
- Pinned sessions, in the order you put them.
- Sessions whose attached brief says
alert: your move, and harm grows while it waits. - Sessions whose brief says
blocked: a decision, answer, or review for you. - Sessions whose brief says
running: a lemon minding a pipeline or other long process. - Sessions whose brief says
merge: only your merge is left. - Sessions whose brief says
approve: a reviewer recommends approving a teammate's PR, and only your approval is left. - Sessions whose brief says
review: a teammate's approving review comes before your merge. - Sessions whose brief says
done. - Every other unread session.
- Every other read session:
working,waiting, or no brief.
With [tui] mid_turn_working on, a read session that is
mid-turn sorts as working until the turn ends, whatever its brief says, unless
it says running.
With [tui] fold_statuses set,
read sessions of those statuses fold into one line at the bottom, which w opens.
Within each group other than the pins, unread comes first, then newest first.
| Key | Action |
|---|---|
Enter |
Switch to the session's pane |
1-9, 0 |
Switch to that row |
u |
Jump to the oldest unread session |
m / M |
Mark as read / unread |
a |
Archive |
s / S |
Snooze / list snoozed |
p |
Pin below the other pins, or unpin; Shift+β/β moves a pin |
b |
Show the session's brief |
z |
Undo the last inbox change |
h |
Session history (Enter resumes, c copies the resume command) |
/ |
Search inbox and archived sessions |
f |
Move the scratch pane between top and left |
? |
Show the key reference |
q / Escape |
Quit |
The full list, including rename, history filtering, and the brief view's own keys, is in docs/keybindings.md, along with how to rebind them.
For JSON output and programmatic access (useful for lemons), see docs/for-lemons.md
β or run lemonaid for-lemons, which prints the same guide from any install.
Config file: ~/.config/lemonaid/config.toml β see docs/config.md for the full reference.
- docs/keybindings.md - Customize TUI keybindings
- docs/tmux.md - tmux integration and session templates
- docs/wezterm.md - WezTerm integration
- docs/cmux.md - cmux integration
- inbox: SQLite-backed session status storage with Textual TUI
- claude: Claude Code hook integration with transcript watching
- codex: Codex CLI hook integration with session watching
- openclaw: OpenClaw integration with turn-complete detection
- opencode: OpenCode integration with plugin events and live activity watching
- brief and messages: attached briefs, their popup and sidebar views, and the per-lemon file inboxes behind
lemonaid tell - places: per-repo hooks that create and remove directories, and the tmux sessions opened in them
- tmux / wezterm: pane switching, the scratch pane and follow mode, session templates
- cmux: switching to a session's workspace and surface

