Skip to main content

NAME

potpie — context-graph CLI for AI agents and local developer workflows.

SYNOPSIS

potpie [--json] [--verbose | -v] [--version] [--help] COMMAND [ARGS...]

DESCRIPTION

potpie is the primary interface for the Potpie context engine. It provisions a local daemon, manages workspace boundaries (pots), registers source systems, retrieves bounded context for coding tasks, and administers the underlying project-memory graph. The engine runs locally as a detached daemon or in-process. The same command surface routes to a managed backend when a managed pot is active.

GLOBAL OPTIONS

OptionDescription
--jsonEmit all output as machine-readable JSON.
--verbose, -vShow full tracebacks on errors.
--versionPrint version, Python version, and executable path, then exit.
--helpPrint help and exit. Available on every subcommand.

COMMANDS

setup

potpie setup [OPTIONS]
Idempotent first-run provisioning: config, storage, daemon, default pot, and agent skills. Safe to re-run. Presents an interactive wizard on TTYs.
OptionTypeDefaultDescription
--repoPATH.Repository path to register during setup.
--potNAMEdefaultInitial pot name to create or use.
--agentHARNESSclaudeAgent harness to configure (claude, codex, cursor, opencode).
--backendPROFILEfalkordb_liteGraph backend profile for this setup run.
--scanflagoffEnable source scanning during setup.
--dry-runflagoffPreview setup steps without executing them. Returns a SetupPreview.
--yes, -yflagoffAssume yes for all prompts (non-interactive).
--daemon / --in-processflagdaemonProvision a detached daemon or run in-process.

status

potpie status [OPTIONS]
Integration auth status by default. Use --host for daemon, pot, backend, and skills readiness.
OptionDefaultDescription
--verifyoffVerify integration credentials with a lightweight API check.
--hostoffShow host-level readiness instead of integration auth.
--intentfeatureIntent for host-status shaping. Only with --host.
--harnessclaudeHarness for host-status checks. Only with --host.
--potactivePot scope. Only with --host.

doctor

potpie doctor
Run a full local diagnostic: daemon mode and health, CLI install paths, backend profile and capability readiness, active pot, and ledger binding.

whoami

potpie whoami
Print the currently authenticated identity, mode (local or managed), and detail. Local installs report a none identity.

resolve

potpie resolve TASK [OPTIONS]
Pull bounded context for a task description. Takes a natural-language task, queries the project-memory graph, and returns a scoped context envelope.
ArgumentRequiredDescription
TASKyesNatural-language description of the coding task.
OptionDefaultDescription
--intentfeatureIntent family: feature, debug, review, ops.
--includenoneComma-separated include families (e.g. architecture,dependencies).
--modefastRetrieval depth: fast, balanced, verify, deep.
--potactivePot scope.
potpie search QUERY [OPTIONS]
Narrow follow-up lookup on a known phrase, symbol name, or entity.
ArgumentRequiredDescription
QUERYyesA known phrase, symbol name, file path, or entity to look up.
OptionDefaultDescription
--includenoneComma-separated include families.
--potactivePot scope.

record

potpie record [OPTIONS]
Write a durable project learning to the graph.
OptionRequiredDescription
--typeyesRecord type: decision, fix, preference, constraint.
--summaryyesShort summary of the learning.
--scopenoStructured scope as key:value pairs, comma-separated (e.g. service:inventory-svc).
--potnoPot scope. Defaults to active pot.

use

potpie use REF [OPTIONS]
Set the active pot by name or id. Top-level alias for potpie pot use.
OptionDescription
--localForce selection of a local-origin pot.
--managedSelect a managed-origin pot.

login

potpie login [OPTIONS]
Sign in to Potpie. Opens a browser-based session by default, or stores an API key with --api-key.
OptionDescription
--api-key, -kPotpie API key. Skips browser login.
--url, -uPotpie API base URL. Only with --api-key.

logout

potpie logout
Remove Potpie account credentials from local storage.

ui

potpie ui [OPTIONS]
Launch the local graph-explorer UI served by the daemon.
OptionDefaultDescription
--open / --no-open--openOpen the explorer in the default browser.
--potnoneOpen the explorer against a specific pot.

COMMAND GROUPS

pot

