Skip to main content

Synopsis

dorgu generate [path] [flags]
Analyze a containerized application and generate production-ready Kubernetes manifests, ArgoCD configuration, CI/CD pipelines, and documentation. The path should point to a directory containing a Dockerfile or docker-compose.yml. Defaults to . if omitted.

Flags

FlagTypeDefaultDescription
-o, --outputstring./k8sOutput directory for generated files
-n, --namestringauto-detectedOverride application name
--namespacestringfrom configTarget Kubernetes namespace
--dry-runboolfalsePrint to stdout without writing files
--skip-argocdboolfalseSkip ArgoCD Application generation
--skip-ciboolfalseSkip CI/CD workflow generation
--skip-personaboolfalseSkip persona document generation
--llm-providerstringfrom configLLM provider: openai, anthropic, gemini, ollama
--skip-validationboolfalseSkip post-generation validation checks

Pipeline

The generate command runs a multi-stage pipeline:
  1. Analysis — Parses Dockerfile, docker-compose.yml, and source code to detect language, framework, ports, health endpoints, and dependencies
  2. LLM enhancement (optional) — Enriches analysis with deeper framework understanding, resource sizing, and security recommendations
  3. Generation — Produces Kubernetes manifests from the analysis results
  4. Validation — Checks generated manifests for correctness and best practices
  5. Output — Writes files to disk (or stdout with --dry-run)

Examples

Basic generation:
dorgu generate .
Generate from a specific directory:
dorgu generate ./my-app
Custom output directory:
dorgu generate ./my-app --output ./manifests
Preview without writing files:
dorgu generate . --dry-run
With LLM-enhanced analysis:
dorgu generate . --llm-provider openai
Override app name and namespace:
dorgu generate . --name order-service --namespace commerce
Generate only K8s manifests (no ArgoCD, CI, or persona):
dorgu generate . --skip-argocd --skip-ci --skip-persona
Skip validation (useful for quick iterations):
dorgu generate . --skip-validation

Output files

FileDescription
k8s/deployment.yamlKubernetes Deployment with resource limits, health probes, security context
k8s/service.yamlClusterIP Service mapping detected ports
k8s/ingress.yamlIngress with TLS via cert-manager (if configured)
k8s/hpa.yamlHorizontalPodAutoscaler with CPU-based scaling
k8s/argocd/application.yamlArgoCD Application pointing to your repo
.github/workflows/deploy.yamlGitHub Actions CI/CD pipeline
PERSONA.mdHuman-readable persona document

Validation report

After generation, a validation report runs automatically (unless --skip-validation is set). The report checks:
CheckSeverityDescription
Resource limitsWarningLimits should be greater than or equal to requests
Port consistencyErrorService ports must match deployment container ports
Health probesWarningLiveness and readiness probes should be configured
Security contextWarningContainers should run as non-root with read-only filesystem
HPA boundsWarningMin replicas should be less than max replicas
Ingress hostWarningIngress should have a host configured
Image placeholderWarningImage should not be a placeholder value
kubectl dry-runErrorManifests must pass kubectl apply --dry-run=client
Issues are reported with severity levels: Error (must fix), Warning (should fix), and Info (recommendation).