Published · npm latest v0.9.7

Gemini CLI · experimental, fixture-verified, financial-only

aibill documentation

A quiet monitor, not a second engine.

Glance is a native hover surface below the Mac camera area. It renders the shared aibill JSON contract and stays hidden until the pointer reaches the menu bar.

Updated August 27, 2026

01 · Availability

Source preview only

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

Terminal
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.sh

The app is written to apps/glance-macos/dist/aibill Glance.app.

Launch against this checkout
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 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 apply plan.

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.