# abtop **Repository Path**: agent-projects-cn/abtop ## Basic Information - **Project Name**: abtop - **Description**: 一目了然地查看每一次 Claude Code、Codex CLI 和 OpenCode 会话——包括令牌使用量、上下文窗口百分比、速率限制、子进程、开放端口等信息。Claude Code、Codex CLI 和 OpenCode 会话通过本地进程/文件状态进行发现,因此在 macOS、Linux 和 Windows 系统上均支持多个活动配置文件。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-26 - **Last Updated**: 2026-05-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # abtop **Like [btop](https://github.com/aristocratos/btop), but for your AI coding agents.** See every Claude Code, Codex CLI, and OpenCode session at a glance — token usage, context window %, rate limits, child processes, open ports, and more. Claude Code, Codex CLI, and OpenCode sessions are discovered from local process/file state, so multiple active profiles are supported across macOS, Linux, and Windows. ![demo](https://raw.githubusercontent.com/graykode/abtop/main/assets/demo.gif) ## Why - Running 3+ agents across projects? See them all in one screen. - Hitting rate limits? Watch your quota in real-time. - Agent spawned a server and forgot to kill it? Orphan port detection. - Context window filling up? Per-session % bars with warnings. All read-only. No API keys. No auth. ## Install ### macOS / Linux ```bash curl --proto '=https' --tlsv1.2 -LsSf https://github.com/graykode/abtop/releases/latest/download/abtop-installer.sh | sh ``` ### Cargo ```bash cargo install abtop ``` ### Windows Native support — no WSL required. Uses `sysinfo` for process info and `netstat -ano` for listening ports. ```powershell powershell -c "irm https://github.com/graykode/abtop/releases/latest/download/abtop-installer.ps1 | iex" ``` Or `cargo install abtop` from any terminal with Git in PATH. Claude Code config is resolved automatically from `%USERPROFILE%\.claude`. ### Other Pre-built binaries for all platforms are available on the [GitHub Releases](https://github.com/graykode/abtop/releases) page. ## Usage ```bash abtop # Launch TUI abtop --once # Print snapshot and exit abtop --setup # Install rate limit collection hook abtop --theme dracula # Launch with a specific theme ``` Recommended terminal size: **120x40** or larger. Minimum 80x24 — panels hide gracefully when small. ### tmux abtop works standalone, but running inside tmux unlocks session jumping — press `Enter` to switch directly to the pane running that agent. ```bash tmux new -s work # pane 0: abtop # pane 1: claude (project A) # pane 2: claude (project B) # → Enter on a session in abtop jumps to its pane ``` ## Supported Agents | Feature | Claude Code | Codex CLI | OpenCode | | ----------------- | :---------: | :-------: | :------: | | Session Discovery | ✅ | ✅ | ✅ | | Token Tracking | ✅ | ✅ | ✅ | | Context Window % | ✅ | ✅ | ❌ | | Status Detection | ✅ | ✅ | ✅ | | Current Task | ✅ | ✅ | ❌ | | Rate Limit | ✅ | ✅ | ❌ | | Git Status | ✅ | ✅ | ✅ | | Children / Ports | ✅ | ✅ | ✅ | | Subagents | ✅ | ❌ | ❌ | | Memory Status | ✅ | ❌ | ❌ | OpenCode support reads the local SQLite database at `~/.local/share/opencode/opencode.db` and requires `sqlite3` in `PATH`. ## Themes 12 built-in themes, including 4 colorblind-friendly options (`high-contrast`, `protanopia`, `deuteranopia`, `tritanopia`). Press `t` to cycle at runtime, or launch with `--theme `. Your choice is saved to `~/.config/abtop/config.toml`. | btop (default) | dracula | catppuccin | |:-:|:-:|:-:| | ![btop](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/btop.png) | ![dracula](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/dracula.png) | ![catppuccin](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/catppuccin.png) | | tokyo-night | gruvbox | nord | |:-:|:-:|:-:| | ![tokyo-night](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/tokyo-night.png) | ![gruvbox](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/gruvbox.png) | ![nord](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/nord.png) | Colorblind-friendly themes: | high-contrast | protanopia | |:-:|:-:| | ![high-contrast](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/high-contrast.png) | ![protanopia](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/protanopia.png) | | deuteranopia | tritanopia | |:-:|:-:| | ![deuteranopia](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/deuteranopia.png) | ![tritanopia](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/tritanopia.png) | Light themes (`light` — Solarized cream, `white` — GitHub-style pure white) for bright terminals: | light | white | |:-:|:-:| | ![light](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/light.png) | ![white](https://raw.githubusercontent.com/graykode/abtop/main/assets/themes/white.png) | ## Configuration `~/.config/abtop/config.toml` supports: ```toml theme = "btop" # Hide specific agent CLIs from the TUI (case-insensitive). # Useful if you only use one agent and want a cleaner view. hidden_agents = ["codex"] # Additional Claude Code profile roots to scan. # abtop also auto-discovers ~/.claude and ~/.claude-* roots that contain # both sessions/ and projects/. claude_config_dirs = ["~/.claude-personal", "~/.claude-work-team"] # UI language. Omit or leave empty to auto-detect from LANG. language = "zh" ``` ### Supported Languages | Code | Language | | ---- | ------------------- | | `en` | English (default) | | `zh` | Simplified Chinese | When `language` is unset, abtop auto-detects from `LANG` — any value starting with `zh` switches to Simplified Chinese, otherwise English. ## Key Bindings | Key | Action | | ------------------ | ------------------------------------ | | `↑`/`↓` or `k`/`j` | Select session | | `Enter` | Jump to session terminal (tmux only) | | `x` | Kill selected session | | `X` | Kill all orphan ports | | `t` | Cycle theme | | `1`–`5` | Toggle panel visibility | | `Esc` | Open/close config page | | `q` | Quit | | `r` | Force refresh | ## Privacy abtop reads local files and local process/open-file metadata only. No API keys, no auth. Tool names and file paths are shown in the UI, but file contents and prompt text are never displayed. Session summaries are generated via `claude --print`, which makes its own API call — this is the only indirect network usage. ## Acknowledgements Huge thanks to [@tbouquet](https://github.com/tbouquet) for driving much of abtop's recent shape — themes, config overlay and panel toggles, session filtering, subagent tree view, the context window gauge with compaction detection, plus a steady stream of fixes and security hardening along the way. ## License MIT