This directory contains polished, copy-pasteable StructKit examples for common developer and platform-engineering workflows.
| Example | Best for | Command |
|---|---|---|
| Python CLI | Packaging a small Python command-line tool | structkit generate --vars "project_name=DemoCLI,package_name=demo_cli,cli_command=demo-cli,description=A small Python CLI generated by StructKit." examples/python-cli/.struct.yaml ./demo-python-cli |
| FastAPI service | Bootstrapping an API service with tests and Docker | structkit generate --vars "service_name=DemoAPI,module_name=app,description=A small FastAPI service generated by StructKit." examples/fastapi-service/.struct.yaml ./demo-fastapi-service |
| Terraform module | Creating a reusable infrastructure module skeleton | structkit generate --vars "module_name=terraform-example-module,description=A reusable Terraform module generated by StructKit.,terraform_version=1.6.0,provider_source=hashicorp/null,provider_version=>= 3.2.0" examples/terraform-module/.struct.yaml ./demo-terraform-module |
| GitHub Actions CI baseline | Adding a standard Python CI workflow to a repo | structkit generate --vars "project_name=DemoPythonProject,python_version=3.12" examples/github-actions-ci/.struct.yaml ./demo-ci-baseline |
| AI agent / MCP scaffold | Giving AI coding assistants a project structure and instructions | structkit generate --vars "project_name=AI Assisted Project,description=A project scaffolded for AI-assisted development with StructKit." examples/ai-agent-mcp/.struct.yaml ./demo-ai-agent-project |
| Versioned sources | Pinning reusable struct sources and inheriting the same source in nested structs | structkit generate examples/versioned-sources/.struct.yaml ./demo-versioned-sources |
From the repository root:
structkit generate --vars "project_name=DemoCLI,package_name=demo_cli,cli_command=demo-cli,description=A small Python CLI generated by StructKit." examples/python-cli/.struct.yaml /tmp/structkit-python-cli-demoMost examples include defaults for variables. Pass --vars when you want a non-interactive, copy-pasteable command with a specific project name or package name:
structkit generate \
--vars "project_name=DemoCLI,package_name=demo_cli,cli_command=demo-cli,description=A small Python CLI generated by StructKit." \
examples/python-cli/.struct.yaml \
/tmp/demo-cliUse --dry-run --diff to preview output before writing files:
structkit generate --vars "service_name=DemoAPI,module_name=app,description=A small FastAPI service generated by StructKit." examples/fastapi-service/.struct.yaml /tmp/demo-api --dry-run --diff- Keep examples small enough to understand in a few minutes.
- Prefer inline content over remote URLs so examples work offline.
- Include a README in each example directory with the command, expected output, and customization notes.
- When adding an example, update this index and the verification script if one exists.