cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Overview

Package cli wires Phase 1 packages into the cobra command tree exposed by cmd/ccx.

Package cli holds the cobra command tree for ccx. Each subcommand is one file. The package wires together every other internal/* package and is built during Phase 2 integration. See docs/superpowers/plans (plan P2) for the implementation plan.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, build BuildInfo) int

Execute is the production entry point using os.Args and os.Stdin/out/err.

func Run

func Run(ctx context.Context, opts Options) int

Run builds the root cobra command from Options and executes it.

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo carries version metadata baked in at build time.

type Deps

type Deps struct {
	Store    contracts.Store
	Profiles *profile.Manager
	Scanner  contracts.Scanner
	Pricing  contracts.PricingTable
	Shell    contracts.ShellEmitter
}

Deps holds the live implementations every subcommand may need.

func (*Deps) Close

func (d *Deps) Close() error

Close releases all resources owned by Deps. Safe to call on a zero value.

type Options

type Options struct {
	Args          []string
	Stdin         io.Reader
	Stdout        io.Writer
	Stderr        io.Writer
	Build         BuildInfo
	DaemonRoot    string
	DaemonProcess daemon.ProcessManager
	Executable    string
	OpenBrowser   func(string) error
}

Options configures a single Run invocation, used by tests and main.

Jump to

Keyboard shortcuts

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