potpie pot SUBCOMMAND [OPTIONS]
Manage workspace boundaries. A pot is a named scope that groups sources, graph data, and agent context.
SubcommandDescription
listList all pots.
infoShow the active pot.
create NAMECreate a new pot.
use REFSet the active pot.
linkedShow pots linked to the current repo.
rename REF NEW-NAMERename a pot.
reset [REF] --confirmReset graph state for a pot.
archive REFArchive a pot.
default showShow repo-local default pot.
default set REFBind the current repo to a default pot.
default clearRemove repo-local default binding.
linear-team diff-sync TEAMIncremental Linear team graph diff-sync.
jira-project diff-sync PROJECTIncremental Jira project graph diff-sync.

source

potpie source SUBCOMMAND [OPTIONS]
Register and inspect source systems within a pot. source add records metadata only — it does not ingest or scan.
SubcommandDescription
add KIND LOCATIONRegister a source (repo, github, or document).
listList sources for the active pot.
status SOURCE_IDInspect one source record.
remove SOURCE_IDRemove a source record.

github

potpie github SUBCOMMAND [OPTIONS]
SubcommandDescription
login [--force]Authenticate with GitHub (device flow).
logoutRemove stored GitHub credentials.
reposList accessible GitHub repositories.

linear

potpie linear SUBCOMMAND [OPTIONS]
SubcommandDescription
login [--force] [--add]Authenticate with Linear (PKCE OAuth). --add connects an additional workspace.
logout [--all]Remove stored Linear credentials. --all removes all workspaces.
ls [--limit N]List connected Linear workspaces.
select [--org ORG] [--key KEY] [--limit N]Select a team and fetch issues.

jira

potpie jira SUBCOMMAND [OPTIONS]
SubcommandDescription
login [--force] [--email EMAIL] [--api-token TOKEN] [--site-subdomain SUB]Authenticate with Jira using an Atlassian API token.
logoutRemove stored Jira credentials.
ls [--limit N]List connected Jira projects.
select [--key KEY] [--limit N]Select a project and fetch issues.

confluence

potpie confluence SUBCOMMAND [OPTIONS]
SubcommandDescription
login [--force] [--email EMAIL] [--api-token TOKEN] [--site-subdomain SUB]Authenticate with Confluence using an Atlassian API token.
logoutRemove stored Confluence credentials.
ls [--limit N]List connected Confluence spaces.
select [--key KEY] [--limit N]Select a space and fetch pages.

daemon

potpie daemon SUBCOMMAND
Local daemon lifecycle. These are recovery and inspection tools; normal use does not require them.
SubcommandDescription
startStart the detached daemon.
statusPrint daemon PID, uptime, mode, and health.
logs [--follow]Print daemon logs. --follow tails in real time.
restartRestart the daemon.
stopStop the daemon.

service

potpie service SUBCOMMAND
Control supporting services managed by the daemon. Only meaningful when a detached daemon is running.
SubcommandDescription
up NAMEStart a named supporting service.
down NAMEStop a named supporting service.
statusList all managed services and their status.
logs NAME [-f]Print logs for a named service. -f tails in real time.

ledger

potpie ledger SUBCOMMAND [OPTIONS]
Inspect and manage the Event Ledger binding and consumer cursor.
SubcommandDescription
statusShow ledger binding and availability.
use BINDING [URL]Bind a ledger: managed or self-hosted <url>.
disconnectClear the Event Ledger binding.
query [OPTIONS]Inspect ledger event history. Read-only; does not advance the cursor.
pull --source SOURCEPull events and advance the consumer cursor.
sources list [--pot]List ledger source connectors for a pot.
ledger query options:
OptionDescription
--sourceFilter by source ID.
--typeNormalized event kind filter.
--sinceISO 8601 instant lower bound.
--untilISO 8601 instant upper bound.
--limitMaximum events. Default: 100.
--potPot scope.

graph

