cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 33 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 skillcrew command line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Paths      paths.Paths
	In         io.Reader
	Out, Err   io.Writer
	Agents     []agent.Agent
	Scheduler  func(home string) (scheduler.Scheduler, error)
	Opener     propose.Opener
	Executable func() (string, error)
	Now        func() time.Time
	Version    string
	// LockTimeout bounds the wait for a running sync (default 30s).
	LockTimeout time.Duration
	// Background starts skillcrew with args detached from the caller (used by
	// agent hooks, so a session start never waits for the network).
	Background func(args ...string) error
	Args       []string // command line arguments; nil means os.Args[1:]
	// contains filtered or unexported fields
}

App holds the dependencies of every command, so tests can replace them.

func Default

func Default(version string) (*App, error)

Default returns an App wired to the real system.

func (*App) Command

func (a *App) Command() *cobra.Command

Command builds the root command.

func (*App) Execute

func (a *App) Execute(ctx context.Context) int

Execute runs the command line and returns the process exit code. Errors are printed to a.Err, stripped of control characters like any output.

Jump to

Keyboard shortcuts

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