cmd

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package cmd holds the cobra command tree for the mmb CLI.

R8.1 — every command is a thin shim over `internal/client.Client.Do` so the OpenAPI contract is the single source of truth. Tests in this package spin up an httptest.NewServer and assert that each command's outgoing request (method + path + auth header + body shape) matches the contract.

Index

Constants

View Source
const AgentContextSchemaVersion = "1"

AgentContextSchemaVersion is bumped when the shape of the JSON emitted by `mmb agent-context` changes in a backwards-incompatible way (renamed/removed fields). Additive changes do NOT bump it. Agents pin against this version so they can detect breakage in CI.

View Source
const EnvFeedbackEndpoint = "MONSTERMAILBOX_FEEDBACK_ENDPOINT"

EnvFeedbackEndpoint is the env var that, when set, causes `mmb feedback "..."` to ALSO POST the entry to that URL after writing the local JSONL log. Surfaced in agent-context's endpoints.feedback_upstream so agents can detect whether their reports reach maintainers.

Variables

View Source
var Version = "dev"

Version is set at link-time via -ldflags "-X github.com/theinventor/monstermailbox-cli/cmd.Version=v0.x.y" (that's how goreleaser stamps release builds). For users who install via `go install github.com/theinventor/monstermailbox-cli@latest`, ldflags aren't applied, so init() falls back to the module version Go embeds in runtime/debug.BuildInfo — that's a real semver tag like "v0.2.0", which lets `mmb update` work instead of skipping with "dev build".

Source checkouts (`go run ./` or `go build` without ldflags) report "(devel)" in BuildInfo, which we treat as the dev sentinel so local development still skips the updater.

Functions

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd builds the cobra command tree. Exposed as a constructor (rather than a package-level var) so tests can build a fresh tree per test, with their own io.Writer for stdout/stderr capture.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL