Quick Start¶
Quick Start Using Docker¶
- Create a YAML configuration file for your project structure. See sample configuration here.
- Run the following command to generate the project structure:
docker run \
-v $(pwd):/workdir \
-u $(id -u):$(id -g) \
ghcr.io/httpdss/structkit:main generate \
file:///workdir/example/structure.yaml \
/workdir/example_output
Quick Start Using Docker Alpine¶
docker run \
-v $(pwd):/workdir \
-u $(id -u):$(id -g) \
ghcr.io/httpdss/structkit:alpine generate \
file:///workdir/example/structure.yaml \
/workdir/example_output
For testing, you can run an alpine Docker container and install the script inside it:
Inside the container:
apk add python-pip git vim
pip install structkit
mkdir example
cd example/
touch structure.yaml
vim structure.yaml # copy the content from the example folder
structkit generate structure.yaml .
Note: The
file://protocol is automatically added for.yamlfiles, sostructure.yamlandfile://structure.yamlwork identically. Additionally, if your file is named.struct.yamlin the current directory and you want to generate into the current directory, you can just runstructkit generate.
Discovering Available Structures¶
Before generating, see what structures are available:
This shows all built-in structures you can use.
Auto-Completion
If you've enabled auto-completion, you can press Tab after structkit generate to see all available structures!
First Example¶
After installing StructKit, try this simple example:
This will create a new terraform module structure in the ./my-terraform-module directory.
Or try a simple project structure:
Bootstrap a new project¶
Start with a minimal .struct.yaml:
This writes a basic .struct.yaml with hooks, a README, and a reference to the run-structkit workflow.
Next Steps¶
- Learn about YAML Configuration
- Explore Template Variables
- Check out Usage Examples