Agent Status Tmux banner
jimmyliao jimmyliao

Agent Status Tmux

AI community

Description

Display AI coding agent usage (Claude Code + Gemini CLI) in tmux status bar

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

agent-status-tmux

Display AI coding agent usage (tokens, cost, duration) in your tmux status bar. Supports **Claude Code** and **Gemini CLI** simultaneously.

![tmux status bar showing Claude and Gemini usage](screenshot.png)

◆ claude │ 8% │ 80k │ $3.50 │ 22m │ 5h:12% 7d:32%  ◇ gemini │ 1% │ 9k │ ~$0.01 │ 2m

Quick Start

**One-liner** (no git clone needed):

curl -fsSL tmux.jimmyliao.net/install | bash

Or manually:

git clone https://github.com/jimmyliao/agent-status-tmux.git
cd agent-status-tmux
./scripts/install.sh

That's it. Every tmux session (`tmux new -s xxx`) will automatically show AI status. Works whether your status bar is at the top or bottom.

Installs to `~/.agent-status-tmux` by default. Override with `AGENT_STATUS_TMUX_DIR=/your/path`.

Requirements

  • tmux >= 3.2 (hex color #[fg=#rrggbb] support; tested on 3.4–3.6)
  • jq
  • Claude Code and/or Gemini CLI

Features

  • Real-time token usage, cost, and session duration in tmux status-right
  • Claude Code: context %, tokens, actual cost, duration, rate limits (5h/7d)
  • Gemini CLI: context %, tokens, estimated cost, duration
  • Shows both providers simultaneously when both are active
  • Process-aware: detects running AI sessions, not just stale cache files
  • Gemini CLI Extension with AfterAgent/SessionStart hooks
  • Fallback: direct-reads Gemini chat recordings when hooks are unavailable
  • Tokyo Night color scheme (customizable)

Installation Details

git clone https://github.com/jimmyliao/agent-status-tmux.git
cd agent-status-tmux
./scripts/install.sh

The install script will:

  1. Create cache directory (~/.cache/ai-usage/)
  2. Patch ~/.claude/statusline.sh to write session data (with backup)
  3. Update ~/.tmux.conf to display AI status (with backup)
  4. Link the Gemini CLI extension (if Gemini CLI is installed)
  5. Reload tmux config

All modifications are idempotent and create ti