top, but for your running coding agents — Claude Code, Codex, Grok, Gemini, and Antigravity.
A zero-dependency terminal dashboard that shows every claude (Claude Code),
codex (OpenAI Codex), grok (xAI Grok), gemini (Google Gemini), and agy
(Google Antigravity) CLI session running on your machine — live, refreshing like
top/htop. See at a glance which projects have agents working, what framework
and model they're on, which git branch they're on, and what each one is doing
right now (running a tool, thinking, or waiting for you).
No install needed — run it with npx:
npx agentopOr install globally with npm:
npm install -g agentop
agentop…or with Homebrew (macOS/Linux):
brew install ktamas77/tap/agentop…or with Deno (it's published to JSR and runs TypeScript natively):
deno run -A jsr:@ktamas77/agentop # run it
deno install -gA -n agentop jsr:@ktamas77/agentop # install the commandWant to see it without any agents running? Try the demo:
npx agentop --demo| Key | Action |
|---|---|
q / Esc / Ctrl-C |
Quit |
s |
Cycle the sort column |
r |
Reverse the sort order |
+ / - |
Increase / decrease the refresh interval |
-d, --interval <sec> Refresh interval in seconds (default: 2)
-s, --sort <key> Sort by: cpu, mem, up, idle, project, pid (default: cpu)
-r, --reverse Reverse sort order
-n, --once Print a single snapshot and exit (no live UI)
--json Print agents as JSON and exit
--demo Show fabricated sample agents (no real data)
--no-color Disable ANSI colors
-h, --help Show help
-v, --version Show version
--once and --json make agentop scriptable:
agentop --json | jq '.[] | select(.state == "working") | .project'
watch -n5 'agentop --once'| Column | Meaning |
|---|---|
| PID | OS process id of the agent's CLI session |
| AGENT | Which framework — claude, codex, grok, gemini, or agy |
| MODEL | Model the session is using (e.g. opus-4-8, gpt-5.5, grok-4, gemini-3-flash) |
| PROJECT | Working directory basename of the agent |
| BRANCH | Git branch the session is on |
| STATE | working (running a tool) · thinking · replied · waiting · idle · stalled |
| %CPU | Process CPU usage |
| MEM | Resident memory |
| UP | How long the process has been running |
| IDLE | Time since the last transcript activity |
| ACTIVITY | What the agent is doing right now (current tool, prompt, …) |
agentop reads only local state — nothing is sent anywhere:
- It lists running
claude,codex,grok,gemini, andagyCLI processes withps(desktop apps, helpers, and launcher shims are filtered out), and resolves each one's working directory via/procon Linux orlsofon macOS. - It joins each process to its session by working directory:
- Claude Code → the transcript under
~/.claude/projects/<encoded-cwd>/<session>.jsonl(reads just the tail). - Codex → the
threadstable in~/.codex/state_*.sqlite(read via the systemsqlite3binary — still zero npm deps), with activity from the thread's rollout file when present. - Grok →
~/.grok/sessions/<encoded-cwd>/<id>/(summary.jsonfor the model,events.jsonlfor the current phase). - Gemini →
~/.gemini/tmp/<project>/chats/session-*.jsonl. - Antigravity → the readable transcript in
~/.gemini/antigravity-cli/brain/<id>/…/transcript.jsonl, matched to the workspace it references.
- Claude Code → the transcript under
- From each it extracts the model, git branch, version, last-activity time, and
the current tool call, and renders it all as a
top-style table.
The design is a small provider abstraction (src/providers/*), so adding
another agent framework is mostly one new file.
- Runs on Node.js ≥ 18 or Deno ≥ 2 — the same TypeScript source runs on
both (a tiny
src/platform.tsabstracts the runtime). - macOS or Linux (
ps, pluslsofon macOS) sqlite3(a standard system binary) is used for Codex live enrichment; if it's missing, Codex agents still show — just without live model/activity.
See CHANGELOG.md.
The project is TypeScript, ESM. Deno is the dev toolchain (it runs .ts
natively); tsc builds the npm dist/.
deno task start # run from source
deno task demo # run the demo
deno test -A # full test suite
deno fmt && deno lint # format + lint
deno check main.ts # type-check
npm run build # tsc -> dist/ (the npm artifact)
npm run check # fmt + lint + check + test + build (what CI runs)src/*.ts is the shared, typed core (one src/providers/<name>.ts per agent
framework). Entry points: bin/agentop.js (npm, over the built dist/) and
main.ts (Deno). A Husky pre-commit hook runs the same deno fmt/lint/check/ test + tsc build; CI runs a Deno matrix and a Node build/smoke matrix across
macOS/Linux.
MIT © Tamas Kalman
