Usage
Command Groups
StackGen CLI commands are grouped by purpose, such as Infrastructure Lifecycle Management, appStack Management, etc.
We've listed the grouping below:
ILM Commands
Command | Description |
---|---|
destroy | Teardown your infrastructure |
drift | Detect and manage infrastructure drift |
provision | Provisions your appStack |
appStack Management Commands
Command | Description |
---|---|
appStack | Manage appStacks for complex codegen |
generate | Generates IaC files and export desired directory |
import | Import infrastructure to StackGen |
Other Commands
Command | Description |
---|---|
configure | Configures the stackgen cli |
project | Retrieve/Manage projects within StackGen |
resource | Resource management commands |
run | Execute any tofu or terraform command |
upload | Upload or manage different policies and rules |
Additional Commands
Command | Description |
---|---|
completion | Generate the autocompletion script for the specified shell |
help | Help about any command |
version | Prints the version of the stackgen cli |
Quick Commands
Click to view
Help on Usage
stackgen help
Enter the CLI Container
docker run -it --rm -p 50525:50525 -v ~/.appcd:/app/.appcd ghcr.io/appcd-dev/appcd-dist/stackgen-cli:latest
note
This will switch the terminal prompt to the StackGen CLI container where StackGen can be run.
Login or Configure Authentication:
stackgen configure
note
This will present you with a clickable link to copy and paste into your browser on your main machine to complete login.
Connect to a Repository
export APPCD_GIT_AUTH_TOKEN={token with readonly access to desired repositories}
Exporting a valid token allows stackgen appStack create to display your available repositories and branches for easier selection.
Create an appStack
stackgen appstack create
Create appStack Version
stackgen appstack create-version <name of appStack> --local-analysis
List appStacks
stackgen appstack show
Download or Generate IaC Files for an appStack
stackgen appstack download-iac --uuid <uuid of appStack output in prior step> --destination <path/to/file.zip>
note
By default, the docker run
command above creates a volume in /app/.stackgen
in the container, so any files written there will be synced to ~/.stackgen
on the host machine.