Skip to content

Installation

  • Go 1.27 or later
  • An active Go module (go.mod)

Run this in your project directory:

Terminal window
go get github.com/larsartmann/cmdguard/v5@latest
import "github.com/larsartmann/cmdguard/v5/pkg/cmdguard/v5"

For convenience, you can alias the import:

import v5 "github.com/larsartmann/cmdguard/v5/pkg/cmdguard/v5"

cmdguard’s core stays lean. Seven optional features live in standalone sub-modules so you import only what you need:

Sub-module Import path Provides
glamour github.com/larsartmann/cmdguard/glamour Markdown help rendering
prompts github.com/larsartmann/cmdguard/prompts Interactive prompts via huh
spinner github.com/larsartmann/cmdguard/spinner Terminal spinner middleware
telemetry github.com/larsartmann/cmdguard/telemetry OpenTelemetry spans
flightrecorder github.com/larsartmann/cmdguard/flightrecorder Runtime trace flight recorder
lint github.com/larsartmann/cmdguard/lint cmdguard usage linter (CG001-CG008)
schema github.com/larsartmann/cmdguard/schema JSON Schema emitter for config structs
Terminal window
go get github.com/larsartmann/cmdguard/glamour
Terminal window
go list -m github.com/larsartmann/cmdguard/v5