potpie graph SUBCOMMAND [OPTIONS]
Graph workbench: reads, writes, quality checks, inbox, and administration.
SubcommandDescription
status [--pot]Graph data-plane readiness and health.
catalog [--subgraph] [--profile] [--format] [--pot]Discover graph contract: versions, views, mutation ops, ontology.
describe SUBGRAPH [--view VIEW] [--examples] [--pot]Describe a subgraph or named view.
read --subgraph SUB --view VIEW [OPTIONS]Read over a named view.
search-entities QUERY [OPTIONS]Resolve entity or claim identity.
neighborhood --entity KEY [OPTIONS]Read a local neighborhood around an entity. --entity is required.
propose [--file FILE] [--ttl TTL] [--pot]Stage a validated graph mutation plan. --ttl sets plan expiry (e.g. 1h, 2d).
commit PLAN_ID [--verify] [--approved-by USER] [--pot]Commit a staged plan. --verify runs post-commit quality checks.
mutate [--file FILE] [--dry-run] [--allow-review-required] [--approved-by USER] [--pot]Validate and apply a semantic mutation in one step.
mutation-template --kind KINDPrint a schema-only mutation skeleton.
nudge --event EVENT --session ID [OPTIONS]Deterministic event-to-action policy: inject context, prompt a write, or stay silent.
history [OPTIONS]Inspect graph mutation history.
inspect [OPTIONS]Inspect graph internals or raw payloads.
inbox addAdd a pending work item.
inbox listList pending inbox items.
inbox showInspect one inbox item.
inbox claimClaim an inbox item for processing.
inbox mark-appliedMark an inbox item as applied.
inbox mark-rejectedMark an inbox item as rejected.
inbox closeClose an inbox item.
quality summary [--pot]Read-only quality summary report.
quality duplicate-candidatesFind likely duplicate entities.
quality stale-factsDetect stale claims.
quality conflicting-claimsSurface conflicting claims.
quality orphan-entitiesFind orphaned entities.
quality low-confidenceShow low-confidence graph material.
quality projection-driftDetect projection drift.
bulk apply [--file]Apply many semantic mutations in chunked propose/commit steps.
exportExport graph data.
importImport graph data.
repair [OPTIONS]Run graph repair flows.
graph read options:
OptionDefaultDescription
--subgraphCanonical subgraph (e.g. debugging). Required.
--viewNamed view within --subgraph. Required.
--querynoneText filter for the view.
--scopenonekey:value[,key:value] scope hints.
--currentoffResolve pot from the current repo directory. Does not add repo scope.
--repononeRepo scope: owner/repo, URL, or current.
--since / --untilnoneISO 8601 instant time bounds.
--time-windownoneRelative lookback: 24h, 7d, 2w. Ignored when --since is set.
--environmentnoneEnvironment filter.
--source-refnoneExact claim source ref (repeatable).
--depthnoneTraversal depth for neighborhood views.
--directionnoneout, in, or both.
--limit12Maximum items.
--sortautoauto, score, occurred_at.
--dedupeautoauto, none, source_ref, activity.
--formatautoauto, raw, events, table, jsonl.
--detailcompactcompact or full.
--relationssummarysummary or full.
--potactivePot scope.
graph search-entities options:
OptionDescription
--typeEntity label filter (e.g. Service).
--predicatePredicate filter.
--subgraphSubgraph filter.
--scopeScope hints in key:value form.
--truthTruth-value filter.
--source-systemSource system filter.
--source-familySource family filter.
--external-idExternal ID filter.
--source-refExact claim source ref (repeatable).
--since / --untilISO 8601 instant time bounds.
--environmentEnvironment filter.
--supporting-claims NNumber of supporting claims to include. Default: 0.
--limitMaximum entities. Default: 10.
graph mutation-template supported --kind values: bug-fix · decision · feature · infra-snapshot · preference · preference-policy · repo-baseline · timeline-change · timeline-event

timeline

potpie timeline SUBCOMMAND [OPTIONS]
SubcommandDescription
recent [OPTIONS]Recent project events from the active pot across all repo sources.
timeline recent options:
OptionDefaultDescription
--querynoneText query filter.
--since / --untilnoneISO 8601 instant bounds.
--time-windownoneRelative lookback (e.g. 7d).
--servicenoneService scope. Omit for project-wide results.
--limit12Maximum events.
--formatautoauto, events, table, raw, jsonl.
--detailcompactcompact or full.
--relationssummarysummary or full.
--potactivePot scope.

backend

