cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CodeOK means the run completed or a help or version request was served.
	CodeOK = 0
	// CodeErr covers failures with no more specific code.
	CodeErr = 1
	// CodeNoClaude means the claude binary was not found.
	CodeNoClaude = 2
	// CodeNoRepo means the working directory is not inside a git repository.
	CodeNoRepo = 3
	// CodeRepoState means the repository is mid-rebase, mid-merge, or mid-cherry-pick.
	CodeRepoState = 4
)

Exit codes returned by Execute. Once claude starts, its own exit code is mirrored instead.

Variables

View Source
var (
	// ErrNoClaude reports that the claude binary could not be resolved.
	ErrNoClaude = errors.New("claude cli not found")
	// ErrNoRepo reports that the working directory is not in a git repository.
	ErrNoRepo = errors.New("not inside a git repository")
	// ErrRepoState reports a repository mid-rebase, mid-merge, or mid-cherry-pick.
	ErrRepoState = errors.New("repository has an operation in progress")
	// ErrUsage reports invalid wrapper arguments.
	ErrUsage = errors.New("invalid arguments")
)

Sentinel errors for preflight failures. Execute maps them to exit codes.

View Source
var Version = "0.11.0"

Version is the CLI version. Keep in step with .claude-plugin/plugin.json, or override at build time with -ldflags "-X github.com/dcadolph/preen/cmd.Version=<v>".

Functions

func Execute

func Execute(skill string, args []string) int

Execute runs the wrapper with the embedded skill text and the given arguments, returning the process exit code and printing any error to stderr. It panics on empty skill text, which means a broken build.

Types

This section is empty.

Jump to

Keyboard shortcuts

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