agentleFS
Spoon94Spoon94/skill-vault/agentsview-cli/SKILL.md

agentsview-cli

Skill5 starsChanged 3 months agoMITView on GitHub

Use when running or scripting the agentsview CLI from the command line — querying, searching, syncing, exporting, or reporting on local AI agent session history. Triggers for cost/usage reports, session search and resume, archive sync, prune/import/export, secret scans, pg/duckdb mirroring, the MCP server, or any `agentsview <command>` invocation, even when the user never says "agentsview" and just asks "what did I spend on Claude this week" or "find where I fixed that timeout". Do NOT use for developing the agentsview codebase itself (parsers, storage, frontend, server internals) — this skill covers CLI usage only.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a writable daemon is known but unreachable, write commands refuse rather than double-write.

    line 113
  2. Distinctive:

    Treat output as sensitive.

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AgentsView CLI

AgentsView syncs sessions from local AI coding agents (Claude Code, Codex, Cursor, Copilot, Gemini, and many more) into a local SQLite archive and exposes them through the agentsview binary plus a web UI. Everything is local; there are no accounts.

This skill covers the CLI surface only — how to run and script agentsview commands against the installed binary. It is not a guide to developing agentsview itself; for parser/storage/frontend work, follow the repo's AGENTS.md task routes instead. Full upstream docs live in this repo under docs/ (rendered at agentsview.io); the condensed references in references/ are enough for most CLI tasks.

Before You Run Anything

  1. Check the installed version. Features land release by release, so a binary installed via brew or the install script may be older than the docs describe. Run agentsview version first; if a command you need is missing from agentsview help, confirm it exists in the installed version before assuming the docs are wrong. In this repository the bleeding-edge CLI is also available via go run ./cmd/agentsview <command>.
  2. Data is only as fresh as the last sync. The archive is populated by sync. If results look missing or stale, run agentsview sync before concluding data does not exist. Freshness-sensitive commands (usage, token-use/session usage) sync on demand by default.
  3. Default to read-only operations. Commands that delete or rebuild data (prune, pg push --full, embeddings retire, recall imports) deserve a preview or explicit confirmation first.

Command Router

Want to...CommandDetails
Browse/list sessionssession listreferences/sessions.md
Resume recent worksession list --resumereferences/sessions.md
Read a session's messagessession messages <id>references/sessions.md
Search what was said/donesession searchreferences/sessions.md
Session metadata/signalssession get <id>, health [id]references/sessions.md
Tool calls in a sessionsession tool-calls <id>references/sessions.md
Per-session tokens/costsession usage <id>references/usage.md
Daily cost reportusage dailyreferences/usage.md
One-line today spendusage statuslinereferences/usage.md
Active time/concurrencyactivity reportreferences/usage.md
Workspace analyticsstatsreferences/usage.md
Refresh the archiveagentsview syncreferences/commands.md
Serve web UIagentsview serve / daemon startreferences/commands.md
List projectsagentsview projectsreferences/commands.md
Delete sessions by filteragentsview prune (use --dry-run first)references/commands.md
Import Claude.ai/ChatGPT exportagentsview import --type ... <path>references/commands.md
Export summaries/reportsexport sessions, export hour|day|digestreferences/commands.md
Secret leak scansecrets scan / secrets listreferences/commands.md
Semantic (meaning-based) searchembeddings build, --semantic/--hybridreferences/search.md
Durable knowledge layerrecall query/brief/...references/search.md
Mirror to PostgreSQLpg push / pg serve / pg servicereferences/remote-mcp.md
Mirror to DuckDBduckdb push / duckdb servereferences/remote-mcp.md
Expose history to assistantsagentsview mcpreferences/remote-mcp.md
Diagnose sync problemsagentsview doctor syncreferences/commands.md
Config file, data dir, agent dirs~/.agentsview/config.toml, env varsreferences/configuration.md

Core Workflow

agentsview version        # what is installed
agentsview sync           # refresh archive (safe, incremental)
agentsview session list --limit 10 --json

Searching history. Exact identifiers (error strings, paths, tool names) → substring/FTS search. Conceptual questions ("how did we handle X") → hybrid semantic search when the embedding index is set up, otherwise several short FTS probes. See references/sessions.md for modes and fallbacks.

agentsview session search "exact error text" --fts --json --limit 8
agentsview session search "deploy pipeline flaky" --hybrid --context 2 --json

Inspecting a hit. A search match is a lead. Center a message window on the match's ordinal before drawing conclusions:

agentsview session messages <session-id> --around <ordinal> --before 8 --after 8 --json

Costs. usage daily aggregates cost by day (30-day default window). session usage <id> gives one session's tokens and cost. Both read from the indexed archive; --offline skips the network pricing fetch.

Deleting. prune requires at least one filter and always preview first:

agentsview prune --project scratch --max-messages 2 --dry-run

Daemon Model (What Happens Under the Hood)

A detached daemon owns SQLite writes for the data directory. Read-only CLI commands attach to it when running, otherwise open SQLite read-only directly — so one-off reads stay fast and scripts never fight over the write lock. Commands that write or need fresh data (sync, session sync, usage, pg push, duckdb push) auto-start the daemon. Consequences:

  • Set AGENTSVIEW_NO_DAEMON=1 in CI/scripts that must never spawn a daemon; writes then require acquiring the write-owner lock directly.
  • The daemon self-exits after idle timeout (default 20m); long-lived integrations should tolerate it restarting.
  • If a writable daemon is known but unreachable, write commands refuse rather than double-write. Check agentsview daemon status.

Conventions

  • Structured commands accept --format json; --json is the alias. Prefer JSON when piping into scripts; human output is tuned for terminal reading.
  • Relative time windows use --since Nh|Nd|Nw|Nm|Ny — m means calendar months, not minutes. --date/--date-from/--date-to take YYYY-MM-DD.
  • --project, --agent, and --machine filters apply across most commands.
  • One-shot and automated sessions are excluded from session list and search by default; re-include with --include-one-shot / --include-automated.
  • Session IDs vary by agent: Claude UUIDs (550e8400-...), Claude subagents (agent-a86574e), prefixed forms (codex:my-session-id). Copy IDs from session list output rather than guessing.

Safety

  • Session archives contain prompts, file paths, and possibly credentials. Treat output as sensitive; never paste secrets from sessions into examples.
  • secrets list redacts by default; --reveal is localhost-only for a reason.
  • AGENTSVIEW_DATA_DIR redirects everything (db, config, logs) — useful for scratch experiments so the production archive is never touched.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.