ReferenceCLI

vx init

Prepare the current project to be orchestrated by vexillum

Prepare the current project to be orchestrated by vexillum.

Usage:
  vx init [--yes] [--lang en|es] [--skills | --no-skills]
         [--commander claude|pi|opencode]...

init gives the project's agent the commander rules and the tools to use
vexillum well. Before it writes anything it lists the files of yours it will
change and asks for consent (Continue? [Y/n]):

  AGENTS.md              gets a block managed by vexillum with the always-on
                         commander core
  CLAUDE.md              gets the line @AGENTS.md so Claude Code sees that
                         block (created if missing; an existing one is edited
                         only after a second question)
  .claude/settings.json  gets the sentinel Stop hook, a one-line command that
                         finds vx without relying on the PATH of the hook's shell

When the project has no AGENTS.md, init proposes putting the block in CLAUDE.md
instead of creating an AGENTS.md (the default answer; CLAUDE.md is created if
it does not exist, and then needs no @AGENTS.md line). Answer no to create
AGENTS.md as above. A block that already lives in CLAUDE.md stays there.

OpenCode reads AGENTS.md first and CLAUDE.md only when there is no AGENTS.md. So
with an opencode commander, a project that has neither file gets the block in a
new AGENTS.md without the question, and init warns (it changes nothing) when
the block is in a CLAUDE.md that an AGENTS.md hides from OpenCode. OpenCode
already reads the skills in .claude/skills/, so it needs nothing else in the
project: the sentinel wakes it from outside, through its HTTP API.

The block is written in the language it detects in the file that holds it
(English when it cannot tell); you confirm or override it. Then init asks
"Install the vexillum, forum and muster skills?" and, if you accept, writes
them to .claude/skills/. It also writes vexillum's own files under .vexillum/
(config.json, models.json, .gitignore); an existing models.json is never
overwritten. Running init again changes nothing that is already in place.

The commander can run in Claude Code, Pi or OpenCode, and one project can have
several (--commander, repeatable, claude by default). They are recorded in
.vexillum/config.json, which is what doctor reads to know which binary the
project needs. The CLAUDE.md import and the sentinel Stop hook above are
Claude Code's, so init writes them only when claude is one of the commanders.

A pi commander is woken by an extension instead of a Stop hook. For it init
writes .pi/extensions/vexillum-wake.ts (built into the binary: it runs the
sentinel's await as a child of Pi and hands a wake to the model as a message,
and does nothing in a soldier's camp) and adds ../.claude/skills to "skills" in
.pi/settings.json, so Pi sees the vexillum, forum and muster skills. Both are
committed with the project; upgrade keeps the extension current. Pi asks
"Trust project folder?" the first time you run it in the folder: answer Trust
once (until then neither loads); doctor shows where it stands.

Without a terminal (scripts, CI) init asks nothing and does nothing unless
--yes is given; without it, it prints what it would change and exits with an
error.

Flags:
  --yes, -y       Accept every question, including putting the block in
                  CLAUDE.md when there is no AGENTS.md, editing an existing
                  CLAUDE.md and installing the skills.
  --lang en|es    Language of the block, instead of detecting it.
  --skills        Install the skills without asking.
  --no-skills     Do not install the skills, without asking.
  --commander H   A harness the commander runs in: claude, pi or opencode.
                  Repeat it for several. Without it, init keeps what
                  .vexillum/config.json records (claude for a new project).