snipara-companion
snipara-companion is the Git-style continuity CLI for agent work. Use create-snipara to install and connect a project once, then use companion every session to check status, generate a brief, commit phases, write handoffs, and resume without rediscovering the repo.
create-snipara. Continue every session with snipara-companion. Hosted MCP remains the agent tool surface; companion keeps local workflow state durable and readable.Important
Most users should install companion through npx create-snipara.
For Codex, the primary integration is still Hosted MCP plus AGENTS.md. Companion adds compaction-safe workflow commands for longer work; use --profile hosted-only only when local helper tooling cannot be installed.
Git-style command model
Companion gives agents a familiar terminal model for work state. It does not version files; Git still does that. Companion versions the session state around the files: current phase, active goal, open decisions, risks, verification context, handoff notes, and where to resume.
| Git habit | Companion command | Agent work meaning |
|---|---|---|
git status | snipara-companion status | Current phase, goal, latest phase commit, risks, and next action |
git show | snipara-companion brief | Start Work Brief for the next agent action |
git commit | snipara-companion workflow phase-commit | Persist the phase summary and files touched |
git log | snipara-companion timeline | Recent workflow starts, phase starts, phase commits, final commits, and handoffs |
git format-patch | snipara-companion handoff | Agent-ready artifact for Claude to Codex to Cursor handover |
git checkout | snipara-companion workflow resume | Restore the next phase and carryover context |
When to use it
- You want a local status, timeline, and handoff layer for agent sessions.
- You want compaction-safe phase commits for multi-step work.
- You are targeting clients like Claude Code, Cursor, or Windsurf.
- You want the installed
snipara-companioncommand for local automation steps. - You want automatic routing from natural-language structural queries into
snipara_code_*tools.
When not to use it
- Do not install it just to connect an LLM. Use Hosted MCP for that.
- Do not use it as a replacement for Hosted MCP. Codex still uses hosted MCP config and
AGENTS.mdfor the agent tool surface. - Do not treat it as the same thing as
snipara-orchestratororsnipara-openclaw-hooks.
Install
npm install -g snipara-companionThe installed executable is snipara-companion.
What it adds now
- Agent work status:
snipara-companion statussummarizes the current phase, goal, latest phase commit, local risks, open handoffs, and next action. - Start Work Brief alias:
snipara-companion briefis the top-level shortcut for the Project Intelligence brief. - Timeline:
snipara-companion timelinegives the workflow log agents need before resuming someone else's session. - Handoff artifacts:
snipara-companion handoffwrites what changed, what was verified, what is risky, what remains, and where to resume. - Auto-follow structural recommendations:
snipara-companion query --follow-recommendationwill execute the recommendedsnipara_code_*tool when Snipara detects a structural code question. - Workflow presets:
snipara-companion workflow run --mode lite,--mode standard,--mode full, and--mode orchestratecover focused work, normal coding work, managed phases, and explicit hosted orchestration.autoremains a compatibility alias for STANDARD behavior. - Runtime hints: workflow runs suggest Snipara Sandbox for FULL, orchestrated, or execution-heavy work without executing Sandbox jobs themselves.
- Orchestrator handoff hints: companion can detect
snipara-orchestratorand point production-gate or htask work to it, but does not install it or spawn workers automatically. - Local readiness check:
snipara-companion doctorreports Snipara auth, Snipara Sandbox CLI, Sandbox MCP config, provider keys, Docker, and optional orchestrator availability. - Direct code graph access:
snipara-companion code callers,imports,neighbors, andshortest-path. - Local code overlays:
snipara-companion code status,sync,upload,hooks, andpromotemake local commits and dirty working-tree structure visible as non-canonical context while the hosted CODE graph catches up. - Safe parallel coding:
snipara-companion collaborationcommands publish presence, create leases, run guard checks, install blocking Git hooks, and keep active leases heartbeated while work is in progress. - Mini Snipara local bridges:
snipara-companion memory localdelegates to the opensnipara-memoryengine, whilesnipara-companion eval exportandeval runcreate and run localsnipara-evalscases. - Project-linked standards on demand:
snipara-companion shared-contextloads the shared collections linked to the current project instead of preloading every team rule on every session.
Context vs memory in companion
- Use context commands for source truth:
snipara-companion query,shared-context, andload-documentread documents, parsed business files, and linked guidance. - Use memory commands for durable state:
snipara-companion recallasks memory about past decisions and preferences, whilesnipara-companion session-bootstraprestores durable decisions, learnings, preferences, and short-lived carryover. - Commit memory after work:
snipara-companion task-commitstores only durable outcomes, not raw specs or copied documents. - Default rule: context first, memory second, task commit last.
Local code overlays
Hosted snipara_code_* tools remain canonical and answer from indexed CODE documents. Companion overlays cover the gap before a local commit or dirty working tree has been pushed and reindexed. They are marked canonical: false, have TTL expiry, redact the local absolute repo path before hosted upload, and never replace hosted project truth.
snipara-companion code status --jsonsnipara-companion code sync --working-tree --jsonsnipara-companion code upload --ttl-hours 4 --jsonsnipara-companion code hooks install --jsonsnipara-companion code promote --pushed-sha HEAD --request-reindex --jsonUse code upload when another agent or hosted workflow needs to see the same local overlay. Managed hooks run local sync and push-time promotion in the background by default; use code promote manually after push only when hooks or GitHub auto-sync are unavailable.
Safe parallel coding
Companion can coordinate humans and agents working in the same repository through hosted collaboration state: active sessions, resource leases, guard evaluations, conflict alarms, blocking Git hooks, and IDE-ready status JSON. Use it when overlap would be expensive, such as schema, deployment, auth, billing, package release, or heavily shared route work.
snipara-companion collaboration watch --summary "Refactor auth middleware" --files apps/web/src/lib/auth.tssnipara-companion collaboration claim --mode EXCLUSIVE --ttl-seconds 600 --resource FILE:apps/web/src/lib/auth.tssnipara-companion collaboration guard --profile pre-push --enforcesnipara-companion collaboration hooks installBlocking leases are time-bound. EXCLUSIVE and HARD_BLOCK leases default to a 300 second TTL when no explicit TTL is supplied. Heartbeats renew the expiry, and expired leases stop acting as active blockers. See Safe Parallel Coding for the full contract.
Mini Snipara local bridges
Companion also exposes thin bridges for the local open stack. These commands are useful when a team wants local memory or deterministic Project Intelligence eval cases without turning the hosted code graph into a local package.
snipara-companion memory local -- versionsnipara-companion eval export --summary "Implemented auth hardening" --verification "pnpm test" --output .snipara/evals/auth-hardening.jsonsnipara-companion eval run .snipara/evals/auth-hardening.json --strictQuick start
snipara-companion statussnipara-companion brief --task "add Jira issue-aware context" --changed-files src/context.tssnipara-companion timelinesnipara-companion handoff --summary "tests green" --next "run release checks"npx -y snipara-companion@latest query --query "who calls src.mcp_transport.handle_call_tool" --follow-recommendationnpx -y snipara-companion@latest workflow run --mode standard --query "map the auth callers"snipara-companion workflow run --mode full --no-runtime-hint --query "plan the auth refactor"snipara-companion workflow run --mode orchestrate --query "map rollout risks"snipara-companion doctorsnipara-companion code imports --file-path src/snipara_engine.pysnipara-companion shared-context --categories BEST_PRACTICES GUIDELINESsnipara-companion recall --query "What did we decide about auth retries?" --type decisionsnipara-companion session-bootstrap --include-session-context --max-context-tokens 1000snipara-companion task-commit --summary "Captured final RFP response playbook"Context hierarchy
- Project context first: companion stays scoped to the current workspace and project when it runs retrieval.
- Shared context through the project: team standards are pulled from the shared collections linked to that project, not from every collection in the team.
- No global team preload: reviewed memory and workspace defaults preload at session start; shared/team context is fetched when the task actually asks for standards, conventions, or compliance guidance.
- Memory does not replace retrieval: use memory for durable state, then go back to context when you need the exact source material.
Supported presets today
claude-codecursorwindsurf
Companion vs other packages
| Package | Use it for | Default? |
|---|---|---|
snipara-mcp | Local stdio bridge, OAuth login, client-package development, advanced testing | No. Hosted MCP is the default agent path |
create-snipara | One-command Context + Memory onboarding, auth, config, and companion helpers | Use when guided setup is wanted |
snipara-companion | Git-style local continuity CLI: status, brief, timeline, phase commits, handoffs, resume, and workflow modes | Installed by create-snipara |
snipara-orchestrator | Production validation, proofs, drift detection, htasks, orchestration | No |
snipara-openclaw-hooks | OpenClaw-specific automation | Only for OpenClaw |
Should companion and orchestrator merge?
No. snipara-companion is a local npm CLI centered on hook workflows and local workflow ergonomics. snipara-orchestrator is a Python package for advanced production validation, htasks, and orchestration. Companion should call out the handoff when useful; it should not carry the orchestrator implementation or install it silently.
Recommended split
- Use Hosted MCP for the LLM agent connection.
- Use API / SDK for product workflows and backend automation.
- Use
snipara-companionwhen local terminal status, briefs, timelines, phase commits, handoffs, code graph routing, or workflow presets are useful. - Add Snipara Sandbox when the workflow needs local execution, tests, lint, or sandboxed validation. Companion can suggest Sandbox and diagnose local readiness, but Sandbox remains a separate execution layer.
- Reach for
snipara-orchestratoronly when you need proof-based validation, drift detection, hierarchical tasks, or production gates.