Setup Go CLI
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Generate a complete, buildable, agent-friendly command-line tool in Go at the repository root: a thin entry point, all behaviour in internal/ packages with unit and end-to-end tests, quality and release configuration, and a docs generator.
Purpose
iru-setup-go-cli bootstraps a Go CLI from templates embedded in the skill’s reference/ files. The behaviour is the catalog’s language-agnostic CLI contract (streams, a single exit-code table, TTY/colour/prompt rules, machine-readable output, safety annotations, flags-env-config precedence, self-description, signal handling) implemented idiomatically with Cobra.
It writes:
-
go.mod(go <minor>.0plus atoolchainline) andgo.sum; -
a thin
cmd/<bin>/main.gothat only callscli.Main, with a testscript drivermain_test.go; -
internal/cli(Cobra root, typed*cli.Error, exit codes 0-7/130/143 mapped in one place, JSON error envelope, colour and prompt handling, config, signals) with the sample commandsgreet,schema,versionandcompletion; -
internal/version(ldflags-injected version,0.1.0-devin-tree); -
with
ui: tui, a Bubble Tea v2 and Lip Gloss v2browsecommand ininternal/tui(rendering only the names that fit the window), plus, per the catalog’s UI contract (see Building user interfaces), a root.ui-quality.yml, aninternal/tui/ui_screenshots_test.gohelper and UI tests that capture every list state in each direction as.ui-screenshots/screen/Model/<state>--<direction>--no-color.txtwith asserted accessibility checks; -
unit tests plus testscript end-to-end scripts under
testdata/script/; -
a golangci-lint v2
.golangci.yml, a GoReleaser v2.goreleaser.yaml(whendistributionis notnone), andtools/gendocs(man pages, Markdown, completions and the Antoracli-reference.adoc).
The skill announces whether it is scaffolding from scratch or updating an existing Go CLI. For every file group it owns that already exists it warns and asks Update / Keep as is / Replace / Stop (unless on-existing decides), and it never overwrites hand-written Go or txtar files. Module versions are looked up live (proxy.golang.org, go.dev) with a dated fallback table. It writes no workflow, .gitignore, README, CHANGELOG, LICENSE, Antora site or Sonar file; the sibling skills chained by Setup CLI Repository own those. Its layout is the scaffold contract that the iru-go-* skills detect.
Plugin
Shipped by the iru-cli plugin of the ai-catalog marketplace (install with /plugin install iru-cli@ai-catalog; see Plugins).
Inputs
All inputs are optional key: value lines in args; any key found is resolved and its question skipped. Unknown keys from a full shared-args set are ignored and named in the report.
| Argument | Required | Description | Default |
|---|---|---|---|
|
Yes (unless supplied via |
The command users type, matching |
Repository directory name, lower-cased |
|
No |
Go module path. A major version of 2 or more needs a |
|
|
Yes (unless supplied via |
One sentence used in the root command, package comment and GoReleaser descriptions; a trailing period is added. |
None |
|
No |
|
|
|
No |
|
|
|
No |
|
Latest stable minor |
|
No |
GitHub owner used for the module path, release URLs and package-channel repositories. |
Derived from |
|
No |
In-tree version (afterwards owned by Go Bump Version). |
|
|
No |
Display name or SPDX id, or |
Asked (MIT recommended) |
|
No |
WinGet publisher and report details. |
Asked |
|
No |
Recorded for the report only; no file written here carries them. |
Unset |
|
No |
|
|
|
No |
Comma list, only with |
All three |
|
No |
|
|
|
No |
|
|
|
No |
|
|
Outputs
-
With
ui: tui, the root.ui-quality.yml(its own Step 1 group: Update keepsdirections/themesand any existingaccessibility, Replace rewrites it) andinternal/tui/ui_screenshots_test.go; a run leaves 8 captures under.ui-screenshots/screen/Model/(4 states ×ltr/rtl), to be gitignored by Setup Go Gitignore. These UI-contract additions are flagged in the skill as not compiled on the authoring machine, so the firstui: tuirun’s verification step is their proof. -
The Go module and source skeleton described under Purpose, written with Step 1’s per-group decision applied to existing files.
-
A verified project: build, vet (also
GOOS=windowsandlinux/arm64),gofmt, race tests, coverage of at least 80%, golangci-lint, govulncheck, gendocs output, and contract smoke checks against the built binary; with GoReleaser installed,goreleaser checkand a snapshot release. -
A report of the resolved names,
go/toolchainlines, version, license, distribution and channels, the mode, and per file group the action taken (created, updated, replaced or kept as is, with mismatches for kept groups), which versions were live versus fallback, ignoredargskeys, every verification result (unverified items with the reason), and suggested follow-up Antora pages. -
A scaffold-contract table (exact names, commands and paths that downstream
iru-go-*skills rely on) and a warning block: review generated files, run Setup Go Gitignore, treat exit codes and JSON field names as a public interface, create release secrets and tap/bucket repositories before the firststorerelease, and add aLICENSEfile.
Execution flow
Dependencies
Invokes
None — iru-setup-go-cli is a leaf skill; it does not call any other skill in this catalog. Its Step 7 verification commands (tests, lint, GoReleaser) are run through the iru-gate-runner agent rather than through gate skills.
Invoked by
-
Setup CLI Repository — the command-line tool orchestrator runs
iru-setup-go-clias its scaffold step for thegolanguage, passing the shared bootstrap inputs throughargs.
Related agents
-
iru-gate-runner— Step 7 runs the long-output checks (tests, lint, GoReleaser) through this agent so the caller gets a compact pass/fail summary.
Source
SKILL.md on GitHub — the file this page was generated from.