|
| 1 | +# agent-monitor |
| 2 | + |
| 3 | +Terminal dashboard to monitor Claude Code, Codex, and Gemini CLI usage limits. |
| 4 | + |
| 5 | +## Install |
| 6 | + |
| 7 | +### Via npm (requires Bun) |
| 8 | + |
| 9 | +```bash |
| 10 | +npm install -g agent-monitor |
| 11 | +``` |
| 12 | + |
| 13 | +### Standalone Binary (no dependencies) |
| 14 | + |
| 15 | +Download from [GitHub Releases](https://github.com/AgentWorkforce/monitor/releases): |
| 16 | + |
| 17 | +```bash |
| 18 | +# Apple Silicon |
| 19 | +curl -L https://github.com/AgentWorkforce/monitor/releases/latest/download/agent-monitor-darwin-arm64 -o /usr/local/bin/agent-monitor |
| 20 | +chmod +x /usr/local/bin/agent-monitor |
| 21 | + |
| 22 | +# Intel Mac |
| 23 | +curl -L https://github.com/AgentWorkforce/monitor/releases/latest/download/agent-monitor-darwin-x64 -o /usr/local/bin/agent-monitor |
| 24 | +chmod +x /usr/local/bin/agent-monitor |
| 25 | +``` |
| 26 | + |
| 27 | +## Quick Start |
| 28 | + |
| 29 | +```bash |
| 30 | +agent-monitor usage |
| 31 | +``` |
| 32 | + |
| 33 | +## CLI |
| 34 | + |
| 35 | +| Command | Description | |
| 36 | +|---------|-------------| |
| 37 | +| `agent-monitor usage` | Show usage dashboard | |
| 38 | +| `agent-monitor help` | Show help message | |
| 39 | + |
| 40 | +## Dashboard Controls |
| 41 | + |
| 42 | +| Key | Action | |
| 43 | +|-----|--------| |
| 44 | +| `q` | Quit | |
| 45 | +| `r` | Refresh | |
| 46 | + |
| 47 | +## Features |
| 48 | + |
| 49 | +- Real-time usage tracking for Claude Code, Codex, and Gemini CLI |
| 50 | +- Trajectory markers showing if you're ahead or behind your usage pace |
| 51 | +- Auto-refresh every 60 seconds |
| 52 | +- Color-coded usage indicators |
| 53 | + |
| 54 | +## Supported Providers |
| 55 | + |
| 56 | +| Provider | Status | Data Source | |
| 57 | +|----------|--------|-------------| |
| 58 | +| Claude Code | Full support | macOS Keychain + Anthropic API | |
| 59 | +| Codex | Full support | `~/.codex/auth.json` + OpenAI API | |
| 60 | +| Gemini CLI | Static limits | `~/.gemini/settings.json` | |
| 61 | + |
| 62 | +## Development |
| 63 | + |
| 64 | +```bash |
| 65 | +git clone https://github.com/AgentWorkforce/monitor.git |
| 66 | +cd monitor |
| 67 | +bun install |
| 68 | +``` |
| 69 | + |
| 70 | +Run in development mode with hot reload: |
| 71 | + |
| 72 | +```bash |
| 73 | +bun run dev |
| 74 | +``` |
| 75 | + |
| 76 | +Run directly: |
| 77 | + |
| 78 | +```bash |
| 79 | +bun run start |
| 80 | +``` |
| 81 | + |
| 82 | +> **Note:** In dev mode, use `q` to quit cleanly. If you Ctrl-C and see garbled output, run `reset` to restore your terminal. |
| 83 | +
|
| 84 | +### Building Standalone Binaries |
| 85 | + |
| 86 | +Build binaries that don't require Bun: |
| 87 | + |
| 88 | +```bash |
| 89 | +# Build for all macOS architectures |
| 90 | +bun run build |
| 91 | + |
| 92 | +# Build for specific architecture |
| 93 | +bun run build:arm64 # Apple Silicon |
| 94 | +bun run build:x64 # Intel |
| 95 | +``` |
| 96 | + |
| 97 | +Binaries are output to `dist/`. |
| 98 | + |
| 99 | +## How It Works |
| 100 | + |
| 101 | +agent-monitor reads credentials from standard locations: |
| 102 | + |
| 103 | +- **Claude Code**: macOS Keychain (`Claude Code-credentials`) |
| 104 | +- **Codex**: `~/.codex/auth.json` |
| 105 | +- **Gemini**: `~/.gemini/settings.json` |
| 106 | + |
| 107 | +It then fetches usage data from each provider's API and displays it in a unified dashboard. |
| 108 | + |
| 109 | +### Trajectory Indicator |
| 110 | + |
| 111 | +Each progress bar shows a `|` marker indicating where your usage "should be" based on time elapsed in the reset period: |
| 112 | + |
| 113 | +``` |
| 114 | +[███████░░░░|░░░░░░░░░] 30% ↓12% |
| 115 | + ^ you should be at 42%, but you're at 30% (12% under pace) |
| 116 | +``` |
| 117 | + |
| 118 | +- `↓X%` (green) = under pace, you have headroom |
| 119 | +- `↑X%` (red) = over pace, might hit limits early |
| 120 | + |
| 121 | +## Requirements |
| 122 | + |
| 123 | +- macOS (uses Keychain for credential storage) |
| 124 | +- Active CLI authentication for providers you want to monitor |
| 125 | + |
| 126 | +## License |
| 127 | + |
| 128 | +MIT |
0 commit comments