// Reference

CLI Reference

AgentPM command-line reference for setup, monitoring, collection, conversation search, and evidence inspection.

Documentation

CLI Reference

AgentPM command-line reference for setup, monitoring, collection, conversation search, and evidence inspection.

Top-level commands

These are the top-level commands implemented by the AgentPM CLI. Global flags can be passed before the command: --root, --url or --service-url, --read-url, and --org-code.

agentpm [--root DIR] [--url URL|--service-url URL] [--read-url URL] [--org-code CODE] COMMAND

agentpm init

Create local agent state and print the agent id, root, and service URL.

agentpm register

Register this local agent with the AgentPM service and print adoption details.

agentpm start

Register if needed, start the local collection daemon, and print the adoption or device-code instructions.

agentpm run

Run the collector in the foreground. Useful for debugging service and upload behavior.

agentpm stop

Stop the background collector daemon.

agentpm status

Show agent identity, connection state, daemon status, monitored homes, and sync health.

agentpm configure-homes

Select the home directories or project roots this install should monitor.

agentpm homes

Print the configured monitored homes.

agentpm monitor / unmonitor

Add or remove a monitored path after installation.

agentpm conv / conversations

Read-only access to visible conversation history. With no command, agentpm defaults to the conversation command.

agentpm session

Resolve the current local agent session for a checkout. Use session current to print the conversation id, candidate transcripts, and optional web URL.

agentpm usage

Report usage by day, week, month, or session, with filters for org, date range, model, owner, project, machine, agent, and source.

agentpm viewer

Open the interactive conversations TUI for humans using a real terminal.

agentpm collect

Run a one-shot scan and upload cycle. Useful for diagnostics.

agentpm upload

Upload one transcript file directly. Mostly useful for diagnostics or one-off recovery.

agentpm uninstall

Remove the local AgentPM service setup from the machine.

agentpm version

Print the installed AgentPM version, commit, and build date.

agentpm skill

Install or uninstall the bundled agentpm-conversations skill for coding agents.

Conversation commands

The conv family gives read-only access to visible conversation history. Add --json when scripting or when exact fields matter. The conversations alias is supported for the same command family.

agentpm conv [search|show|find|insights|project|tree|projects|work|git|trajectory|viewer]

agentpm conv work

Show recent work and advice for the current checkout. agentpm conv work [--org ORG] [--cwd DIR|--project KEY] [--json]

agentpm conv search

Search visible conversations by text, facets, file path, command, project, agent, date, or exact conversation id. agentpm conv search [--org ORG] [--limit N] [--offset N] [--json] [QUERY]

agentpm conv show

Inspect a conversation or a focused turn window. Text output summarizes large structured turns; use --json for exact payloads. agentpm conv show [--org ORG] [--turn N|--around N|--offset N] [--limit N] [--json] CONVERSATION_ID

agentpm conv find

Find matching turns inside one conversation. Multi-term searches require all terms, and nearby terms can produce passage hits. agentpm conv find [--org ORG] [--limit N] [--json] CONVERSATION_ID QUERY

agentpm conv insights

Fetch generated insights and keyframes for a conversation. agentpm conv insights [--org ORG] [--json] CONVERSATION_ID

agentpm conv project

Fetch project-level insights for conversations visible to this agent. agentpm conv project [--org ORG] [--cwd DIR|--project KEY] [--json]

agentpm conv tree

List visible conversation summaries for a cwd or project. agentpm conv tree [--org ORG] [--cwd DIR|--project KEY] [--limit N] [--json]

agentpm conv projects

Group visible conversations by cwd first, then project, which avoids provider-specific project-key splits. agentpm conv projects [--org ORG] [--cwd DIR|--project KEY] [--limit N] [--json]

agentpm conv git

Show git and pull-request activity connected to a conversation. Filter with --mutating-only, --pr, or --branch. agentpm conv git [--org ORG] [--mutating-only] [--pr N] [--branch NAME] [--json] CONVERSATION_ID

agentpm conv trajectory

