Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Go CLI

$ go Official Low Risk
The Go Authors · Code & DevOps · BSD-3-Clause · macos / linux / windows

The official Go command-line toolchain covering builds, modules, vetting, formatting, and testing. Features built-in go list -json, streaming go test -json event logs, and go build -n dry-run command printing with fast compilation.

FCRS-1.0 Score
94 /100
Excellent
High Confidence
Zero-Friction Install
brew install go
CLI vs MCP Decision CLI Only

Executes local compilation, go vet, and go test -json directly on Go packages with sub-second caching.

Agent-Readiness Checklist

Local Probe Evidence
✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
go version go1.26.5 darwin/arm64
Startup
11 ms
Exit Codes (help / invalid)
2 / 2
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
Go is a tool for managing Go source code.

Usage:

	go <command> [arguments]

The commands are:

	bug         start a bug report
	build       compile packages and dependencies
	clean       remove object files and cached files
	doc         show documentation for package or symbol
	env         print Go environment information
	fix         apply fixes suggested by static checkers
	fmt         gofmt (reformat) package sources
	generate    generate Go files by processing source
	get         add dependencies to current module and install them
	install     compile and install packages and dependencies
	list        list packages or modules
	mod         module maintenance
	work        workspace maintenance
	run         compile and run Go program
	telemetry   manage telemetry data and settings
	test        test packages
	tool        run specified go tool
	version     print Go version
	vet         report likely mistakes in packages

Use "go help <command>" for more information about a command.

Additional help topics:

	buildconstraint build constraints
	buildjson       build -json encoding
	buildmode       build modes
	c               calling between Go and C
	cache           build and test caching
	environment     environment variables
	filetype        file types
	goauth          GOAUTH environment variable
	go.mod          the go.mod file
	gopath          GOPATH environment variable
	goproxy         module proxy protocol
	importpath      import path syntax
	modules         modules, module versions, and more
	module-auth     module authentication using go.sum
	packages        package lists and patterns
	private         configuration for downloading non-public code
	testflag        testing flags
	testfunc        testing functions
	vcs             controlling version control with GOVCS

Use "go help <topic>" for more information about that topic.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

Built-in go list -json, go test -json, go version -m, go build -n, and zero interactive prompts across the entire CLI.

  • go test -json streams structured per-test JSON events
  • go list -json outputs complete package and module JSON
Trust & Safety 22 / 25

Deterministic module checksums (go.sum), build -n dry-run, and zero remote publishing side effects.

  • Cryptographic go.sum verification and -n dry-run mode
Setup & Portability 14 / 15

Self-contained toolchain archive or Homebrew/system package across macOS, Linux, and Windows.

  • Single toolchain archive with cross-compilation built in
Utility & Efficiency 15 / 15

Fast incremental compiler, built-in gofmt, go vet, race detector, and test runner in one binary.

  • Unified build, test, vet, and module tooling
Maintenance & Lineage 10 / 10

Official Go Authors toolchain backed by Google under BSD-3-Clause with strict Go 1 compatibility guarantee.

  • First-party golang/go toolchain
Docs & Verifiability 9 / 10

Authoritative reference at pkg.go.dev/cmd/go and built-in go help <topic>.

  • Complete command documentation via go help and pkg.go.dev

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Public module resolution needs no auth; private modules read ~/.netrc or git credentials configured alongside GOPRIVATE.

Side Effects
Read-Only Local Write
Cost & Quotas

BSD-3-Clause open-source toolchain; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Go CLI (go) Agent Rules
- Prefer `go test -json ./...` and `go vet ./...` for structured verification.
- Use `go list -json ./...` instead of parsing `go.mod` or directory trees manually.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect Go packages and dependencies as JSON
go list -json ./...

Emits JSON package descriptors (imports, files, module info) without building binaries.

Dry-run build commands without compiling
go build -n ./...

Prints the exact compiler and linker invocations without executing them.

Controlled Writes & Previews

Run tests with structured JSON events
go test -json ./...

Runs package tests and streams per-test pass/fail/output JSON events.

Strengths for Agents

  • + go test -json and go list -json provide first-class structured output out of the box.
  • + Fast incremental build cache and built-in go vet / -race verification.
  • + Zero interactive prompts and strict Go 1 backwards compatibility.

Caveats & Pitfalls

  • ! go build compiler errors are plain text lines rather than JSON (though go test -json captures test output).
  • ! Cross-compiling cgo packages requires target C cross-compilers.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI