Basic Usage
Learn the core commands and workflows for StructKit.
Subcommands
generate— Generate the project structure based on the YAML configurationgenerate-schema— Generate JSON schema for available structure templatesvalidate— Validate the YAML configuration fileinfo— Display information about a structure definitionlist— List the available structsinit— Initialize a basic .structkit.yamlcompletion— Manage shell completions
Terminalbash
structkit -hGenerate Command
Finding Available Structures
Terminalbash
structkit list
# With auto-completion
structkit generate <Tab>Using Defaults
If you have a .structkit.yaml in the current directory:
Terminalbash
structkit generateSimple Example
Terminalbash
structkit generate terraform/modules/generic ./my-terraform-moduleYAML File Usage
Terminalbash
# Both of these work identically
structkit generate my-config.yaml ./output
structkit generate file://my-config.yaml ./outputDiff Preview
Terminalbash
structkit generate --dry-run --diff file://structure.yaml ./outputComplete Example
Terminalbash
structkit generate \
--log=DEBUG \
--dry-run \
--backup=/path/to/backup \
--file-strategy=rename \
--log-file=/path/to/logfile.log \
terraform-module \
./my-terraform-moduleCommand Options
--log— Set logging level (DEBUG, INFO, WARNING, ERROR)--dry-run— Preview actions without making changes--diff— Show unified diffs for files that would be created/modified--backup— Specify backup directory for existing files--file-strategy— Choose how to handle existing files (overwrite, skip, append, rename, backup)--log-file— Write logs to specified file--mappings-file— Provide external mappings file (can be used multiple times)
Generate Schema Command
Terminalbash
# Generate schema to stdout
structkit generate-schema
# Save schema to file
structkit generate-schema -o schema.json
# With custom structures path
structkit generate-schema -s /path/to/custom/structures -o schema.jsonOther Commands
Initialize a Project
Terminalbash
structkit init
# Or specify a directory
structkit init ./my-projectValidate Configuration
Terminalbash
structkit validate my-structure.yamlList Available Structures
Terminalbash
structkit listShow Information
Terminalbash
structkit info <structure_definition>