Skip to main content

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:

  1. The path to your agent-deployments repo (default from config).
  2. A recipe from docs/recipes/*.md.
  3. A target language (Python or TypeScript).
  4. A framework (e.g. pydantic_ai, langgraph, vercel_ai_sdk, or none).
  5. 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, manifest
  • required_tools (formatter / type_checker / test)
  • pinned_dependencies, framework_dependencies
  • forbidden, 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:

  1. Saves the raw response to ~/.cache/agent-scaffold/failures/<timestamp>.json.
  2. Prints a warning and asks Claude to repair the response.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_scaffold_cli-0.1.1.tar.gz (174.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_scaffold_cli-0.1.1-py3-none-any.whl (173.8 kB view details)

Uploaded Python 3

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

Hashes for agent_scaffold_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e67b8e690bf1f959ae8132f01af3782efba57ad0acbe0ed8bc64a0479a190897
MD5 a50cc100047d0854be3aa982daa0583b
BLAKE2b-256 e4283496d4be701a9970ca979aa24f30aea37def34ee38e7f0f01f4d2c443f06

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_scaffold_cli-0.1.1.tar.gz:

Publisher: publish.yml on jagguvarma15/agent-scaffold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_scaffold_cli-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_scaffold_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bda85b366e38ece189f356d62a7bc4060aee1a918a691ce0c0acfd22ccf74b1
MD5 9ce75e5fbb38e37ca37f037590726147
BLAKE2b-256 9ddfc95d98dac490ac9f4a3ad1a8ec9db8bf31754ab2d18e86ce5c3ac6fe693c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page