Skip to content

Commit c53505a

Browse files
authored
Add polished examples pack (#161)
1 parent ea3ceb5 commit c53505a

20 files changed

Lines changed: 663 additions & 465 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
**StructKit** replaces copy-pasted boilerplate and aging "golden repos" with reusable YAML structures. It can render template variables, fetch canonical files from remote sources, preview changes before writing, and expose your scaffolds to AI assistants through the Model Context Protocol.
1313

14-
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](example/)** | 🤖 **[MCP Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
14+
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🧩 **[Examples](examples/)** | 🤖 **[MCP Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
1515
1616
## ⚡ Try it in 60 seconds
1717

@@ -23,14 +23,14 @@ pip install structkit
2323
structkit list
2424

2525
# Generate a ready-made Terraform module scaffold
26-
structkit generate --var module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
26+
structkit generate --vars module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
2727
```
2828

2929
Prefer Docker?
3030

3131
```bash
3232
docker run --rm -v "$(pwd):/workdir" ghcr.io/httpdss/structkit:main \
33-
generate --var module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
33+
generate --vars module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
3434
```
3535

3636
## 👤 Who StructKit is for
@@ -76,7 +76,7 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
7676

7777
```bash
7878
# Generate a Terraform module structure
79-
structkit generate --var module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
79+
structkit generate --vars module_name=my-terraform-module terraform/modules/generic ./my-terraform-module
8080

8181
# List available structures
8282
structkit list
@@ -88,7 +88,7 @@ structkit validate my-config.yaml
8888
structkit mcp --server
8989
```
9090

91-
If StructKit saves you setup time, **star the repo**, try an [example](example/), or share your use case in [GitHub Discussions](https://github.com/httpdss/structkit/discussions).
91+
If StructKit saves you setup time, **star the repo**, try an [example](examples/), or share your use case in [GitHub Discussions](https://github.com/httpdss/structkit/discussions).
9292

9393
### Example Configuration
9494

@@ -147,7 +147,7 @@ Our comprehensive documentation is organized into the following sections:
147147
### 📖 Resources
148148
149149
- **[Articles & Tutorials](docs/articles.md)** - Community content and learning resources
150-
- **[Examples](example/)** - Practical examples and use cases
150+
- **[Examples](examples/)** - Practical examples and use cases
151151
152152
## 🎯 Use Cases
153153

WARP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ pre-commit run --all-files
278278
1. Create YAML file in `structkit/contribs/`
279279
2. Follow naming convention: `project-type.yaml`
280280
3. Include comprehensive variable definitions
281-
4. Add example in `docs/examples/`
281+
4. Add a docs entry in `docs/examples/` and, for reusable examples, a runnable template under `examples/`
282282
5. Update `structkit list` output
283283

284284
## 🐛 Troubleshooting

docker-compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ services:
1010
"generate",
1111
"--log=DEBUG",
1212
"--dry-run",
13-
"--vars=project_name=MyProject,author_name=JohnDoe",
13+
"--vars=project_name=MyProject,package_name=my_project,cli_command=my-project,description=Example CLI",
1414
"--backup=/app/backup",
1515
"--file-strategy=rename",
1616
"--log-file=/app/logfile.log",
17-
"/app/example/structure.yaml",
17+
"/app/examples/python-cli/.struct.yaml",
1818
"/app/example_project"
1919
]
2020
structkit-test:
@@ -27,10 +27,10 @@ services:
2727
command: [
2828
"generate",
2929
"--log=DEBUG",
30-
"--vars=project_name=MyProject,author_name=JohnDoe",
30+
"--vars=project_name=MyProject,package_name=my_project,cli_command=my-project,description=Example CLI",
3131
"--backup=/app/backup",
3232
"--file-strategy=rename",
3333
"--log-file=/app/logfile.log",
34-
"/app/example/structure.yaml",
34+
"/app/examples/python-cli/.struct.yaml",
3535
"/app/example_project"
3636
]

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct/
9696
│ └── ...
9797
├── tests/ # Test files
9898
├── docs/ # Documentation
99-
├── example/ # Example configurations
99+
├── examples/ # Example configurations
100100
├── scripts/ # Utility scripts
101101
└── requirements*.txt # Dependencies
102102
```

0 commit comments

Comments
 (0)