Weave

CLI Reference

The weaveflow command scaffolds, validates, and packages agents. Install the package (pip install -e . or make install) to get it on your PATH (inside the venv).

weaveflow --version
weaveflow --help

weaveflow scaffold <name> [-d DIR]

Creates a starter agent file from a template.

weaveflow scaffold my-agent            # -> my_agent.py in the current dir
weaveflow 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.

weaveflow 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.

weaveflow validate my_agent.py
# valid: my-agent {"name": "my-agent", "input_schema": {...}, ...}
# 1 agent(s) validated

weaveflow 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.

weaveflow package my_agent.py
# Packaged 1 agent(s) -> my_agent.weave.zip

weaveflow 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

CodeMeaning
0success
1a WeaveError (message printed to stderr with code + docs link)