ANSI terminal dashboard and CLI for exploring your OpenCode database — sessions, tokens, costs, models, and project activity.
brew install woss/tap/ocvDownload the latest binary from Releases:
# Linux x86_64
curl -L https://github.com/woss/opencode-visualizer/releases/latest/download/ocv-x86_64-linux.tar.gz | tar xz
./ocv# Linux ARM64 (e.g. Raspberry Pi)
curl -L https://github.com/woss/opencode-visualizer/releases/latest/download/ocv-aarch64-linux.tar.gz | tar xz
./ocv# macOS ARM64 (Apple Silicon)
curl -L https://github.com/woss/opencode-visualizer/releases/latest/download/ocv-aarch64-macos.tar.gz | tar xz
./ocvdeno install --allow-read --allow-write --allow-env --allow-ffi -n ocv main.tsdeno task compile # Produces ./ocvCross-compile for other platforms:
deno task compile-all # Produces ocv-x86_64-linux, ocv-aarch64-macos, ocv-aarch64-linuxocv # Show per-directory session overview (default)
ocv stats # Detailed statistics
ocv dash # Dashboard with bars and charts
ocv dash --top=5 # Show top 5 items per section
ocv dash --exclude=simstore,infra # Exclude directories
ocv dash --name=surrealdb-orm,woss.io # Focus on specific directories
ocv dash --all # Show all items
ocv sessions <path> # List sessions matching directory path
ocv session <id> # Detailed info for a specific session
ocv search <query> # Search sessions by title or directory
ocv --help # Top-level help
ocv <command> --help # Per-command help
ocv --version # Show versionEvery command supports --output json (or -o json):
ocv stats --output json # Stats as JSON
ocv sessions <path> -o json # Sessions as JSON
ocv dash --output json # Dashboard data as JSON
ocv overview --output json # Overview as JSON
ocv search <query> --output json # Search results as JSONTwo ways to hide directories from the dashboard:
- CLI flag:
ocv dash --exclude=secret-company,infrastructure - Config file: Edit
~/.config/ocv/.ocvignorewith gitignore-style patterns:
# One pattern per line — gitignore-style globs
simstore # exact directory name
fork-* # glob: any directory starting with fork-
*site # glob: any directory ending with -site
!important-site # negation: re-include even if matched
Focus the dashboard on specific directories with --name:
ocv dash --name=surrealdb-orm,woss.ioWorks on all dashboard panels — directories, models, providers, weekly activity, and costs. The directory section adapts to show exactly the named directories (instead of the top N). Accepts comma-separated directory names (not paths).
The sessions and search commands show a "Type" column:
- Main — top-level session (no parent)
- Sub — subagent/delegated session (has a parent_id)
| Command | Description |
|---|---|
(no args) / overview |
Per-directory session overview table |
stats |
Full statistics: sessions (active/archived), projects, tokens, cost, most-used model, app version range |
dash |
ANSI dashboard with bars per directory, model, provider, weekly activity. Supports --top, --all, --name, --exclude |
sessions <path> |
Filtered session list matching a directory path |
session <id> |
Single session detail with messages and todo breakdown |
search <query> |
Full-text search over session titles and directories |
This project uses semantic-release with conventional commits. Version bumps are automatic based on commit messages:
| Commit message prefix | Version bump |
|---|---|
fix: ... |
Patch (1.0.0 → 1.0.1) |
feat: ... |
Minor (1.0.0 → 1.1.0) |
feat!: ... or fix!: ... with BREAKING CHANGE: in body |
Major (1.0.0 → 2.0.0) |
chore: ..., docs: ..., refactor: ..., ci: ... |
No release |
GitHub Releases are created automatically on push to main with compiled
binaries attached.
| Variable | Default | Description |
|---|---|---|
OPENCODE_DB_PATH |
~/.local/share/opencode/opencode.db |
Override the OpenCode database path |
Reads the OpenCode SQLite database (opencode.db) directly via @db/sqlite.
Queries aggregate token usage, session counts, model usage, version ranges, and
per-project activity from the session, message, and part tables. All data is
read-only — never writes to the database.
deno check main.ts # Type-check
deno lint # Lint all source files
deno compile --allow-read --allow-write --allow-env --allow-ffi --output ocv main.ts # Build binaryMIT
