Generate runnable AI agent projects from markdown specs in the agent-deployments repo.
Project description
agent-scaffold
agent-scaffold generates runnable AI agent projects from markdown specs. It ships with bundled knowledge from agent-deployments — pick a recipe, target language, and framework, and the CLI assembles the relevant docs, asks Claude to emit a complete project, validates the response, and writes the files atomically into your destination of choice.
Install
The package is published on PyPI as agent-scaffold-cli (the CLI command itself is still agent-scaffold).
pipx install agent-scaffold-cli
# or
uv tool install agent-scaffold-cli
# or, for one-off use:
uvx --from agent-scaffold-cli agent-scaffold --help
Local development
git clone https://github.com/jagguvarma15/agent-scaffold
cd agent-scaffold
uv sync
Quickstart
export ANTHROPIC_API_KEY=sk-ant-...
agent-scaffold new
The bundled recipes work out of the box. To use a custom agent-deployments checkout instead:
export AGENT_SCAFFOLD_DEPLOYMENTS_PATH=/path/to/agent-deployments
agent-scaffold new
The interactive new flow walks you through:
- The path to your
agent-deploymentsrepo (default from config). - A recipe from
docs/recipes/*.md. - A target language (Python or TypeScript).
- A framework (e.g.
pydantic_ai,langgraph,vercel_ai_sdk, ornone). - A project name and destination directory.
You'll see a context summary, a generation step, a static validation pass, and a "next steps" footer with the smoke-check command.
Configuration
| Source | Variable / key | Purpose |
|---|---|---|
| Env | ANTHROPIC_API_KEY |
Required. The Anthropic API key used by the generator. |
| Env | AGENT_SCAFFOLD_DEPLOYMENTS_PATH |
Default path to your agent-deployments checkout. |
| Env | AGENT_SCAFFOLD_MODEL |
Override the model (default claude-opus-4-7). |
| Env | AGENT_SCAFFOLD_CACHE_DIR |
Override the cache root (default ~/.cache/agent-scaffold). |
| Env | AGENT_SCAFFOLD_CONFIG_PATH |
Override the TOML fallback location. |
| TOML | ~/.config/agent-scaffold/config.toml |
Fallback for deployments_path and model. |
Run uv run agent-scaffold config to print the resolved configuration (the API key is masked).
A typical config file:
deployments_path = "/Users/me/code/agent-deployments"
model = "claude-opus-4-7"
Pointing at your own agent-deployments
Either set AGENT_SCAFFOLD_DEPLOYMENTS_PATH, write deployments_path to the TOML config, or pass --deployments-path to agent-scaffold new. The directory must contain docs/recipes/*.md files; cross-cutting / framework / pattern / stack docs are picked up automatically based on the recipe's references.
Adding a new target language
Drop a YAML file into src/agent_scaffold/languages/ modeled after python.yaml or typescript.yaml. Required keys:
language,package_manager,project_layout,entry_point,manifestrequired_tools(formatter / type_checker / test)pinned_dependencies,framework_dependenciesforbidden,smoke_check
The CLI reads them on demand; no code changes needed unless you also want a language-specific static-validation tier (see src/agent_scaffold/validator.py).
Troubleshooting
Contract parse failures
If Claude returns malformed JSON, agent-scaffold:
- Saves the raw response to
~/.cache/agent-scaffold/failures/<timestamp>.json. - Prints a warning and asks Claude to repair the response.
- If the repair still fails, saves that raw response too and aborts with file pointers.
You can re-run agent-scaffold new with AGENT_SCAFFOLD_CACHE_DIR set to inspect failures elsewhere.
--write-mode choices
| Mode | Behavior |
|---|---|
abort (default) |
Refuse to write into a non-empty destination. |
skip |
Keep existing files, write only new ones. |
diff |
Show a unified diff per file and prompt before overwriting. |
overwrite |
Replace everything. |
All writes stage to a sibling temp directory and os.replace into place, so a failure mid-generation leaves the destination untouched.
Re-running validation
agent-scaffold validate /path/to/generated --tier static|build|smoke reruns one of the post-generation tiers without re-invoking the LLM.
License
MIT (see LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_scaffold_cli-0.1.1.tar.gz.
File metadata
- Download URL: agent_scaffold_cli-0.1.1.tar.gz
- Upload date:
- Size: 174.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e67b8e690bf1f959ae8132f01af3782efba57ad0acbe0ed8bc64a0479a190897
|
|
| MD5 |
a50cc100047d0854be3aa982daa0583b
|
|
| BLAKE2b-256 |
e4283496d4be701a9970ca979aa24f30aea37def34ee38e7f0f01f4d2c443f06
|
Provenance
The following attestation bundles were made for agent_scaffold_cli-0.1.1.tar.gz:
Publisher:
publish.yml on jagguvarma15/agent-scaffold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_scaffold_cli-0.1.1.tar.gz -
Subject digest:
e67b8e690bf1f959ae8132f01af3782efba57ad0acbe0ed8bc64a0479a190897 - Sigstore transparency entry: 1456106677
- Sigstore integration time:
-
Permalink:
jagguvarma15/agent-scaffold@21dcbfa270c70c84e9e25526a62c4b5476cadfbd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jagguvarma15
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21dcbfa270c70c84e9e25526a62c4b5476cadfbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_scaffold_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agent_scaffold_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 173.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bda85b366e38ece189f356d62a7bc4060aee1a918a691ce0c0acfd22ccf74b1
|
|
| MD5 |
9ce75e5fbb38e37ca37f037590726147
|
|
| BLAKE2b-256 |
9ddfc95d98dac490ac9f4a3ad1a8ec9db8bf31754ab2d18e86ce5c3ac6fe693c
|
Provenance
The following attestation bundles were made for agent_scaffold_cli-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on jagguvarma15/agent-scaffold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_scaffold_cli-0.1.1-py3-none-any.whl -
Subject digest:
0bda85b366e38ece189f356d62a7bc4060aee1a918a691ce0c0acfd22ccf74b1 - Sigstore transparency entry: 1456106820
- Sigstore integration time:
-
Permalink:
jagguvarma15/agent-scaffold@21dcbfa270c70c84e9e25526a62c4b5476cadfbd -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/jagguvarma15
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21dcbfa270c70c84e9e25526a62c4b5476cadfbd -
Trigger Event:
release
-
Statement type: