Documentation
¶
Overview ¶
Package cli parses command-line input and renders stable human and JSON output for GitContribute application services.
The package defines adapter-facing request and result contracts but does not own persistence, network, or contribution-workflow decisions. Commands make side effects visible through their names and flags.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitGeneral = 1 ExitUsage = 2 ExitNotFound = 3 ExitNotWired = 4 ExitCancelled = 130 )
Exit codes returned by the CLI.
Variables ¶
var ErrNotWired = errors.New("not wired: integration not yet implemented")
ErrNotWired reports that an optional capability is unavailable from the connected service or runner.
var ErrSetupCancelled = errors.New("setup cancelled")
ErrSetupCancelled reports a deliberate interactive cancellation.
Functions ¶
func NewCLIError ¶
NewCLIError returns an error with a specific exit code.
Types ¶
type CLI ¶
type CLI struct {
// contains filtered or unexported fields
}
CLI is a Kong-based adapter that parses arguments and dispatches to product- owned application services. It owns no domain logic.
func (*CLI) Run ¶
Run parses arguments and dispatches to the appropriate Service or MCPRunner method. It respects context cancellation.
func (*CLI) SetSetupPrompter ¶ added in v0.3.0
func (c *CLI) SetSetupPrompter(prompter SetupPrompter)
SetSetupPrompter replaces the interactive setup adapter. It is intended for tests and alternate accessible frontends.
func (*CLI) SetTUIRunner ¶
SetTUIRunner wires the optional terminal UI adapter.
type SetupPromptQuestion ¶ added in v0.3.0
type SetupPromptQuestion string
SetupPromptQuestion identifies one unresolved onboarding decision.
const ( // SetupQuestionAccess asks where GitContribute should be available. SetupQuestionAccess SetupPromptQuestion = "access" // SetupQuestionClients asks which detected clients to configure. SetupQuestionClients SetupPromptQuestion = "clients" // SetupQuestionAuth asks how later sync commands should authenticate. SetupQuestionAuth SetupPromptQuestion = "auth" )
type SetupPromptRequest ¶ added in v0.3.0
type SetupPromptRequest struct {
Discovery contracts.SetupDiscovery
PackageRunner bool
Questions []SetupPromptQuestion
Mode contracts.SetupMode
Clients []string
TokenSource string
TokenSourceKey string
}
SetupPromptRequest contains resolved flags plus the questions that still require interactive consent.
type SetupPrompter ¶ added in v0.3.0
type SetupPrompter interface {
Select(context.Context, SetupPromptRequest) (SetupSelection, error)
Confirm(context.Context, string) (bool, error)
}
SetupPrompter owns interactive terminal mechanics. Application services never depend on Huh, Bubble Tea, or terminal styling types.
Source Files
¶
- archive_cli.go
- cli.go
- clusters.go
- concern_cli.go
- corpus_commands.go
- corpus_output.go
- doc.go
- doctor_cli.go
- dossier_cli.go
- errors.go
- evidence_cmd.go
- evidence_output.go
- export_commands.go
- health_cli.go
- human_lists.go
- interactive.go
- investigation_thread_cli.go
- investigation_thread_output.go
- investigation_types.go
- mcp.go
- output.go
- radar_cli.go
- readiness_cmd.go
- readiness_output.go
- research_cli.go
- runtime_contract.go
- seeds_cli.go
- setup_cli.go
- setup_progress.go
- setup_prompt.go
- setup_render.go
- sync_cli.go
- tracking.go
- upgrade_cli.go
- validation_cli.go
- validation_commands.go
- validation_output.go
- workspace_cli.go
- workspace_commands.go