Commands
agent-commerce init
Interactively generate a config.yaml — validated before anything is written.
agent-commerce init [--output <path>] [--force] [--yes]Options
--output <path>stringdefault: config.yamlWhere to write the file. Parent directories are created.
--forcebooleandefault: falseOverwrite an existing file. Without it an existing file stops the run.
--yesbooleandefault: falseNon-interactive defaults — required for scripts and tests.
Prompts
| Prompt | Default |
|---|---|
| Backend base URL (your existing merchant API) | http://localhost:3000 |
| Example resources to expose | Weather (free), Market report (paid) |
| Protocols to enable | HTTP, MCP |
| Enable x402 payments? | yes |
| Merchant settlement destination address | a 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
$ 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$ agent-commerce init
FAIL config.yaml already exists. Re-run with --force to overwrite.