Skip to content

Commit 8dc5f14

Browse files
committed
updated docs
1 parent 678ac0c commit 8dc5f14

4 files changed

Lines changed: 221 additions & 2 deletions

File tree

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Welcome to the comprehensive documentation for STRUCT - the Automated Project St
3333

3434
- [CLI Reference](cli-reference.md) - Complete command documentation
3535
- [Schema Reference](schema.md) - YAML validation and IDE support
36-
- [Examples](examples/) - Practical examples and use cases
36+
- [Examples](examples/index.md) - Practical examples and use cases
3737

3838
## 🔗 External Resources
3939

@@ -44,5 +44,5 @@ Welcome to the comprehensive documentation for STRUCT - the Automated Project St
4444
## 🤝 Community
4545

4646
- [Contributing Guidelines](contributing.md)
47-
- [License](../LICENSE)
47+
- [License](https://github.com/httpdss/struct/blob/main/LICENSE)
4848
- [Funding](funding.md)

docs/presentation/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Struct Presentation (Presenterm)
2+
3+
Run this presentation in your terminal using Presenterm:
4+
5+
```sh
6+
presenterm docs/presentation/struct.md
7+
```
8+
9+
Notes:
10+
11+
- Ensure Presenterm is installed and available on your PATH.
12+
- The slide deck covers: title, quick description of Struct, installation options, basic commands (list, generate), and multiple use cases.
13+
- You can customize themes or export to PDF using Presenterm’s features if desired.
1010 KB
Loading

docs/presentation/struct.md

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<!-- >
2+
3+
# Struct
4+
5+
![](struct-banner.png)
6+
7+
Automated Project Structure Generator
8+
9+
<!-- end_slide -->
10+
11+
# What is Struct?
12+
13+
Struct automates project structure creation from YAML configurations.
14+
15+
- YAML-based configurations for reproducible scaffolding
16+
- Jinja2 templating and interactive prompts for dynamic content
17+
- Remote content sources (GitHub, HTTP/HTTPS, S3, GCS)
18+
- Smart file handling (overwrite, skip, append, rename, backup)
19+
- Hooks (pre/post) to automate tasks around generation
20+
- Dry-run and diff preview before applying changes
21+
- Validation and JSON schema generation
22+
- MCP (Model Context Protocol) integration
23+
24+
<!-- end_slide -->
25+
26+
# Install
27+
28+
Option 1 — pip (from GitHub):
29+
30+
```sh
31+
pip install git+https://github.com/httpdss/struct.git
32+
```
33+
34+
Option 2 — Docker:
35+
36+
```sh
37+
docker run -v $(pwd):/workdir ghcr.io/httpdss/struct:main generate my-config.yaml ./output
38+
```
39+
40+
Option 3 — From source with venv:
41+
42+
```sh
43+
python -m venv .venv
44+
source .venv/bin/activate
45+
pip install -U pip
46+
pip install .
47+
```
48+
49+
<!-- end_slide -->
50+
51+
# Basic Commands
52+
53+
- struct list — List available structures
54+
- struct generate — Generate a project from a structure or YAML file
55+
- struct validate — Validate a YAML configuration
56+
- struct generate-schema — Emit JSON schema for available structures
57+
- struct init — Create a minimal .struct.yaml in a directory
58+
- struct info — Show details about a structure definition
59+
- struct completion install — Install shell completions
60+
- struct mcp --server — Start MCP server
61+
62+
```sh
63+
struct --help
64+
```
65+
66+
<!-- end_slide -->
67+
68+
# List Structures
69+
70+
See all available structures:
71+
72+
```sh
73+
struct list
74+
```
75+
76+
Include custom structure directories:
77+
78+
```sh
79+
struct list -s ~/custom-structures
80+
```
81+
82+
Tip (with shell completion enabled):
83+
84+
```sh
85+
struct generate <Tab> # shows available structures
86+
```
87+
88+
<!-- end_slide -->
89+
90+
# Generate: Quick Start
91+
92+
Use defaults (.struct.yaml in current dir, generate into current dir):
93+
94+
```sh
95+
struct generate
96+
```
97+
98+
Generate a Terraform module (example):
99+
100+
```sh
101+
struct generate terraform/modules/generic ./my-terraform-module
102+
```
103+
104+
Generate from a YAML file:
105+
106+
```sh
107+
struct generate my-config.yaml ./output
108+
# or
109+
struct generate file://my-config.yaml ./output
110+
```
111+
112+
<!-- end_slide -->
113+
114+
# Generate: Variables & Paths
115+
116+
Pass template variables:
117+
118+
```sh
119+
struct generate -v "project_name=MyApp,author=John Doe" file://structure.yaml ./output
120+
```
121+
122+
Use additional custom structures path:
123+
124+
```sh
125+
struct generate -s ~/custom-structures python-api ./my-api
126+
```
127+
128+
<!-- end_slide -->
129+
130+
# Generate: Dry Run & Diff
131+
132+
Preview without creating files and show diffs:
133+
134+
```sh
135+
struct generate --dry-run --diff file://structure.yaml ./output
136+
```
137+
138+
Other helpful options:
139+
- --log=DEBUG
140+
- --mappings-file path.yaml (can be repeated)
141+
- --output {console,file}
142+
143+
<!-- end_slide -->
144+
145+
# Handling Existing Files
146+
147+
Skip existing files:
148+
149+
```sh
150+
struct generate -f skip file://structure.yaml ./output
151+
```
152+
153+
Backup before overwriting:
154+
155+
```sh
156+
struct generate -f backup -b ./backup file://structure.yaml ./output
157+
```
158+
159+
Other strategies: overwrite, append, rename
160+
161+
<!-- end_slide -->
162+
163+
# Multiple Use Cases
164+
165+
- Infrastructure as Code: Terraform modules, Kubernetes manifests
166+
- Application Scaffolding: microservices, APIs, frontends
167+
- DevOps Automation: CI/CD pipelines, configuration management
168+
- Documentation: consistent project docs and compliance templates
169+
170+
<!-- end_slide -->
171+
172+
# Extras
173+
174+
Initialize a starter configuration:
175+
176+
```sh
177+
struct init
178+
```
179+
180+
Validate a configuration:
181+
182+
```sh
183+
struct validate my-structure.yaml
184+
```
185+
186+
Generate JSON schema:
187+
188+
```sh
189+
struct generate-schema -o schema.json
190+
```
191+
192+
Shell completion (auto-detect shell):
193+
194+
```sh
195+
struct completion install
196+
```
197+
198+
MCP integration:
199+
200+
```sh
201+
struct mcp --server
202+
```
203+
204+
<!-- end_slide -->
205+
206+
# End

0 commit comments

Comments
 (0)