DevOpsGenDOCSGitHub

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.

synopsis
devopsgen init [flags]

Flags

FlagDefaultDescription
--stackauto-detectedProject stack: go or nodejs.
--app-typeauto-detectedApplication type (see devopsgen list).
--cigithub-actionsCI provider.
--registrydockerhubContainer registry: dockerhub or ghcr.
--image—Image repository as namespace/repository — no host and no tag.
--taglatestAdditional image tag alias.
--port—Application port, 1–65535.
--k8strueGenerate Kubernetes manifests.
--ingressoffEnable 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-runoffSimulate without writing anything.
--forceoffOverwrite 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.

devopsgen init success output with exit code 0
First run: five files created, exit code 0.

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:

devopsgen dry-run plan output showing five create entries with exit code 0
--dry-run on a fresh project: pure create plan, exit code 0.
devopsgen dry-run force plan output where every file would be replaced, exit code 0
--dry-run --force: every file replaced in plan form, exit code 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.

Overwrites performed with --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.