Install StackGen's CLI and tools via Homebrew.
- Prerequisites
- Available formulae
- Quick install (StackGen CLI)
- Install other tools
- Configuration
- Usage
-
Homebrew — Install if needed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
StackGen account (for cloud) — Sign up at cloud.stackgen.com
| Formula | Description | Install command |
|---|---|---|
| stackgen | Main CLI — Generative Infrastructure from Code | brew install stackgenhq/homebrew-stackgen/stackgen |
| stackgen-beta | StackGen CLI (beta/RC releases) | brew install stackgenhq/homebrew-stackgen/stackgen-beta |
| stackgen-slo | SLO app — Generative Infrastructure from Code | brew install stackgenhq/homebrew-stackgen/stackgen-slo |
| terraform-importer | Parse Terraform IaC and import into Stackgen | brew install stackgenhq/homebrew-stackgen/terraform-importer |
| cloud2code | Convert cloud resources to tfstate files | brew install stackgenhq/homebrew-stackgen/cloud2code |
| cloud2code-beta | Cloud2code (beta/RC releases) | brew install stackgenhq/homebrew-stackgen/cloud2code-beta |
| logexplorer | Log Explorer | brew install stackgenhq/homebrew-stackgen/logexplorer |
| genie | Generative Infrastructure from Code (Genie) | brew install stackgenhq/homebrew-stackgen/genie |
| stackboot | Generative Infrastructure from Code (StackBoot, macOS only) | brew install stackgenhq/homebrew-stackgen/stackboot |
-
Add the tap and install:
brew tap stackgenhq/homebrew-stackgen brew install stackgenhq/homebrew-stackgen/stackgen
-
Check the install:
stackgen version
Use the same pattern for any formula from the table above:
brew tap stackgenhq/homebrew-stackgen # only needed once
brew install stackgenhq/homebrew-stackgen/<formula>Examples:
brew install stackgenhq/homebrew-stackgen/terraform-importer
brew install stackgenhq/homebrew-stackgen/cloud2code
brew install stackgenhq/homebrew-stackgen/logexplorerThe CLI requires both a base URL and an API token.
| Variable | Required | Description |
|---|---|---|
STACKGEN_URL |
Yes | Base URL of the StackGen API (cloud or on-prem). |
STACKGEN_TOKEN |
Yes | Your API key (personal access token). |
-
Log in at cloud.stackgen.com.
-
Open Personal access tokens and copy your API key.
-
Set both in your shell:
export STACKGEN_URL="https://cloud.stackgen.com" export STACKGEN_TOKEN=<YOUR_API_KEY>
Add these lines to
~/.zshrcor~/.bashrcto make them persistent.
Use your organization’s StackGen URL and API key:
export STACKGEN_URL="https://my-org.stackgen.com"
export STACKGEN_TOKEN=<YOUR_API_KEY>After installing stackgen:
stackgen --helpFor other tools, run the binary name (e.g. terraform-importer --help, logexplorer --help).