Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/web/dist/detect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","name":"DevOpsGen","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, Windows, macOS","description":"devopsgen detect inspects the current project and reports the programming stack, the files it based its decision on, and candidate application types.","url":"https://bangkahdev.github.io/DevOpsGen/","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://bangkahdev.github.io/DevOpsGen/"},{"@type":"ListItem","position":2,"name":"detect","item":"https://bangkahdev.github.io/DevOpsGen/detect/"}]}]}</script>
</head>
<body>
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link is-active" href="../detect/" aria-current="page">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link" href="../exit-codes/">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">command reference</p><h1>devopsgen detect</h1><p class="lede">Inspect the current project and report what DevOpsGen would scaffold for it: the programming stack, the exact files that shaped the decision, and the candidate application types.</p></header><figure class="shot shot-feature"><a href="../img/detect.png" target="_blank" rel="noopener noreferrer"><img src="../img/detect.png" alt="devopsgen detect output in a terminal reporting stack go with indicators go.mod" loading="lazy" decoding="async"/></a><figcaption>devopsgen detect inside a Go module — chain of evidence straight from the filesystem.</figcaption></figure><h2>Reading the output</h2><div class="table-wrap"><table><thead><tr><th>Line</th><th>Meaning</th></tr></thead><tbody><tr><td><code>stack: go</code></td><td>The detected programming stack (<code>go</code> or <code>nodejs</code>).</td></tr><tr><td><code>indicators: go.mod, ...</code></td><td>The files that produced evidence — your audit trail for why the stack matched.</td></tr><tr><td><code>app-type candidates: binary</code></td><td>Application types plausible for this project; the wizard default comes from here too.</td></tr></tbody></table></div><h2>How it decides</h2><ul><li>Go — <code>go.mod</code> and its module directive looking like <code>module example.com/app</code>.</li><li>Node.js — <code>package.json</code>, plus its dependencies, and lockfile flavours (npm / pnpm) that later steer Docker image commands.</li><li>Ambiguity or zero indicators produce a distinct exit code (see <a href="../exit-codes/">exit codes</a>), so scripts can branch safely.</li></ul><div class="callout">Detection semantics: DevOpsGen detects in the current working directory, not in <code>--output-dir</code>. Run it from the project you want scanned.</div></main></div><footer class="footer"><p>DevOpsGen — deterministic DevOps scaffolding for Go &amp; Node.js. <a href="../getting-started/">Get started</a> or browse the <a href="../exit-codes/">exit codes</a>.</p><p class="footer-links"><a href="https://bangkahdev.github.io/DevOpsGen/">canonical site</a> · <a href="https://github.com/Bangkahdev/DevOpsGen">source code</a></p></footer>
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link is-active" href="../detect/" aria-current="page">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link" href="../exit-codes/">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">command reference</p><h1>devopsgen detect</h1><p class="lede">Inspect the current project and report what DevOpsGen would scaffold for it: the programming stack, the exact files that shaped the decision, and the candidate application types.</p></header><figure class="shot shot-feature"><a href="../img/detect.png" target="_blank" rel="noopener noreferrer"><img src="../img/detect.png" alt="devopsgen detect output in a terminal reporting stack go with indicators go.mod" loading="lazy" decoding="async"/></a><figcaption>devopsgen detect inside a Go module — chain of evidence straight from the filesystem.</figcaption></figure><h2>Reading the output</h2><div class="table-wrap"><table><thead><tr><th>Line</th><th>Meaning</th></tr></thead><tbody><tr><td><code>stack: go</code></td><td>The detected programming stack (<code>go</code> or <code>nodejs</code>).</td></tr><tr><td><code>indicators: go.mod, ...</code></td><td>The files that produced evidence — your audit trail for why the stack matched.</td></tr><tr><td><code>app-type candidates: binary</code></td><td>Application types plausible for this project; the wizard default comes from here too.</td></tr></tbody></table></div><h2>How it decides</h2><ul><li>Go — <code>go.mod</code> and its module directive looking like <code>module example.com/app</code>.</li><li>Node.js — <code>package.json</code>, plus its dependencies, and lockfile flavours (npm / pnpm) that later steer Docker image commands.</li><li>Ambiguity or zero indicators produce a distinct exit code (5) so scripts can branch safely — see <a href="../exit-codes/">exit codes</a>.</li></ul><div class="callout">Detection semantics: DevOpsGen detects in the current working directory, not in <code>--output-dir</code>. Run it from the project you want scanned.</div></main></div><footer class="footer"><p>DevOpsGen — deterministic DevOps scaffolding for Go &amp; Node.js. <a href="../getting-started/">Get started</a> or browse the <a href="../exit-codes/">exit codes</a>.</p><p class="footer-links"><a href="https://bangkahdev.github.io/DevOpsGen/">canonical site</a> · <a href="https://github.com/Bangkahdev/DevOpsGen">source code</a></p></footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/web/dist/exit-codes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","name":"DevOpsGen","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, Windows, macOS","description":"Every devopsgen command exits with a documented status code: 0 success, 1 general error, 2 invalid configuration, 3 file conflicts, 4 validation failure, 5 ambiguous detection.","url":"https://bangkahdev.github.io/DevOpsGen/","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://bangkahdev.github.io/DevOpsGen/"},{"@type":"ListItem","position":2,"name":"exit codes","item":"https://bangkahdev.github.io/DevOpsGen/exit-codes/"}]}]}</script>
</head>
<body>
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link" href="../detect/">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link is-active" href="../exit-codes/" aria-current="page">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">ci integration</p><h1>Exit codes</h1><p class="lede">Every DevOpsGen command exits with a stable, documented status code so shells, scripts and CI jobs can branch deterministically — no output parsing required.</p></header><div class="table-wrap"><table><thead><tr><th>Code</th><th>Classification</th><th>Meaning</th><th>Typical example</th></tr></thead><tbody><tr><td class="num">0</td><td><span class="badge badge-ok">success</span></td><td>Everything requested completed; dry-run plans that resolved cleanly also end here.</td><td><code>init</code> created 5 files; <code>--dry-run --force</code> plan is green.</td></tr><tr><td class="num">1</td><td><span class="badge badge-err">general error</span></td><td>Unexpected failure — I/O errors, template issues, or a run that failed mid-write and rolled back.</td><td>Disk full while writing <code>deployment.yaml</code>.</td></tr><tr><td class="num">2</td><td><span class="badge badge-err">invalid input</span></td><td>Configuration failed validation before anything was planned or written.</td><td><code>--image BANGKAH/my-app</code>; port <code>-1</code>; Ingress without host.</td></tr><tr><td class="num">3</td><td><span class="badge badge-warn">conflict</span></td><td>Target files already exist and would be overwritten; nothing was written. Retried with <code>--force</code>.</td><td>Second <code>init</code> without <code>--force</code>.</td></tr><tr><td class="num">4</td><td><span class="badge badge-err">validation failed</span></td><td>Generated documents exist but do not pass static lint rules.</td><td>Unpinned workflow action in <code>ci.yaml</code>.</td></tr><tr><td class="num">5</td><td><span class="badge badge-warn">detection</span></td><td>Stack detection was ambiguous or found nothing at all.</td><td>Empty directory without <code>go.mod</code> / <code>package.json</code>.</td></tr></tbody></table></div><h2>In practice</h2><div class="screen-strip"><figure class="shot "><a href="../img/invalid-config.png" target="_blank" rel="noopener noreferrer"><img src="../img/invalid-config.png" alt="devopsgen exiting with code 2 after failing image validation" loading="lazy" decoding="async"/></a><figcaption>Exit 2 — config rejected before planning.</figcaption></figure><figure class="shot "><a href="../img/init-conflict.png" target="_blank" rel="noopener noreferrer"><img src="../img/init-conflict.png" alt="devopsgen exiting with code 3 on existing files" loading="lazy" decoding="async"/></a><figcaption>Exit 3 — conflict, nothing written.</figcaption></figure></div><div class="code-block"><span class="code-label">shell script branching</span><pre><code>devopsgen init --stack go --registry ghcr --image you/myapp --port 8080
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link" href="../detect/">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link is-active" href="../exit-codes/" aria-current="page">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">ci integration</p><h1>Exit codes</h1><p class="lede">Every DevOpsGen command exits with a stable, documented status code so shells, scripts and CI jobs can branch deterministically — no output parsing required.</p></header><div class="table-wrap"><table><thead><tr><th>Code</th><th>Classification</th><th>Meaning</th><th>Typical example</th></tr></thead><tbody><tr><td class="num">0</td><td><span class="badge badge-ok">success</span></td><td>Everything requested completed; dry-run plans that resolved cleanly also end here.</td><td><code>init</code> created 5 files; <code>--dry-run --force</code> plan is green.</td></tr><tr><td class="num">1</td><td><span class="badge badge-err">general error</span></td><td>Unexpected failure — I/O errors, template issues, or a run that failed mid-write and rolled back.</td><td>Disk full while writing <code>deployment.yaml</code>.</td></tr><tr><td class="num">2</td><td><span class="badge badge-err">invalid input</span></td><td>Configuration failed validation before anything was planned or written.</td><td><code>--image BANGKAH/my-app</code>; port <code>-1</code>; Ingress without host.</td></tr><tr><td class="num">3</td><td><span class="badge badge-warn">conflict</span></td><td>Target files already exist and would be overwritten; nothing was written. Retried with <code>--force</code>.</td><td>Second <code>init</code> without <code>--force</code>.</td></tr><tr><td class="num">4</td><td><span class="badge badge-err">validation failed</span></td><td>Rejected output: a template rendering failure, required artifacts missing, or generated documents failing the static lint rules.</td><td>A workflow that never publishes the commit SHA tag.</td></tr><tr><td class="num">5</td><td><span class="badge badge-warn">detection</span></td><td>Stack detection was ambiguous or found nothing at all.</td><td>Empty directory without <code>go.mod</code> / <code>package.json</code>.</td></tr></tbody></table></div><h2>In practice</h2><div class="screen-strip"><figure class="shot "><a href="../img/invalid-config.png" target="_blank" rel="noopener noreferrer"><img src="../img/invalid-config.png" alt="devopsgen exiting with code 2 after failing image validation" loading="lazy" decoding="async"/></a><figcaption>Exit 2 — config rejected before planning.</figcaption></figure><figure class="shot "><a href="../img/init-conflict.png" target="_blank" rel="noopener noreferrer"><img src="../img/init-conflict.png" alt="devopsgen exiting with code 3 on existing files" loading="lazy" decoding="async"/></a><figcaption>Exit 3 — conflict, nothing written.</figcaption></figure></div><div class="code-block"><span class="code-label">shell script branching</span><pre><code>devopsgen init --stack go --registry ghcr --image you/myapp --port 8080
case $? in
0) echo &quot;ready&quot; ;;
3) devopsgen init --force --stack go --registry ghcr --image you/myapp --port 8080 ;;
Expand Down
Loading
Loading