init

A setup command that creates the folder structure and configuration for a px0 store, a local project workspace, and installs starter workflows and guidelines.

In plain words
What is it for?
Use it to create a new store, choose a supported coding-agent command, and take its first version snapshot.
Why use it?
It removes the need to build the workspace by hand and gives the coding agent a configured place to work.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/px0-ai/px0/init
Clone the repo
git clone --depth 1 https://github.com/px0-ai/px0
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00644
Opus 5 $0.00000 $0.00322
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00064

Measured 2d ago against content hash 5fd9882eb2ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/init.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

px0 init

Scaffold a store: create the folder layout, write config.toml, install the starter workflows and guidelines, and take the first version snapshot.

Implemented by px0/store.py (store.init), driven by cli.cmd_init.

px0 init [dir] [--harness {claude,gemini,opencode,pi}] [--composio-key KEY]

Arguments

dir

Optional. Where to create the store.

  • Input: a filesystem path.
  • Default: $PX0_HOME if set, else ~/.px0.
  • Created if it does not exist. Running against an existing store is safe: it fills in anything missing and leaves everything else alone.
px0 init                      # ~/.px0
px0 init ~/work/px0-store     # somewhere else
PX0_HOME=/tmp/scratch px0 init

Options

--harness {claude,gemini,opencode,pi}

Which coding-agent CLI to use as the model backend. Written to model.harness_cmd in the generated config.toml.

  • Input: one of claude, gemini, opencode, pi. Each expands to that agent's full non-interactive invocation.
  • Default: claude, which expands to claude -p.
  • To use something not on the list, set the full command afterwards with px0 config set model.harness_cmd "<command>".
px0 init --harness gemini

--composio-key KEY

Composio API key, used to authorize the external apps workflows call. Verified against Composio before being saved.

  • Input: a Composio API key string.
  • Default: none. If omitted, init prompts for one interactively; you can skip the prompt and add it later with px0 config composio.
  • Stored in connectors.composio_api_key. px0 store export redacts it, along with its version history.
px0 init --composio-key ak_...

What it creates

<store>/
  workflows/          starter workflows
  guidelines/         starter guidelines
  brain/{docs,blogs,papers,work}/
  output/
  .state/{index,ingest}/
  .state/schema       the on-disk schema version
  config.toml

Output

Lists what was created, then points at the next step. It closes by mentioning that brain.path can point at an existing Markdown folder — see px0 brain.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 86 lines · 0 tokens per session scan A 5fd9882eb2ce

Subscribe to this mod's changes

init is a command published in the GitHub repository px0-ai/px0 (241 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 644 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.