Fleet monitoring for Claude Code sessions - TUI dashboard, MCP server, and terminal focus
Project description
Claude Fleet Monitor
Fleet monitoring for Claude Code sessions. See all your running sessions at a glance, get notified when one needs input, and jump to the right terminal tab instantly.
Features
- TUI Dashboard -- live view of all Claude Code sessions with status, detail, and age
- Process Discovery -- finds running sessions via
/proceven before hooks fire - MCP Server -- any Claude session can query fleet status programmatically
- Terminal Focus -- switch to a session's Konsole tab (or raise its window on other terminals) by name or PID
- Desktop Notifications --
notify-sendalerts when a session has been idle for over 2 minutes - Hooks Integration -- Claude Code hooks emit real-time status (running, idle, error) as sessions interact
Install
pip install claude-fleet-monitor
claude-fleet install
Or install from source:
git clone https://github.com/andre-motta/claude-fleet-monitor.git
cd claude-fleet-monitor
pip install .
claude-fleet install
Restart your Claude Code sessions after the first install to activate hooks.
Upgrading
pip install --upgrade claude-fleet-monitor
No need to re-run claude-fleet install or restart sessions. Hooks and MCP server point to pip-installed entry points, so upgrades take effect immediately.
Dependencies
python3>= 3.10
Optional:
qdbus-- Konsole tab switching (KDE)xdotool-- generic window focus (X11)notify-send-- desktop notifications
Usage
TUI Dashboard
claude-fleet monitor # default 2s refresh
claude-fleet monitor --refresh 5 # 5s refresh
Or run the script directly:
~/.claude/bin/fleet-monitor.sh
Focus a Session
claude-fleet focus autofix # by repo name
claude-fleet focus 2467709 # by PID
claude-fleet focus proc-2467709 # by session ID
On Konsole: switches to the exact tab. On other terminals: raises the window.
Quick Status (no TUI)
claude-fleet status
MCP Tools
Any Claude Code session with the fleet MCP server can use these tools:
| Tool | Description |
|---|---|
fleet_status |
All sessions with summary counts |
fleet_session |
Single session detail by ID or prefix |
fleet_sessions_needing_attention |
Sessions idle over 2 minutes |
fleet_focus |
Focus terminal tab for a session |
fleet_cleanup |
Remove stale ended session files |
Just ask Claude: "what sessions are running?" or "focus on the autofix session".
How It Works
Claude Code Session A --\ <-- MCP server
Claude Code Session B ---|-- hooks --> ~/.claude/fleet/*.json <-- TUI monitor
Claude Code Session C --/ <-- fleet-focus
- Hooks in
~/.claude/settings.jsonfire on session events (start, prompt, tool use, stop, end) - Each hook writes/updates a JSON status file in
~/.claude/fleet/ - Process discovery also scans
/procforclaudeprocesses to find sessions that started before hooks were installed - The TUI monitor, MCP server, and CLI all read these status files
Session States
| State | Meaning |
|---|---|
STARTED |
Session just began |
RUNNING |
Processing a prompt or using tools |
IDLE |
Finished responding, waiting for input |
ERROR |
Turn failed (API error) |
ENDED |
Session closed |
DISCOVERED |
Found via process scan, no hook data yet |
Known Limitations
- Same-name tabs in different windows (Konsole/KDE): When multiple sessions share the same repo name (e.g. two
autofixsessions) and live in different Konsole windows, the focus command will switch to the correct tab but may raise the wrong window. Workaround: keep same-name sessions grouped in the same Konsole window. - Wayland window activation: On Wayland/KDE, window raising uses KWin scripting via DBus. Other Wayland compositors may not support programmatic window activation.
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
FLEET_DIR |
~/.claude/fleet |
Directory for session status files |
Uninstall
claude-fleet uninstall # removes everything including data
claude-fleet uninstall --keep-data # keeps ~/.claude/fleet/
Publishing
This project uses trusted publishing via GitHub Actions. To release:
git tag v0.1.0
git push origin v0.1.0
The workflow builds and publishes to PyPI automatically.
License
MIT
Project details
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 claude_fleet_monitor-0.2.1.tar.gz.
File metadata
- Download URL: claude_fleet_monitor-0.2.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aec3fa1029a7982d6a47add88ce9639dc89e9d05338ce59f6bf26b2b49ee070
|
|
| MD5 |
74356b895ebedc77832de22cd28d0d22
|
|
| BLAKE2b-256 |
5164a4842bcc192599760ded125847a780646e51735e607dea00a1c8737fb6ca
|
Provenance
The following attestation bundles were made for claude_fleet_monitor-0.2.1.tar.gz:
Publisher:
publish.yml on andre-motta/claude-fleet-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_fleet_monitor-0.2.1.tar.gz -
Subject digest:
3aec3fa1029a7982d6a47add88ce9639dc89e9d05338ce59f6bf26b2b49ee070 - Sigstore transparency entry: 2139134675
- Sigstore integration time:
-
Permalink:
andre-motta/claude-fleet-monitor@a797cd8007aeaad656efd3bda536b421f547cbc7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/andre-motta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a797cd8007aeaad656efd3bda536b421f547cbc7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_fleet_monitor-0.2.1-py3-none-any.whl.
File metadata
- Download URL: claude_fleet_monitor-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a66cf52f6c4fb6cb08a1588167be1be2807cde83d9891fd94cb353218d84801b
|
|
| MD5 |
54063286809b3eb85b317107e337cd88
|
|
| BLAKE2b-256 |
d6a9ced02a382da602fa0f75e047a2022622e45e6fe9a2bbdc6fdff72814f8db
|
Provenance
The following attestation bundles were made for claude_fleet_monitor-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on andre-motta/claude-fleet-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_fleet_monitor-0.2.1-py3-none-any.whl -
Subject digest:
a66cf52f6c4fb6cb08a1588167be1be2807cde83d9891fd94cb353218d84801b - Sigstore transparency entry: 2139134739
- Sigstore integration time:
-
Permalink:
andre-motta/claude-fleet-monitor@a797cd8007aeaad656efd3bda536b421f547cbc7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/andre-motta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a797cd8007aeaad656efd3bda536b421f547cbc7 -
Trigger Event:
push
-
Statement type: