structkit 3.3.0__tar.gz → 3.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {structkit-3.3.0/structkit.egg-info → structkit-3.3.2}/PKG-INFO +14 -6
- {structkit-3.3.0 → structkit-3.3.2}/README.md +10 -3
- {structkit-3.3.0 → structkit-3.3.2}/pyproject.toml +4 -3
- {structkit-3.3.0 → structkit-3.3.2}/structkit/config.py +13 -6
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/documentation-template.yaml +1 -1
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/prompts/struct.yaml +1 -1
- {structkit-3.3.0 → structkit-3.3.2/structkit.egg-info}/PKG-INFO +14 -6
- {structkit-3.3.0 → structkit-3.3.2}/structkit.egg-info/SOURCES.txt +2 -1
- {structkit-3.3.0 → structkit-3.3.2}/structkit.egg-info/requires.txt +1 -0
- structkit-3.3.2/tests/test_vendored_env.py +123 -0
- {structkit-3.3.0 → structkit-3.3.2}/LICENSE +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/MANIFEST.in +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/setup.cfg +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/setup.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/__init__.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/__init__.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/completion.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/config.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/explain.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/generate.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/generate_schema.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/graph.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/import.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/info.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/init.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/lint.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/list.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/mcp.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/search.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/sources.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/validate.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/commands/vars.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/completers.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/content_fetcher.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/README.md +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/ansible-playbook.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/chef-cookbook.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/ci-cd-pipelines.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/cloudformation-files.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/chglog.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/codeowners.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/devcontainer.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/editor-config.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/eslint.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/jshint.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/kubectl.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/configs/prettier.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/docker-files.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/git-hooks.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/chatmodes/plan.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/instructions/generic.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/prompts/generic.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/prompts/react-form.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/prompts/security-api.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/templates.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/codeql.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/execute-tf-workflow.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/labeler.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/pre-commit.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/release-drafter.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/run-struct.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/stale.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/helm-chart.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/kubernetes-manifests.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/custom-structures.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/generic.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/go.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/java.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/n8n.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/nodejs.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/python.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/ruby.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/project/rust.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/prompts/run-struct-trigger.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/aws-accounts.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/environments.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/generic.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/github-organization.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/init.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/modules/generic.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/vagrant-files.yaml +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/file_item.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/filters.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/input_store.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/logging_config.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/main.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/mcp_server.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/model_wrapper.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/project_file.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/sources.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/struct_refs.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/template_renderer.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit/utils.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit.egg-info/dependency_links.txt +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit.egg-info/entry_points.txt +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/structkit.egg-info/top_level.txt +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_commands.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_commands_more.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_completers.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_completion_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_config_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_config_layering.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_content_fetcher_more.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_env_var_cli_args.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_env_var_structures_path.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_explain_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_file_item.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_file_item_strategies.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_filters.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_filters_more.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_graph_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_hooks.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_init_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_input_store.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_mcp_integration.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_messages_and_summary.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_model_wrapper.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_project_file.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_search_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_sources_command.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_template_helpers.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_template_renderer.py +0 -0
- {structkit-3.3.0 → structkit-3.3.2}/tests/test_utils_more.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: structkit
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.2
|
|
4
4
|
Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
|
|
5
5
|
Author: httpdss
|
|
6
|
-
License:
|
|
6
|
+
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://structkit.app/
|
|
8
8
|
Project-URL: Repository, https://github.com/httpdss/structkit
|
|
9
9
|
Project-URL: Issues, https://github.com/httpdss/structkit/issues
|
|
@@ -14,7 +14,7 @@ Keywords: project-scaffolding,project-template,scaffolding,cookiecutter-alternat
|
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: Intended Audience :: System Administrators
|
|
17
|
-
Classifier: License :: OSI Approved ::
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -37,6 +37,7 @@ Requires-Dist: jinja2>=3.1.0
|
|
|
37
37
|
Requires-Dist: PyGithub>=1.58.0
|
|
38
38
|
Requires-Dist: shtab>=1.6.0
|
|
39
39
|
Requires-Dist: colorlog>=6.7.0
|
|
40
|
+
Requires-Dist: cachetools>=5.0
|
|
40
41
|
Requires-Dist: pydantic-ai-slim[anthropic,google,openai]>=0.1.0
|
|
41
42
|
Requires-Dist: fastmcp>=2.0.0
|
|
42
43
|
Provides-Extra: s3
|
|
@@ -68,6 +69,8 @@ Define a repo once (files, CI, Terraform, app layout). Generate it from the CLI,
|
|
|
68
69
|
|
|
69
70
|
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🤖 **[MCP / AI Agent Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
70
71
|
|
|
72
|
+
⭐ If StructKit saves you time, please [star the repo](https://github.com/httpdss/structkit) — it helps others find it.
|
|
73
|
+
|
|
71
74
|
## Try it in 60 seconds
|
|
72
75
|
|
|
73
76
|
```bash
|
|
@@ -95,11 +98,13 @@ docker run --rm -v "$(pwd):/workdir" ghcr.io/httpdss/structkit:main \
|
|
|
95
98
|
|
|
96
99
|
These are install paths for [StructKit](https://github.com/httpdss/structkit), not separate products. Star this repo.
|
|
97
100
|
|
|
98
|
-
- [
|
|
101
|
+
- [structkit-setup](https://github.com/httpdss/structkit-setup) — install StructKit on `PATH` in GitHub Actions (`httpdss/structkit-setup@v0`), then run any `structkit` command
|
|
102
|
+
- [GitHub Action](https://github.com/httpdss/structkit-action) — validate, generate, or drift-check in CI (`httpdss/structkit-setup@v0`, then `httpdss/structkit-action@v0`)
|
|
99
103
|
- [VS Code / Cursor](https://github.com/httpdss/vscode-structkit) — schema and autocomplete for `.structkit.yaml`
|
|
100
104
|
- [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
|
|
101
105
|
- [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
|
|
102
|
-
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew
|
|
106
|
+
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
|
|
107
|
+
- Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
|
|
103
108
|
- [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
|
|
104
109
|
- [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
|
|
105
110
|
|
|
@@ -139,6 +144,8 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
|
|
|
139
144
|
- **🌐 Remote Content** - Fetch files from GitHub, HTTP/HTTPS, S3, and Google Cloud Storage
|
|
140
145
|
- **🛡️ Smart File Handling** - Multiple strategies for managing existing files (overwrite, skip, backup, etc.)
|
|
141
146
|
- **🪝 Automation Hooks** - Pre and post-generation shell commands
|
|
147
|
+
- **🔒 Hook Safety** - Skip hooks (`--no-hooks` / `STRUCTKIT_NO_HOOKS`), confirm interactively, or restrict commands with an allowlist
|
|
148
|
+
- **⚙️ Config Layering** - Merge built-in defaults, `~/.config/struct/config.yaml`, optional `--config-file`, and CLI flags
|
|
142
149
|
- **🎯 Dry Run Mode** - Preview changes before applying them
|
|
143
150
|
- **✅ Validation & Schema** - Built-in YAML validation and IDE support
|
|
144
151
|
- **🤖 MCP Integration** - Model Context Protocol support for AI-assisted development workflows
|
|
@@ -200,6 +207,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
200
207
|
- **[YAML Configuration](docs/configuration.md)** - Complete configuration reference
|
|
201
208
|
- **[Template Variables](docs/template-variables.md)** - Dynamic content and Jinja2 features
|
|
202
209
|
- **[File Handling](docs/file-handling.md)** - Managing files, permissions, and remote content
|
|
210
|
+
- **[Environment Variables](docs/environment-variables.md)** - `STRUCTKIT_*` defaults and overrides
|
|
203
211
|
- **[Schema Reference](docs/schema.md)** - YAML validation and IDE support
|
|
204
212
|
|
|
205
213
|
### 🔧 Advanced Features
|
|
@@ -236,7 +244,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
236
244
|
|
|
237
245
|
## 📜 License
|
|
238
246
|
|
|
239
|
-
|
|
247
|
+
Apache-2.0 License - see [LICENSE](LICENSE) for details.
|
|
240
248
|
|
|
241
249
|
## 💰 Support
|
|
242
250
|
|
|
@@ -11,6 +11,8 @@ Define a repo once (files, CI, Terraform, app layout). Generate it from the CLI,
|
|
|
11
11
|
|
|
12
12
|
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🤖 **[MCP / AI Agent Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
13
13
|
|
|
14
|
+
⭐ If StructKit saves you time, please [star the repo](https://github.com/httpdss/structkit) — it helps others find it.
|
|
15
|
+
|
|
14
16
|
## Try it in 60 seconds
|
|
15
17
|
|
|
16
18
|
```bash
|
|
@@ -38,11 +40,13 @@ docker run --rm -v "$(pwd):/workdir" ghcr.io/httpdss/structkit:main \
|
|
|
38
40
|
|
|
39
41
|
These are install paths for [StructKit](https://github.com/httpdss/structkit), not separate products. Star this repo.
|
|
40
42
|
|
|
41
|
-
- [
|
|
43
|
+
- [structkit-setup](https://github.com/httpdss/structkit-setup) — install StructKit on `PATH` in GitHub Actions (`httpdss/structkit-setup@v0`), then run any `structkit` command
|
|
44
|
+
- [GitHub Action](https://github.com/httpdss/structkit-action) — validate, generate, or drift-check in CI (`httpdss/structkit-setup@v0`, then `httpdss/structkit-action@v0`)
|
|
42
45
|
- [VS Code / Cursor](https://github.com/httpdss/vscode-structkit) — schema and autocomplete for `.structkit.yaml`
|
|
43
46
|
- [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
|
|
44
47
|
- [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
|
|
45
|
-
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew
|
|
48
|
+
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
|
|
49
|
+
- Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
|
|
46
50
|
- [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
|
|
47
51
|
- [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
|
|
48
52
|
|
|
@@ -82,6 +86,8 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
|
|
|
82
86
|
- **🌐 Remote Content** - Fetch files from GitHub, HTTP/HTTPS, S3, and Google Cloud Storage
|
|
83
87
|
- **🛡️ Smart File Handling** - Multiple strategies for managing existing files (overwrite, skip, backup, etc.)
|
|
84
88
|
- **🪝 Automation Hooks** - Pre and post-generation shell commands
|
|
89
|
+
- **🔒 Hook Safety** - Skip hooks (`--no-hooks` / `STRUCTKIT_NO_HOOKS`), confirm interactively, or restrict commands with an allowlist
|
|
90
|
+
- **⚙️ Config Layering** - Merge built-in defaults, `~/.config/struct/config.yaml`, optional `--config-file`, and CLI flags
|
|
85
91
|
- **🎯 Dry Run Mode** - Preview changes before applying them
|
|
86
92
|
- **✅ Validation & Schema** - Built-in YAML validation and IDE support
|
|
87
93
|
- **🤖 MCP Integration** - Model Context Protocol support for AI-assisted development workflows
|
|
@@ -143,6 +149,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
143
149
|
- **[YAML Configuration](docs/configuration.md)** - Complete configuration reference
|
|
144
150
|
- **[Template Variables](docs/template-variables.md)** - Dynamic content and Jinja2 features
|
|
145
151
|
- **[File Handling](docs/file-handling.md)** - Managing files, permissions, and remote content
|
|
152
|
+
- **[Environment Variables](docs/environment-variables.md)** - `STRUCTKIT_*` defaults and overrides
|
|
146
153
|
- **[Schema Reference](docs/schema.md)** - YAML validation and IDE support
|
|
147
154
|
|
|
148
155
|
### 🔧 Advanced Features
|
|
@@ -179,7 +186,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
179
186
|
|
|
180
187
|
## 📜 License
|
|
181
188
|
|
|
182
|
-
|
|
189
|
+
Apache-2.0 License - see [LICENSE](LICENSE) for details.
|
|
183
190
|
|
|
184
191
|
## 💰 Support
|
|
185
192
|
|
|
@@ -4,16 +4,16 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "structkit"
|
|
7
|
-
version = "3.3.
|
|
7
|
+
version = "3.3.2"
|
|
8
8
|
description = "YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
license = {text = "
|
|
10
|
+
license = {text = "Apache-2.0"}
|
|
11
11
|
authors = [{name = "httpdss"}]
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Development Status :: 4 - Beta",
|
|
14
14
|
"Intended Audience :: Developers",
|
|
15
15
|
"Intended Audience :: System Administrators",
|
|
16
|
-
"License :: OSI Approved ::
|
|
16
|
+
"License :: OSI Approved :: Apache Software License",
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
18
|
"Programming Language :: Python :: 3.8",
|
|
19
19
|
"Programming Language :: Python :: 3.9",
|
|
@@ -53,6 +53,7 @@ dependencies = [
|
|
|
53
53
|
"PyGithub>=1.58.0",
|
|
54
54
|
"shtab>=1.6.0",
|
|
55
55
|
"colorlog>=6.7.0",
|
|
56
|
+
"cachetools>=5.0",
|
|
56
57
|
"pydantic-ai-slim[openai,google,anthropic]>=0.1.0",
|
|
57
58
|
"fastmcp>=2.0.0",
|
|
58
59
|
]
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"""Configuration layering system for structkit.
|
|
2
2
|
|
|
3
|
-
Supports loading and merging configuration from multiple sources:
|
|
3
|
+
Supports loading and merging CLI configuration from multiple sources:
|
|
4
4
|
1. Built-in defaults
|
|
5
|
-
2. User config (~/.config/struct/config.yaml)
|
|
6
|
-
3. Project config (
|
|
5
|
+
2. User config (~/.config/struct/config.yaml) — loaded automatically when present
|
|
6
|
+
3. Project config from --config-file only (not auto-loaded from .structkit.yaml)
|
|
7
7
|
4. CLI arguments
|
|
8
8
|
|
|
9
|
-
Priority order: CLI args >
|
|
9
|
+
Priority order: CLI args > --config-file > user config > built-in defaults
|
|
10
|
+
|
|
11
|
+
.structkit.yaml (and legacy .struct.yaml) is the structure definition used by
|
|
12
|
+
generate/validate/etc., not a layered CLI config file.
|
|
13
|
+
|
|
14
|
+
Named structure sources live in a separate file
|
|
15
|
+
(~/.config/structkit/sources.yaml, overridable via STRUCTKIT_SOURCES_CONFIG).
|
|
10
16
|
"""
|
|
11
17
|
|
|
12
18
|
import os
|
|
@@ -97,10 +103,11 @@ def load_layered_config(project_config_path: Optional[str] = None) -> Dict[str,
|
|
|
97
103
|
Merge order (lowest to highest priority):
|
|
98
104
|
1. Built-in defaults
|
|
99
105
|
2. User config (~/.config/struct/config.yaml)
|
|
100
|
-
3. Project config
|
|
106
|
+
3. Project config from --config-file, if provided
|
|
107
|
+
(.structkit.yaml is not auto-loaded here)
|
|
101
108
|
|
|
102
109
|
Args:
|
|
103
|
-
project_config_path: Path
|
|
110
|
+
project_config_path: Path from --config-file, or None
|
|
104
111
|
|
|
105
112
|
Returns:
|
|
106
113
|
Merged configuration dictionary
|
|
@@ -9,7 +9,7 @@ files:
|
|
|
9
9
|
|
|
10
10
|
## Role
|
|
11
11
|
|
|
12
|
-
You are an expert assistant that generates valid `.structkit.yaml` files for the [StructKit tool](https://github.com/httpdss/
|
|
12
|
+
You are an expert assistant that generates valid `.structkit.yaml` files for the [StructKit tool](https://github.com/httpdss/structkit), which automates project structure generation from YAML configuration.
|
|
13
13
|
|
|
14
14
|
## Defining the `.structkit.yaml` file
|
|
15
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: structkit
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.2
|
|
4
4
|
Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
|
|
5
5
|
Author: httpdss
|
|
6
|
-
License:
|
|
6
|
+
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://structkit.app/
|
|
8
8
|
Project-URL: Repository, https://github.com/httpdss/structkit
|
|
9
9
|
Project-URL: Issues, https://github.com/httpdss/structkit/issues
|
|
@@ -14,7 +14,7 @@ Keywords: project-scaffolding,project-template,scaffolding,cookiecutter-alternat
|
|
|
14
14
|
Classifier: Development Status :: 4 - Beta
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
16
16
|
Classifier: Intended Audience :: System Administrators
|
|
17
|
-
Classifier: License :: OSI Approved ::
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.8
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -37,6 +37,7 @@ Requires-Dist: jinja2>=3.1.0
|
|
|
37
37
|
Requires-Dist: PyGithub>=1.58.0
|
|
38
38
|
Requires-Dist: shtab>=1.6.0
|
|
39
39
|
Requires-Dist: colorlog>=6.7.0
|
|
40
|
+
Requires-Dist: cachetools>=5.0
|
|
40
41
|
Requires-Dist: pydantic-ai-slim[anthropic,google,openai]>=0.1.0
|
|
41
42
|
Requires-Dist: fastmcp>=2.0.0
|
|
42
43
|
Provides-Extra: s3
|
|
@@ -68,6 +69,8 @@ Define a repo once (files, CI, Terraform, app layout). Generate it from the CLI,
|
|
|
68
69
|
|
|
69
70
|
> 🚀 **[Quick Start](docs/quickstart.md)** | 📚 **[Docs](docs/index.md)** | 🤖 **[MCP / AI Agent Guide](docs/mcp-integration.md)** | 💬 **[Discussions](https://github.com/httpdss/structkit/discussions)**
|
|
70
71
|
|
|
72
|
+
⭐ If StructKit saves you time, please [star the repo](https://github.com/httpdss/structkit) — it helps others find it.
|
|
73
|
+
|
|
71
74
|
## Try it in 60 seconds
|
|
72
75
|
|
|
73
76
|
```bash
|
|
@@ -95,11 +98,13 @@ docker run --rm -v "$(pwd):/workdir" ghcr.io/httpdss/structkit:main \
|
|
|
95
98
|
|
|
96
99
|
These are install paths for [StructKit](https://github.com/httpdss/structkit), not separate products. Star this repo.
|
|
97
100
|
|
|
98
|
-
- [
|
|
101
|
+
- [structkit-setup](https://github.com/httpdss/structkit-setup) — install StructKit on `PATH` in GitHub Actions (`httpdss/structkit-setup@v0`), then run any `structkit` command
|
|
102
|
+
- [GitHub Action](https://github.com/httpdss/structkit-action) — validate, generate, or drift-check in CI (`httpdss/structkit-setup@v0`, then `httpdss/structkit-action@v0`)
|
|
99
103
|
- [VS Code / Cursor](https://github.com/httpdss/vscode-structkit) — schema and autocomplete for `.structkit.yaml`
|
|
100
104
|
- [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
|
|
101
105
|
- [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
|
|
102
|
-
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew
|
|
106
|
+
- [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
|
|
107
|
+
- Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
|
|
103
108
|
- [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
|
|
104
109
|
- [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
|
|
105
110
|
|
|
@@ -139,6 +144,8 @@ Project scaffolding tools exist in most ecosystems, but StructKit solves problem
|
|
|
139
144
|
- **🌐 Remote Content** - Fetch files from GitHub, HTTP/HTTPS, S3, and Google Cloud Storage
|
|
140
145
|
- **🛡️ Smart File Handling** - Multiple strategies for managing existing files (overwrite, skip, backup, etc.)
|
|
141
146
|
- **🪝 Automation Hooks** - Pre and post-generation shell commands
|
|
147
|
+
- **🔒 Hook Safety** - Skip hooks (`--no-hooks` / `STRUCTKIT_NO_HOOKS`), confirm interactively, or restrict commands with an allowlist
|
|
148
|
+
- **⚙️ Config Layering** - Merge built-in defaults, `~/.config/struct/config.yaml`, optional `--config-file`, and CLI flags
|
|
142
149
|
- **🎯 Dry Run Mode** - Preview changes before applying them
|
|
143
150
|
- **✅ Validation & Schema** - Built-in YAML validation and IDE support
|
|
144
151
|
- **🤖 MCP Integration** - Model Context Protocol support for AI-assisted development workflows
|
|
@@ -200,6 +207,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
200
207
|
- **[YAML Configuration](docs/configuration.md)** - Complete configuration reference
|
|
201
208
|
- **[Template Variables](docs/template-variables.md)** - Dynamic content and Jinja2 features
|
|
202
209
|
- **[File Handling](docs/file-handling.md)** - Managing files, permissions, and remote content
|
|
210
|
+
- **[Environment Variables](docs/environment-variables.md)** - `STRUCTKIT_*` defaults and overrides
|
|
203
211
|
- **[Schema Reference](docs/schema.md)** - YAML validation and IDE support
|
|
204
212
|
|
|
205
213
|
### 🔧 Advanced Features
|
|
@@ -236,7 +244,7 @@ Our comprehensive documentation is organized into the following sections:
|
|
|
236
244
|
|
|
237
245
|
## 📜 License
|
|
238
246
|
|
|
239
|
-
|
|
247
|
+
Apache-2.0 License - see [LICENSE](LICENSE) for details.
|
|
240
248
|
|
|
241
249
|
## 💰 Support
|
|
242
250
|
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import stat
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
import pytest
|
|
8
|
+
|
|
9
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
10
|
+
sys.path.insert(0, str(ROOT / "packaging"))
|
|
11
|
+
|
|
12
|
+
from validate_vendored_env import ( # noqa: E402
|
|
13
|
+
VendoredEnvError,
|
|
14
|
+
validate_vendored_env,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
HOSTED_TOOLCACHE_PYTHON = "/opt/hostedtoolcache/Python/3.11.17/x64/bin/python"
|
|
19
|
+
SHIM = ROOT / "packaging" / "structkit-shim.sh"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _make_fake_interpreter(path: Path) -> None:
|
|
23
|
+
path.write_text("#!/bin/sh\nexit 0\n")
|
|
24
|
+
path.chmod(path.stat().st_mode | stat.S_IEXEC)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _make_stdlib(venv: Path) -> None:
|
|
28
|
+
stdlib = venv / "lib" / "python3.11"
|
|
29
|
+
stdlib.mkdir(parents=True)
|
|
30
|
+
(stdlib / "os.py").write_text("# stdlib marker\n")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_dangling_ci_python_symlink_is_rejected(tmp_path):
|
|
34
|
+
"""Reproduce the 3.3.1 .deb failure: bin/python points at the Actions runner."""
|
|
35
|
+
venv = tmp_path / "venv"
|
|
36
|
+
(venv / "bin").mkdir(parents=True)
|
|
37
|
+
(venv / "bin" / "python").symlink_to(HOSTED_TOOLCACHE_PYTHON)
|
|
38
|
+
_make_stdlib(venv)
|
|
39
|
+
|
|
40
|
+
with pytest.raises(VendoredEnvError, match="hostedtoolcache|outside|dangling"):
|
|
41
|
+
validate_vendored_env(venv, execute=False)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_venv_without_stdlib_is_rejected(tmp_path):
|
|
45
|
+
venv = tmp_path / "venv"
|
|
46
|
+
bin_dir = venv / "bin"
|
|
47
|
+
bin_dir.mkdir(parents=True)
|
|
48
|
+
_make_fake_interpreter(bin_dir / "python")
|
|
49
|
+
(venv / "lib" / "python3.11" / "site-packages").mkdir(parents=True)
|
|
50
|
+
|
|
51
|
+
with pytest.raises(VendoredEnvError, match="standard library"):
|
|
52
|
+
validate_vendored_env(venv, execute=False)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_console_script_shebang_pointing_at_runner_is_rejected(tmp_path):
|
|
56
|
+
venv = tmp_path / "venv"
|
|
57
|
+
bin_dir = venv / "bin"
|
|
58
|
+
bin_dir.mkdir(parents=True)
|
|
59
|
+
_make_fake_interpreter(bin_dir / "python")
|
|
60
|
+
_make_stdlib(venv)
|
|
61
|
+
(bin_dir / "structkit").write_text(
|
|
62
|
+
"#!/home/runner/work/structkit/structkit/dist/venv/bin/python\n"
|
|
63
|
+
"from structkit.main import main\n"
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
with pytest.raises(VendoredEnvError, match="build machine"):
|
|
67
|
+
validate_vendored_env(venv, execute=False)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def test_relative_in_tree_python_symlink_is_accepted(tmp_path):
|
|
71
|
+
venv = tmp_path / "venv"
|
|
72
|
+
bin_dir = venv / "bin"
|
|
73
|
+
bin_dir.mkdir(parents=True)
|
|
74
|
+
_make_fake_interpreter(bin_dir / "python3.11")
|
|
75
|
+
(bin_dir / "python").symlink_to("python3.11")
|
|
76
|
+
_make_stdlib(venv)
|
|
77
|
+
|
|
78
|
+
validate_vendored_env(venv, execute=False)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def test_shim_reports_missing_env_for_dangling_python(tmp_path):
|
|
82
|
+
venv_bin = tmp_path / "venv" / "bin"
|
|
83
|
+
venv_bin.mkdir(parents=True)
|
|
84
|
+
(venv_bin / "python").symlink_to(HOSTED_TOOLCACHE_PYTHON)
|
|
85
|
+
|
|
86
|
+
env = os.environ.copy()
|
|
87
|
+
env["STRUCTKIT_HOME"] = str(tmp_path)
|
|
88
|
+
result = subprocess.run(
|
|
89
|
+
["bash", str(SHIM), "--help"],
|
|
90
|
+
capture_output=True,
|
|
91
|
+
text=True,
|
|
92
|
+
env=env,
|
|
93
|
+
check=False,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
assert result.returncode == 1
|
|
97
|
+
assert "Python environment not found" in result.stderr
|
|
98
|
+
assert str(tmp_path) in result.stderr
|
|
99
|
+
assert "/usr/lib/structkit" not in result.stderr
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def test_shim_invokes_bundled_python(tmp_path):
|
|
103
|
+
venv_bin = tmp_path / "venv" / "bin"
|
|
104
|
+
venv_bin.mkdir(parents=True)
|
|
105
|
+
python = venv_bin / "python"
|
|
106
|
+
python.write_text("#!/bin/sh\nprintf 'shim-ok %s\\n' \"$*\"\n")
|
|
107
|
+
python.chmod(python.stat().st_mode | stat.S_IEXEC)
|
|
108
|
+
(venv_bin / "structkit").write_text("# console script placeholder\n")
|
|
109
|
+
|
|
110
|
+
env = os.environ.copy()
|
|
111
|
+
env["STRUCTKIT_HOME"] = str(tmp_path)
|
|
112
|
+
result = subprocess.run(
|
|
113
|
+
["bash", str(SHIM), "--help"],
|
|
114
|
+
capture_output=True,
|
|
115
|
+
text=True,
|
|
116
|
+
env=env,
|
|
117
|
+
check=False,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
assert result.returncode == 0
|
|
121
|
+
assert "shim-ok" in result.stdout
|
|
122
|
+
assert str(venv_bin / "structkit") in result.stdout
|
|
123
|
+
assert "--help" in result.stdout
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/execute-tf-workflow.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/github/workflows/release-drafter.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{structkit-3.3.0 → structkit-3.3.2}/structkit/contribs/terraform/apps/github-organization.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|