commands

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package commands implements the CLI command structure using Cobra.

Index

Constants

View Source
const (
	ExitSuccess    = 0
	ExitValidation = 1
	ExitProvider   = 2
	ExitNetwork    = 3
)

Exit codes

Variables

View Source
var (
	// Version is the semantic version of the CLI.
	Version = "dev"
	// Commit is the git commit hash.
	Commit = "unknown"
	// BuildDate is the date when the binary was built.
	BuildDate = "unknown"
)

Version information set at build time via ldflags. Example: go build -ldflags "-X github.com/petal-labs/iris/cli/commands.Version=v1.0.0"

Functions

func Execute

func Execute() error

Execute runs the root command.

func GetConfig

func GetConfig() *config.Config

GetConfig returns the loaded configuration.

func GetModel

func GetModel() string

GetModel returns the effective model ID (flag or config default).

func GetProvider

func GetProvider() string

GetProvider returns the effective provider ID (flag or config default).

func IsJSONOutput

func IsJSONOutput() bool

IsJSONOutput returns true if JSON output is enabled.

func IsVerbose

func IsVerbose() bool

IsVerbose returns true if verbose output is enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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