Assemble cross-conversation evidence for a PR, branch, commit, cwd, project, or text query. --sha and --hash are accepted aliases for --commit. agentpm conv trajectory [--org ORG] [--cwd DIR|--project KEY] [--pr N] [--branch NAME] [--commit SHA] [--limit N] [--json] [QUERY]

agentpm conv viewer

Open the interactive conversations TUI for humans using a real terminal. Avoid this from a non-interactive agent session. agentpm conv viewer [PROJECT|CWD]

Search syntax

Conversation search uses the same syntax in the CLI and the UI search boxes. Search accepts plain text, quoted phrases, and structured key:value facets in one query.

  • Known facets: owner, user, agent, agent_id, agent-id, model, project, cwd, source, file, content, tool, tool_type, tool_location, tool_mutability, tool_privilege, tool_status, git_cmd, git_pr, git_pr_num, git_commit, git_branch, git_remote, tag, subagent, auxiliary, and is.
  • Truthy/falsey filters work for subagent and auxiliary: subagent:true, subagent:false, auxiliary:true, auxiliary:false. is:subagent and is:auxiliary are also supported.
  • file: and cwd: support substring matching and simple wildcards. An explicit file: filter is exclusionary: conversations with no file evidence do not match.
  • Exact conversation ids are special-cased. Searching for a single goc_... id resolves that conversation directly.

Plain text terms

Bare words are case-insensitive terms. Multiple terms are ANDed, so every term must be present somewhere in the matched conversation or turn.

Quoted phrases

Double quotes preserve a phrase as one literal term. A quoted token that contains a colon, such as "data:image/png;base64", is searched as text and is not treated as a facet.

Facets

Use unquoted key:value tokens to filter. Known facets are removed from the text query and applied as filters; unknown key:value tokens stay as literal text.

Dates

CLI accepts --date, --start, and --end. The UI search box also accepts day:YYYY-MM-DD and converts it to the same date filter.

Files and cwd

file: filters conversations or turns that accessed matching files. cwd: filters working directories. Both support simple wildcards such as file:*.go or cwd:*/agentpm.

Tool and git facets

Use tool:, tool_cmd:, tool_type:, tool_mutability:, tool_privilege:, tool_status:, git_cmd:, git_pr:, git_pr_num:, git_commit:, git_branch:, or git_remote: when you need source-linked operational evidence.

Search examples

These same query strings can be used in the product UI where conversation search is available. In the UI, day:YYYY-MM-DD maps to the date filter; in the CLI, use --date, --start, or --end.

agentpm conv search 'project:agentpm file:frontend/lib/docs-content.ts cli reference' --limit 10
agentpm conv search 'tool:Bash tool_mutability:mutating unsafe command' --json
agentpm conv search 'git_pr_num:73 git_branch:feat/homepage-v2-refresh'
agentpm conv search '"broker unavailable" user:@will project:thalosx'
agentpm conv search --start 2026-06-01 --end 2026-06-30 'content:image daily digest'

Project and file

project:agentpm file:frontend/lib/docs-content.ts cli reference

Risk and shell activity

tool:Bash tool_mutability:mutating unsafe command

Git evidence

git_pr_num:73 git_branch:feat/homepage-v2-refresh

Agent and model

agent:codex model:gpt-5 getting started

Humans and ownership

user:@will project:thalosx "broker unavailable"

Images and auxiliary work

content:image subagent:false daily digest

Common examples

Install and connect

curl -fsSL https://agentpm.dev/install.sh | bash agentpm start agentpm status

Install the AgentPM skill

agentpm skill install agentpm skill uninstall

Find the current session

agentpm session current --cwd . --upload --json

Search from the terminal

agentpm conv search 'project:agentpm file:frontend/app auth' --limit 10 agentpm conv search goc_2ab07b7725377f0c08127576 --json

Read and inspect evidence

agentpm conv show --around 120 --limit 60 goc_... agentpm conv find goc_... 'DATABASE_URL' agentpm conv git --mutating-only goc_...

Follow a PR or branch

agentpm conv trajectory --pr 73 --limit 8 agentpm conv trajectory --branch feat/homepage-v2-refresh --json

Report usage

agentpm usage weekly --group project --since 2026-06-01 --json agentpm usage session --owner will --no-cost