structkit 3.3.0__py3-none-any.whl → 3.3.1__py3-none-any.whl

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/config.py CHANGED
@@ -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 (.structkit.yaml, legacy .struct.yaml, or --config-file)
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 > Project config > User config > Built-in defaults
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 (if provided)
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 to project-specific config file
110
+ project_config_path: Path from --config-file, or None
104
111
 
105
112
  Returns:
106
113
  Merged configuration dictionary
@@ -34,4 +34,4 @@ files:
34
34
  # Code of Conduct
35
35
  Our standards for how to behave within our community.
36
36
  - LICENSE.md:
37
- file: https://raw.githubusercontent.com/git/git-scm.com/main/MIT-LICENSE.txt
37
+ file: https://raw.githubusercontent.com/httpdss/structkit/main/LICENSE
@@ -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/struct), which automates project structure generation from YAML configuration.
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.0
3
+ Version: 3.3.1
4
4
  Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
5
5
  Author: httpdss
6
- License: MIT
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 :: MIT License
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
- - [GitHub Action](https://github.com/httpdss/structkit-action) — validate, generate, or drift-check in CI
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 tap httpdss/structkit && brew install structkit`
106
+ - [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
107
+ - Linux `.deb` / `.rpm` — download from [build-linux-packages](https://github.com/httpdss/structkit/actions/workflows/build-linux-packages.yaml) workflow artifacts (not attached to GitHub Releases), 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
- MIT License - see [LICENSE](LICENSE) for details.
247
+ Apache-2.0 License - see [LICENSE](LICENSE) for details.
240
248
 
241
249
  ## 💰 Support
242
250
 
@@ -1,6 +1,6 @@
1
1
  structkit/__init__.py,sha256=NUdm0byilRA0-t0KCBmbJJvVbeNyC0q-XuQyQX4wFnE,160
2
2
  structkit/completers.py,sha256=3kOzXygY3lno8RdJgM2ri3AH_koxzJOGmXYJsoUuMuk,2018
3
- structkit/config.py,sha256=FlChEA5EEBFWaUTtiPBNWMwINtTC-1FFVwJnAR8n8B4,6039
3
+ structkit/config.py,sha256=mojjd_6RY0gy01l0xAyAvUYZz_XzKjFjO0LTgjNmZtc,6410
4
4
  structkit/content_fetcher.py,sha256=5dgjv2J_9SIBgVvetYb12Vs_BN2MoD_gPdEXUcPTvsI,9609
5
5
  structkit/file_item.py,sha256=j0fogUoGk5PkUPrOadaXMKsyth-PZihx0awNgK0olkw,7336
6
6
  structkit/filters.py,sha256=AXbYxEM_pKHhJUeAuQyN1CGfNvfZHThc0j_XQCmLbvI,4796
@@ -37,7 +37,7 @@ structkit/contribs/chef-cookbook.yaml,sha256=P2OQd63B6PHU6u3kuRi_sU7CVd4Jb_Le9rH
37
37
  structkit/contribs/ci-cd-pipelines.yaml,sha256=BaE9CjkTEAgadBUsly5Q5cSiJ2ULwQjnV7pvhb_fnWg,1933
38
38
  structkit/contribs/cloudformation-files.yaml,sha256=bGP6-zeMmvSjbr5EsvNXukmTQ840nif89rVeayFeoSk,855
39
39
  structkit/contribs/docker-files.yaml,sha256=EqzAyQ-m9OpvZFyMtrxMjYhZk51kFGYyKdeDSaUPc8o,752
40
- structkit/contribs/documentation-template.yaml,sha256=J5QKXosdEDLlhvIU37hkuNK3KlPIdX5xE1hCKmY7S7g,971
40
+ structkit/contribs/documentation-template.yaml,sha256=LVwOZOlyx7Ewu3He9r9Fgt_Sei15NysOVm0hnivRA0s,965
41
41
  structkit/contribs/git-hooks.yaml,sha256=SekIVw2khlKU4QWWcdfO_9ol1qtb_E1bj7b1dMQjtjw,647
42
42
  structkit/contribs/helm-chart.yaml,sha256=MQ96X_emkmvAuiHoT8MuC72wPBloKqe_NsP-rRVJZyM,5013
43
43
  structkit/contribs/kubernetes-manifests.yaml,sha256=nk3ZBzj1nOhGWGazXByBcFCD3bC8tsiEy7P6wjMfN3w,2896
@@ -56,7 +56,7 @@ structkit/contribs/github/instructions/generic.yaml,sha256=enF0mSUsmv_uSVbiD5c2j
56
56
  structkit/contribs/github/prompts/generic.yaml,sha256=L37Ez5fFdY2xUtnITJTnKJ8jZNMgvkds3kgIYd37s08,251
57
57
  structkit/contribs/github/prompts/react-form.yaml,sha256=xTPpO1pZ4AkTTnxcsOf5rJ3AYoHlWrGChCod5v4zX3U,936
58
58
  structkit/contribs/github/prompts/security-api.yaml,sha256=roJpIFJiwc0uPbDPKgR8clAJSCLAkqFb6oceWSdb2QI,517
59
- structkit/contribs/github/prompts/struct.yaml,sha256=DBJLBI198OPVQphD4npfWu_Tf11vfBPZGo55ou0DtoY,4548
59
+ structkit/contribs/github/prompts/struct.yaml,sha256=tW2wiF5cu7w_V8QinCcEDzjGXXdPisqO34j4XL1e73Q,4551
60
60
  structkit/contribs/github/workflows/codeql.yaml,sha256=NzUH2cHjgOwQBc3IDaKVFYPsfhVo151g6AOfTTIi8Ls,4648
61
61
  structkit/contribs/github/workflows/execute-tf-workflow.yaml,sha256=NRieIgePO9enk65kGOzLBZck7I-E974fhUbqY3Zuhxs,1464
62
62
  structkit/contribs/github/workflows/labeler.yaml,sha256=lpszSNFmaoFiXat-eAXEf-QHtg4B-3kpMNvcBaleF_U,2950
@@ -80,9 +80,9 @@ structkit/contribs/terraform/apps/generic.yaml,sha256=RClgHvjyeiHGkW3MqbMzuxPk4o
80
80
  structkit/contribs/terraform/apps/github-organization.yaml,sha256=-JJf691uoK286KllE6boWkDZhpK4Q_8ry26YXlqtav0,1155
81
81
  structkit/contribs/terraform/apps/init.yaml,sha256=BhZc4LqHfe_T1tmBmC-w_xGn5Ad2hhl0TdNhBJNEapM,489
82
82
  structkit/contribs/terraform/modules/generic.yaml,sha256=tflQFhe9RAUOwP4lGSd6_bKuFOkFswkNAyMVWTjuXBY,1787
83
- structkit-3.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
84
- structkit-3.3.0.dist-info/METADATA,sha256=1VCgo4isgtNNviQJrV1eEJGJn9OA61QeOlkcBL3T86M,11254
85
- structkit-3.3.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
86
- structkit-3.3.0.dist-info/entry_points.txt,sha256=xJ-CjU6FUT2--cnTVqYIvHvvjihRQCZfel75L0iLvj8,50
87
- structkit-3.3.0.dist-info/top_level.txt,sha256=hXn8F2XQ9ZStiqI_jAcqJYUI9S362zBTzElR4rhOBbI,10
88
- structkit-3.3.0.dist-info/RECORD,,
83
+ structkit-3.3.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
84
+ structkit-3.3.1.dist-info/METADATA,sha256=rhxZBA1V1vAoGxEKq5H_54ENaSL8yk6XXtx59vZ0byU,12299
85
+ structkit-3.3.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
86
+ structkit-3.3.1.dist-info/entry_points.txt,sha256=xJ-CjU6FUT2--cnTVqYIvHvvjihRQCZfel75L0iLvj8,50
87
+ structkit-3.3.1.dist-info/top_level.txt,sha256=hXn8F2XQ9ZStiqI_jAcqJYUI9S362zBTzElR4rhOBbI,10
88
+ structkit-3.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (84.0.0)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5