stackctl is a Deno 2.x command line application for repository aware Docker Swarm stack control.
src/main.ts is the executable entry point. It delegates all command processing to src/cli/mod.ts
and exits with the numeric status returned by that module. src/version.ts provides the canonical
CLI version string for runtime use and release automation.
- Thin bootstrapper,
src/main.tscontains process startup only and keeps command behavior inside the CLI module. - Explicit entry point guard,
import.meta.mainprevents process execution when the module is imported. - Centralized version constant,
VERSIONavoids duplicated version literals in source. - Capability constrained runtime, the shebang declares Deno permissions for file IO, environment reads, host inspection, and selected external tools.
- Deno starts
src/main.tswith the permissions declared in the shebang or compiled binary metadata. src/main.tsimportsmainfromsrc/cli/mod.ts.- When executed directly,
Deno.argsis passed tomain. - The CLI module resolves commands, performs repository and Docker Swarm operations, and returns an exit code.
Deno.exitterminates the process with that code.- Consumers that need the release identifier import
VERSIONfromsrc/version.ts.
- Runtime, Deno 2.x with JSR imports configured in
deno.json. - Package entry,
deno.jsonexports./src/main.tsas@anitrend/stackctl. - CLI implementation,
src/cli/mod.tsreceives argument vectors and owns command dispatch. - External tools, Deno run permissions allow
git,docker,docker-compose,sops,age,age-keygen,shred, andrm. - Release metadata,
deno.jsonversion andsrc/version.tsVERSIONmust stay in sync during version updates.