command reference
devopsgen init
Initialize DevOps configuration. In an interactive terminal with no complete configuration the TUI wizard is launched; when all required parameters are supplied via flags the process runs headless and never waits for stdin.
devopsgen init [flags]Flags
| Flag | Default | Description |
|---|---|---|
| --stack | auto-detected | Project stack: go or nodejs. |
| --app-type | auto-detected | Application type (see devopsgen list). |
| --ci | github-actions | CI provider. |
| --registry | dockerhub | Container registry: dockerhub or ghcr. |
| --image | — | Image repository as namespace/repository — no host and no tag. |
| --tag | latest | Additional image tag alias. |
| --port | — | Application port, 1–65535. |
| --k8s | true | Generate Kubernetes manifests. |
| --ingress | off | Enable Kubernetes Ingress (requires --ingress-host). |
| --ingress-host | — | Ingress hostname, validated as RFC 1123. |
| --health-path | — | HTTP health probe path wired into manifests. |
| --build-cmd | — | Build command. |
| --build-path | . | Go package path to build inside the container. |
| --start-cmd | — | Startup command. |
| --test-cmd | — | Test command. |
| --output-dir | . | Output directory. |
| --dry-run | off | Simulate without writing anything. |
| --force | off | Overwrite existing regular files. |
Success & conflict behaviour
A clean run writes every template and exits with 0. A second run over an existing project stops before touching anything and exits with 3 until you add --force; a detailed walkthrough of that re-run path is on the exit codes page.

Preview plans with --dry-run
--dry-run prints the byte-plan and writes nothing. On a fresh project it lists pure create rows and exits 0; combined with --force over an existing project it lists the exact files that would be replaced — still 0:


Config validation
Invalid configuration fails fast with 2 before any file is planned and never writes files — e.g. an image that must be namespace/repository without host or tag, a port outside 1–65535, or an Ingress without a host. The full code table lives on the exit codes page.
--force keep the previous content as <file>.devopsgen.bak backups, and any failure mid-run triggers a best-effort rollback to the pre-run state.