A CLI supervisor for Claude Code sessions
Project description
Betty
A real-time TUI monitor for Claude Code sessions.
Install
curl -fsSL https://betty4.sh/install.sh | bash
Or directly with uv / pip:
uvx betty-cli # run without installing
uv tool install betty-cli # install permanently
pip install betty-cli # with pip
Use
# Start betty
betty
# In another terminal, run Claude Code as usual
claude
The companion auto-detects your session. No hooks or configuration needed.
Options
| Flag | Description |
|---|---|
--global, -g |
Watch all projects |
--worktree, -w |
Watch across git worktrees |
--style |
UI style (rich or claude-code) |
--version, -v |
Show version |
Commands
| Command | Description |
|---|---|
config |
Configure LLM summarization and UI settings |
mock --demo |
Generate mock sessions for development |
Keybindings
Navigation
| Key | Action |
|---|---|
j/k |
Navigate turns |
g/G |
Jump to beginning/end |
1-9 |
Switch sessions |
h/l |
Switch panels (manager expand mode) |
Display
| Key | Action |
|---|---|
o / Space / Enter |
Expand/collapse turn or span |
e/c |
Expand/collapse all |
f |
Cycle filters (All, Spans, Tools, Read, Write, Edit, Bash) |
s/S |
Toggle summaries / Summarize all |
Views
| Key | Action |
|---|---|
M |
Toggle manager view |
T |
Toggle tasks view |
P |
Toggle plan view |
I |
Toggle insights (analysis) panel |
Analysis & Annotations
| Key | Action |
|---|---|
A |
Analyze selected turn/span/session |
[/] |
Zoom analysis level (turn / span / session) |
n |
Annotate selected turn |
a |
Toggle/clear alerts |
Agent
| Key | Action |
|---|---|
B |
Toggle agent panel (closed / full / compact) |
? |
Ask Betty a question about the session |
Other
| Key | Action |
|---|---|
O |
Open PR in browser |
x |
Export to Markdown |
m |
Edit monitor instructions |
D |
Delete session |
Esc |
Close panel / clear selection |
q |
Quit |
Betty Agent
Betty Agent is a continuous session observer that tracks what Claude Code is doing and flags problems in real time. It combines heuristic detectors with optional LLM-powered narrative and drift detection.
Enable
betty config --agent
Or set the environment variable BETTY_AGENT_ENABLED=true.
What it does
- Goal tracking — extracts the session goal and current objective, updating as the user gives new instructions
- Progress assessment — classifies sessions as
on_track,stalled, orspinningusing error rates, retry patterns, and tool diversity - Error spike detection — warns when error rate exceeds 40% in recent tool calls
- Retry loop detection — flags when the same tool is called 3+ times consecutively
- Stall detection — notices gaps of 2+ minutes between turns
- File change tracking — logs Read/Write/Edit operations with line counts
- Milestones — marks every 10th tool call and 5th user message
- LLM narrative (optional) — generates a 2-3 sentence situation report describing current activity
- Goal drift detection (optional) — compares recent activity against the session goal and warns if the assistant has gone off track
- Ask Betty — press
?to ask a natural-language question about the session; Betty answers citing turn numbers and file paths
Configuration
The agent uses your existing LLM configuration (set via betty config). LLM features (narrative, drift detection, goal determination, Ask Betty) require a configured LLM provider. Heuristic detectors work without one.
| Setting | Default | Description |
|---|---|---|
enabled |
false |
Enable the agent (opt-in) |
update_interval |
5 |
Minimum turns between LLM updates |
max_observations |
50 |
Max observations kept per session |
Observations and reports are cached to disk (~/.cache/betty/) and persist across restarts.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file betty_cli-0.14.0.tar.gz.
File metadata
- Download URL: betty_cli-0.14.0.tar.gz
- Upload date:
- Size: 102.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2c0f1ee91a9f291783e6ec2316557941a786392971bfea794d4bbf25bd1b7ec
|
|
| MD5 |
08cdf45b949a0ebf76539702a3e84cc9
|
|
| BLAKE2b-256 |
61afd81d8c8dfe6b49267ad60694eae09fc8bf44d677245810e136a755529e7a
|
Provenance
The following attestation bundles were made for betty_cli-0.14.0.tar.gz:
Publisher:
publish.yml on ai-companion/betty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betty_cli-0.14.0.tar.gz -
Subject digest:
c2c0f1ee91a9f291783e6ec2316557941a786392971bfea794d4bbf25bd1b7ec - Sigstore transparency entry: 973055572
- Sigstore integration time:
-
Permalink:
ai-companion/betty@8266e5abbe9d3243fc7d2f5253806c6077f5e2c8 -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/ai-companion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8266e5abbe9d3243fc7d2f5253806c6077f5e2c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file betty_cli-0.14.0-py3-none-any.whl.
File metadata
- Download URL: betty_cli-0.14.0-py3-none-any.whl
- Upload date:
- Size: 113.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7970cedbb4f8e44224b58b8d0c094b0a34756dc35e781f7d7d869092748a5061
|
|
| MD5 |
b10dccc6d65b6b8392b64ba60b681bed
|
|
| BLAKE2b-256 |
5bb2a6b154164f79ecc45be4cd6f9c2d207550686cd3c3e63415af335e662941
|
Provenance
The following attestation bundles were made for betty_cli-0.14.0-py3-none-any.whl:
Publisher:
publish.yml on ai-companion/betty
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betty_cli-0.14.0-py3-none-any.whl -
Subject digest:
7970cedbb4f8e44224b58b8d0c094b0a34756dc35e781f7d7d869092748a5061 - Sigstore transparency entry: 973055656
- Sigstore integration time:
-
Permalink:
ai-companion/betty@8266e5abbe9d3243fc7d2f5253806c6077f5e2c8 -
Branch / Tag:
refs/tags/v0.14.0 - Owner: https://github.com/ai-companion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8266e5abbe9d3243fc7d2f5253806c6077f5e2c8 -
Trigger Event:
release
-
Statement type: