CLI Reference
Commands
agentsview / agentsview serve
Start the HTTP server with embedded web UI.
agentsview [flags]agentsview serve [flags]| Flag | Default | Description |
|---|---|---|
-host | 127.0.0.1 | Host to bind to |
-port | 8080 | Port to listen on |
-no-browser | false | Don’t open browser on startup |
The server auto-discovers an available port if 8080 is busy.
Examples:
agentsview # defaultsagentsview -port 9090 # custom portagentsview -host 0.0.0.0 # bind to all interfacesagentsview -host 0.0.0.0 -no-browser # headless modeOn startup, the server:
- Loads or creates
~/.agentsview/sessions.db - Runs initial sync across all discovered session directories
- Starts the file watcher (500ms debounce)
- Starts periodic sync (every 15 minutes)
- Serves the Svelte SPA and REST API
agentsview sync
Run the sync engine to populate the database, then exit without starting the HTTP server. Useful for scripting, CI, or refreshing data after config changes.
agentsview sync [flags]| Flag | Default | Description |
|---|---|---|
-full | false | Force a full resync regardless of data version |
Examples:
agentsview sync # incremental sync and exitagentsview sync -full # full resync and exitAfter syncing, a summary of session and message counts is printed to stdout.
agentsview prune
Delete sessions matching one or more filters. At least one filter is required.
agentsview prune [flags]| Flag | Default | Description |
|---|---|---|
-project | Sessions whose project contains this substring | |
-max-messages | -1 | Sessions with at most N messages |
-before | Sessions that ended before this date (YYYY-MM-DD) | |
-first-message | Sessions whose first message starts with this text | |
-dry-run | false | Show what would be pruned without deleting |
-yes | false | Skip confirmation prompt |
Examples:
# Preview what would be deletedagentsview prune -project "scratch" -dry-run
# Delete short sessions from before 2025agentsview prune -max-messages 2 -before 2025-01-01
# Delete sessions starting with a specific messageagentsview prune -first-message "test" -yes
# Combine filters (AND logic)agentsview prune -project "old-project" -max-messages 5 -before 2025-06-01The prune command displays the number of sessions deleted and
disk space reclaimed. Use -dry-run first to verify the filter
matches what you expect.
agentsview version
Print the version, git commit, and build date.
agentsview versionagentsview v0.1.0 (abc1234) built 2025-01-15agentsview help
Print usage information.
agentsview helpEnvironment Variables
| Variable | Default | Description |
|---|---|---|
CLAUDE_PROJECTS_DIR | ~/.claude/projects | Claude Code projects directory |
CODEX_SESSIONS_DIR | ~/.codex/sessions | Codex sessions directory |
COPILOT_DIR | ~/.copilot | Copilot CLI sessions directory |
CURSOR_PROJECTS_DIR | ~/.cursor/projects | Cursor transcripts directory |
GEMINI_DIR | ~/.gemini | Gemini CLI directory |
OPENCODE_DIR | ~/.local/share/opencode | OpenCode data directory |
AMP_DIR | ~/.local/share/amp/threads | Amp threads directory |
VSCODE_COPILOT_DIR | (platform-specific) | VS Code Copilot sessions directory |
OPENCLAW_DIR | ~/.openclaw/agents | OpenClaw agents directory |
PI_DIR | ~/.pi/agent/sessions | Pi sessions directory |
IFLOW_DIR | ~/.iflow/projects | iFlow projects directory |
AGENT_VIEWER_DATA_DIR | ~/.agentsview | Data directory (database, config) |
Environment variables override the built-in defaults. Set them in your shell profile or pass them inline:
AGENT_VIEWER_DATA_DIR=/tmp/av-test agentsview