Browse docsGlance
A quiet view of local activity.
Glance is an optional local macOS companion to the aibill CLI. It renders supported Claude Code and Codex evidence and stays hidden until the pointer reaches the menu bar. It does not display hosted Workspace reports.
Updated October 3, 2026
01 · Availability
Source preview only
For shared team reports, use Workspace. Glance is a separate source preview. Current source-build requirements are macOS 14 or newer, Apple silicon, Swift/Xcode command-line tools, Node 22, and a built checkout of the public repository.
02 · Build
Run the local prototype
git clone https://github.com/futurastudio/ai-spend-agent.git
cd ai-spend-agent
npm ci
npm run build --workspace ai-spend-agent
./apps/glance-macos/scripts/build-app.shThe app is written to apps/glance-macos/dist/aibill Glance.app.
export AIBILL_GLANCE_COMMAND="$PWD/packages/cli/dist/index.js"
export AIBILL_NODE_PATH="$(command -v node)"
"$PWD/apps/glance-macos/dist/aibill Glance.app/Contents/MacOS/AibillGlance"AIBILL_GLANCE_COMMAND must be a filesystem path, not a shell command or a string with arguments. Glance never invokes a shell.
03 · Behavior
Hidden until it is useful
- At rest, no widget is visible. Moving into the top menu-bar strip reveals one stationary aibill wordmark to the left of the camera.
- Hovering the wordmark reveals the panel; moving away hides both surfaces. No click is required.
- Right-click offers refresh, launch-at-login, update check in release builds, and quit.
- The compact action remains two short lines. Copying it creates a session handoff; Glance never launches an agent or executes a change.
04 · Data contract
Claude Code and Codex only
Glance runs aibill glance --since-days 30 and consumes the same typed contract as the CLI and local MCP. It currently reads Claude Code and Codex data; Gemini is intentionally excluded from Glance.
- Session value is local token evidence multiplied by published API list rates—an estimate, not a subscription charge.
- Limit windows appear only when a transcript reports remaining percentage and reset metadata. Projected exhaustion is separately labeled as a local pace estimate.
- Main focus is the share of observed prompt/tool activity in the focus window, not elapsed time or spend. Raw prompts do not enter the JSON contract.
- The next action uses canonical Context Health, focus, and reported runway. It is not the fuller
npx aibill applyplan.
05 · Freshness
Updated is not the same as rescanned
Glance attempts a fresh local snapshot every 30 seconds. After 75 seconds without a successful snapshot, the data becomes explicitly stale. A failed refresh preserves the last good snapshot with its age, and copy is disabled for stale or failed evidence.
This differs from the Claude Code statusline: the statusline re-renders its cache about every 30 seconds but needs an explicit refresh or init to rescan transcript evidence. See statusline freshness.
06 · Customize
Keep one source of truth
The Swift view, panel controller, store, loader, and typed models are all public and MIT-licensed. Alternative menu-bar apps, Raycast extensions, widgets, or editor surfaces should consume aibill glance rather than adding a second transcript parser.
Preserve the same invariants: reported limits versus projected exhaustion, estimates versus billed cost, stale-state protection, activity-derived focus, no raw prompt in the UI contract, and deliberate copy/paste before an agent can act.