Skip to content

xiaoleiy/agent-hub

Repository files navigation

Agent Hub logo

Agent Hub

Your mission control for AI coding agents β€” monitor Claude Code, Cursor, and Codex from your Mac's menu bar, terminal, or a TUI.

CI Release Stars Forks License: MIT Platform: macOS

Rust Tauri Svelte SvelteKit


Why Agent Hub?

If you run AI coding agents all day, you probably juggle a few questions constantly: Which agents are installed? Which account am I logged into? How close am I to my rate limit? Is my machine about to fall asleep mid-task?

Agent Hub answers all of that in one place. It's a single, fast Rust binary that ships three faces β€” a native macOS menu-bar app, a rich terminal dashboard (TUI), and scriptable CLI commands β€” so you can check on your agents however you prefer to work. It watches your system, detects your agents, surfaces token usage and subscription limits, and can keep your Mac awake while long-running jobs finish.

Inspired by steipete/CodexBar.

Features

System status

  • Live CPU, RAM, and uptime monitoring
  • Network status at a glance
  • Proxy / VPN detection
  • Keep-alive via caffeinate to prevent sleep while agents run β€” with timed presets

Agent intelligence

  • Auto-detects installed AI coding agents and their versions
  • Shows the logged-in account (email / organization) per agent
  • Tracks active sessions
  • Reports token usage
  • Surfaces subscription rate limits across rolling windows (5-hour and weekly)

Three ways to use it

  • πŸ–₯️ Native macOS menu-bar / desktop app (Tauri 2)
  • πŸ“Š Interactive terminal dashboard (ratatui)
  • ⌨️ Scriptable CLI with --json output on every command

Supported Agents

Agent Install / Version Account (email/org) Active Sessions Token Usage Rate Limits
Claude Code βœ… βœ… βœ… βœ… βœ…
Cursor βœ… βœ… βœ… βœ… βœ…
Codex βœ… βœ… βœ… βœ… βœ…

Rate limits are reported across rolling 5-hour and weekly subscription windows where the agent exposes them.

Screenshots

GUI (menu bar) TUI (dashboard) CLI (status)
Agent Hub GUI Agent Hub TUI Agent Hub CLI
Desktop app + system tray Interactive ratatui dashboard --json-friendly commands

Screenshots live in docs/screenshots/. Replace the placeholders above with real captures.

Installation

macOS only (10.15 Catalina or later).

Homebrew β€” GUI app + CLI (recommended)

brew tap xiaoleiy/tap
brew install --cask xiaoleiy/tap/agent-hub

Installs the Agent Hub menu-bar app and the agent-hub CLI/TUI. The app goes to /Applications (Homebrew may prompt for your password once).

No admin rights? Install the app into your home folder instead:

brew install --cask --appdir=~/Applications xiaoleiy/tap/agent-hub

Homebrew β€” CLI / TUI only (no admin, no GUI)

Just the agent-hub command β€” installs into the Homebrew prefix, so no sudo and no Gatekeeper prompts. Ideal for terminal users and IT-managed Macs:

brew tap xiaoleiy/tap
brew install xiaoleiy/tap/agent-hub-cli
agent-hub tui

Manual download (no Homebrew, no admin)

  1. Download the .dmg for your chip from the latest release and drag Agent Hub.app into ~/Apps (or ~/Applications).
  2. The app is ad-hoc signed but not notarized, so macOS may flag it on first open. Clear that without admin:
    xattr -cr "$HOME/Apps/Agent Hub.app"
    codesign --force --deep --sign - "$HOME/Apps/Agent Hub.app"
  3. (Optional) put the CLI/TUI on your PATH β€” it's the same binary:
    ln -sf "$HOME/Apps/Agent Hub.app/Contents/MacOS/agent-hub" "$HOME/.local/bin/agent-hub"

Build from source

Requires a recent Rust toolchain and Node.js.

git clone https://github.com/xiaoleiy/agent-hub.git
cd agent-hub
npm install
npm run tauri build

Usage

Agent Hub is a single binary that routes by its arguments. Launch the GUI, drop into the TUI, or run one-off CLI commands.

πŸ–₯️ GUI

agent-hub          # launch the desktop app + system tray
agent-hub gui      # explicit form

A SvelteKit + Svelte 5 dashboard backed by Tauri 2, with a live menu-bar / tray presence.

πŸ“Š TUI

agent-hub tui

An interactive ratatui dashboard. Keybindings:

Key Action
← / β†’ or Tab Switch tabs
1–9 Jump to tab by number
r Refresh
w Cycle usage window
Space Toggle keep-alive
a Keep-alive for 30 minutes
s Keep-alive for 1 hour
d Keep-alive for 3 hours
f Keep-alive forever
q / Esc Quit

⌨️ CLI

Every command supports --json for scripting and integration.

agent-hub status      # system overview: CPU, RAM, uptime, network, agents
agent-hub network     # network + proxy / VPN status
agent-hub agents      # detected agents, versions, and logged-in accounts
agent-hub sessions    # active agent sessions
agent-hub usage       # token usage and subscription rate limits
agent-hub keepalive   # manage caffeinate keep-alive
# Example: machine-readable usage data
agent-hub usage --json

Architecture

agent-hub/
β”œβ”€β”€ src/                          SvelteKit frontend
β”‚   β”œβ”€β”€ routes/+page.svelte       dashboard
β”‚   └── lib/components/*.svelte   UI components
└── src-tauri/
    └── src/
        β”œβ”€β”€ lib.rs                CLI / GUI router
        β”œβ”€β”€ cli/                  clap parsing + handlers
        β”œβ”€β”€ tui/                  ratatui dashboard
        β”œβ”€β”€ core_modules/         business logic
        β”‚   β”œβ”€β”€ system            CPU / RAM / uptime
        β”‚   β”œβ”€β”€ network           network status
        β”‚   β”œβ”€β”€ keepalive         caffeinate wrapper
        β”‚   β”œβ”€β”€ proxy             proxy / VPN detection
        β”‚   └── agents/           claude Β· codex Β· cursor
        β”œβ”€β”€ commands/             Tauri IPC handlers
        └── models/               shared types

Tech stack: Rust (Tauri 2, ratatui 0.29, clap 4, rusqlite, reqwest, sysinfo 0.32, tokio, chrono) Β· SvelteKit 2 + Svelte 5 + Vite 6 + TypeScript.

Development

# Install frontend dependencies
npm install

# Run the GUI in dev mode (hot reload)
npm run tauri dev

# Build the production app bundle
npm run tauri build

Run the CLI or TUI directly from source without building the app:

# CLI
cargo run --manifest-path src-tauri/Cargo.toml -- status
cargo run --manifest-path src-tauri/Cargo.toml -- usage --json

# TUI
cargo run --manifest-path src-tauri/Cargo.toml -- tui

Run the test suite:

cargo test --manifest-path src-tauri/Cargo.toml

Contributing

Contributions are welcome and appreciated! Whether it's a bug report, a feature idea, a new agent integration, or a docs fix:

  1. Open an issue to discuss larger changes.
  2. Fork the repo and create a feature branch.
  3. Make your change and run cargo test (and npm run tauri build if touching the GUI).
  4. Open a pull request.

Friendly, focused PRs get merged fastest. Thanks for helping make Agent Hub better.

Acknowledgements

Inspired by steipete/CodexBar β€” a great take on surfacing agent status in the macOS menu bar.

License

Released under the MIT License. Β© xiaoleiy.

About

Manage AI coding agents on your macOS machine

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors