CLI Reference
The weave command scaffolds, validates, and packages agents. Install the package (pip install -e . or make install) to get it on your PATH (inside the venv).
weave --version
weave --help
weave scaffold <name> [-d DIR]
Creates a starter agent file from a template.
weave scaffold my-agent # -> my_agent.py in the current dir
weave scaffold my-agent -d agents # -> agents/my_agent.py
- The name is slugified to a valid Python identifier for the filename.
- Refuses to overwrite an existing file.
weave validate <path>
Imports a module, discovers every BaseAgent instance in it, and prints each agent's manifest. Exits non-zero with an actionable error if the module has no agents or fails to load.
weave validate my_agent.py
# valid: my-agent {"name": "my-agent", "input_schema": {...}, ...}
# 1 agent(s) validated
weave package <path> [-o OUTPUT]
Builds a portable artifact (<module>.weave.zip by default) containing the agent source plus a manifest.json of all agents in the module, so a published agent is portable independent of any host.
weave package my_agent.py
# Packaged 1 agent(s) -> my_agent.weave.zip
weave package my_agent.py -o dist/agent.zip
Archive contents:
my_agent.weave.zip
├── my_agent.py
└── manifest.json # {"version": "1.0", "agents": [ ... ]}
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | a WeaveError (message printed to stderr with code + docs link) |