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 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 |
GEMINI_DIR | ~/.gemini | Gemini CLI directory |
OPENCODE_DIR | ~/.local/share/opencode | OpenCode data 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