More on the topic...
Generating detailed summary...
Failed to generate summary. Please try again.
agentsview lets you run a local web UI and CLI that indexes every AI coding agent session on your machine, stores them in SQLite (or DuckDB/PostgreSQL), and shows you token counts, costs, and usage patterns. You install it with a single script (curl https://agentsview.io/install.sh | bash), via Homebrew (`brew install --cask agentsview`), a Windows PowerShell command, or by pulling the Docker image (`ghcr.io/kenn-io/agentsview:latest`). On first launch it discovers sessions for Claude, Forge, Codex, OpenCode, etc., syncs them into a `~/.agentsview` data directory, and spins up a server at http://127.0.0.1:8080. You can daemonize it (`agentsview serve --background`), check status (`serve status`), or shut it down (`serve stop`). To expose beyond localhost—say through SSH port-forwarding or Codespaces—you restart with `--public-url` and, if needed, `--require-auth`.
The Docker examples cover everything from a simple container to production setups. A `docker-compose.prod.yaml` mounts session directories read-only, persists data in a named volume, and binds to loopback by default. If you want PostgreSQL instead of SQLite, set `PG_SERVE=1` and point `AGENTSVIEW_PG_URL` at your database. For high-performance analytics, you can push your SQLite archive into a DuckDB mirror inside the container, then serve it read-only. There’s even a Quack example that exposes the DuckDB mirror over an authenticated HTTP API for remote dashboards. All mounts must be explicit—if you omit a directory for an agent, its sessions won’t show up.
On the CLI side, `agentsview usage` replaces tools like ccusage. It gives sub-second summaries of token consumption and cost by model, date range, or agent (`daily`, `--breakdown`, `--since`, `--agent claude`). `agentsview session usage <id>` drills into a single session’s output tokens, peak context, and USD cost. JSON flags (`--json` or `--format json`) let you script these outputs. For higher-level analytics, `agentsview stats` outputs totals, session archetypes (quick, deep, marathon), distributions for duration or peak context, and even Git-based outcomes (commits, PRs) if you opt in. Everything runs locally, so there’s no external account or cloud dependency—just your data, your logs, your costs.
Questions about this article
No questions yet.