potpie backend SUBCOMMAND
Graph backend profile selection and health checks.
SubcommandDescription
listList available backend profiles.
statusShow current backend status and capabilities.
use PROFILESwitch the active backend profile.
doctorRun detailed backend readiness diagnostics.

skills

potpie skills SUBCOMMAND [OPTIONS]
Manage CLI-installed agent skills. Skills are installed into agent harnesses; they are not graph data and not additional agent tools.
SubcommandDescription
listList installed and available skills.
install [SKILL_ID]Install skill(s) for a harness.
update [--all]Update installed skills.
remove [SKILL_ID] [--all]Remove installed skills.
statusShow installed, missing, and outdated skill state.
add SOURCEAdd a skill source by path or URL.
Common options:
OptionDefaultDescription
--agentclaudeTarget agent harness.
--scopeglobalglobal or project. Auto-selects project when --path is set.
--pathnoneRepo path for project-scoped skill installation.

cloud

potpie cloud SUBCOMMAND
Managed profile and sync commands. All subcommands currently return a structured not-implemented response.
SubcommandDescription
loginManaged profile login.
statusCloud sync status.
push [--pot]Push local pot state to cloud.
pull [--pot]Pull cloud state to local.
skills sync [--agent]Sync managed skill catalog into a harness.

config

potpie config SUBCOMMAND
Read or write local configuration entries. Persisted to ~/.potpie/config.json.
SubcommandDescription
listList all non-secret config entries.
get [KEY]Print a single value, or all values if KEY is omitted.
set KEY VALUESet a configuration value.

telemetry

potpie telemetry SUBCOMMAND
Control product analytics and error reporting preferences.
SubcommandDescription
statusShow current telemetry status (crash reports, analytics).
enableEnable anonymous CLI telemetry.
disableDisable all outbound CLI telemetry.

EXIT STATUS

CodeMeaning
0Success.
1General error or validation failure. Use --verbose for traceback.
2Service unavailable — daemon or backend not reachable.
3Degraded — completed with one or more non-fatal failures.
4Authentication error.

ENVIRONMENT

VariableDescription
CONTEXT_ENGINE_HOST_MODEOverride host mode: daemon (default) or in_process.
POTPIE_HOMEOverride the default config and data directory.
NO_COLORDisable ANSI colour output.

FILES

PathDescription
~/.potpie/config.jsonMain configuration file.
~/.potpie/credentials/Stored integration tokens (GitHub, Linear, Jira, Confluence).
~/.potpie/data/Local graph storage and ledger data.
~/.potpie/skills/Installed agent skill bundles.
.potpie.tomlRepository-local pot routing config (repo root).

EXAMPLES

# Install and run first-time setup
uv tool install potpie
potpie setup --repo . --agent claude

# Preview setup without executing
potpie setup --dry-run

# Check integration auth; verify credentials live
potpie status
potpie status --verify

# Check host readiness (daemon, pot, graph, skills)
potpie status --host

# Run full local diagnostics
potpie doctor

# Connect GitHub and register a repository
potpie github login
potpie source add repo .

# Connect Linear and list workspaces
potpie linear login
potpie linear ls

# Connect Jira (non-interactive)
potpie jira login --email me@corp.com --api-token ATATT... --site-subdomain myteam

# Retrieve context for a task
potpie resolve "add rate limiting to the /api/payments endpoint"

# Retrieve context with deep mode and JSON output
potpie resolve "trace all callers of AuthService.verify" --mode deep --json | jq '.items'

# Narrow search for a known entity
potpie search "RateLimiter"

# Record a project decision
potpie record --type decision --summary "All new endpoints must use the shared rate-limiter middleware"

# Switch pots and read the graph
potpie use my-other-pot
potpie graph catalog
potpie graph read --subgraph architecture --view service_map

# Resolve entity identity before a write
potpie graph search-entities "AuthService" --type Service --supporting-claims 3

# Read recent timeline events
potpie timeline recent --time-window 7d --format events

# Install skills for a harness
potpie skills install --agent claude
potpie skills status --agent cursor --scope project --path .

# Launch the local graph UI
potpie ui

# Ledger: bind and query
potpie ledger status
potpie ledger query --source github --type push --since 2026-06-01T00:00:00Z --limit 20

SEE ALSO