cmd

package
v0.0.0-...-b828a87 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActorEnvChain = []string{"TL_ACTOR", "ACTOR_NAME", "BEADS_ACTOR"}

ActorEnvChain is the environment variable fallback chain for automatic actor resolution. Earlier entries take precedence.

View Source
var DefaultDetectActor = defaultDetectActor

DefaultDetectActor is the default auto-detection function, exported so tests can restore DetectedActor after overriding it.

View Source
var DetectedActor = DefaultDetectActor

DetectedActor is called when no explicit actor is provided via CLI flag or environment variable. Tests may override this to simulate agent detection.

Functions

func ErrorExitCode

func ErrorExitCode(err error) int

func Execute

func Execute()

func NewRootCmd

func NewRootCmd() *cobra.Command

func ResolveActor

func ResolveActor(cliFlag string) string

ResolveActor returns the actor identity using this priority:

  1. CLI --actor flag (when non-empty)
  2. Environment variables in ActorEnvChain order
  3. Auto-detection via DetectedActor

func SetVersion

func SetVersion(v string)

SetVersion records the version string baked in by main; cobra surfaces it via `tl --version` and `tl version`.

Types

type ExitError

type ExitError struct {
	Code int
	Err  error
}

func NewExitError

func NewExitError(code int, format string, args ...any) *ExitError

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) ExitCode

func (e *ExitError) ExitCode() int

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

Jump to

Keyboard shortcuts

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