cli

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 39 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli implements the idea command-line interface as a thin HTTP client to the daemon (Decision D1).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCodeTable added in v0.7.0

func ExitCodeTable() string

ExitCodeTable renders the taxonomy as the markdown table embedded in docs/cli.md. internal/docsgen splices it between its markers, and `make docs-check` fails when the two differ.

func Main added in v0.7.0

func Main(args []string, stdout, stderr io.Writer) int

Main runs the CLI and returns the process exit code. It is the single exit point: every failure any command returns is classified and rendered here, once.

Where the error goes:

  • Without --json: `idea: <message>` on stderr, as it always was, plus a `hint:` line when the failure carries a specific next step.
  • With --json: `{"error":{…}}` on stdout, so a script reads one stream and parses one document whether the command succeeded or not. The exception is a command that already printed its payload before failing — `idea verify --json` prints the coverage and then exits 5 over an unmet gate. A second document there would make stdout unparseable as JSON, so the error object goes to stderr instead. The rule a script can rely on: under --json, stdout holds exactly one JSON document.

func Run

func Run(args []string, stdout, stderr io.Writer) error

Run dispatches the idea CLI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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