Commands

agent-commerce init

Interactively generate a config.yaml — validated before anything is written.

Usagebash
agent-commerce init [--output <path>] [--force] [--yes]

Options

--output <path>stringdefault: config.yaml
Where to write the file. Parent directories are created.
--forcebooleandefault: false
Overwrite an existing file. Without it an existing file stops the run.
--yesbooleandefault: false
Non-interactive defaults — required for scripts and tests.

Prompts

PromptDefault
Backend base URL (your existing merchant API)http://localhost:3000
Example resources to exposeWeather (free), Market report (paid)
Protocols to enableHTTP, MCP
Enable x402 payments?yes
Merchant settlement destination addressa 0x-prefixed 20-byte address — yours

Answers are validated in memory before anything is written. An invalid combination — an empty protocol selection, a malformed address, a scheme-less URL — writes nothing and reports the real configuration error.

Output

console
$ agent-commerce init
PASS  Wrote config.yaml
PASS  config.yaml is valid — 2 resource(s)

Next steps:
  agent-commerce validate --config config.yaml
  docker compose up     # start the local demo stack (from a repo clone)
  agent-commerce doctor --config config.yaml
Existing fileconsole
$ agent-commerce init
FAIL  config.yaml already exists. Re-run with --force to overwrite.