cli

package
v0.0.0-...-05574e4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearContextOverride

func ClearContextOverride()

func NewRootCmd

func NewRootCmd(version string) *cobra.Command

func SetContextOverride

func SetContextOverride(ctx *Context)

Types

type Context

type Context struct {
	Config *config.Config
	WS     *workspace.Workspace
	GitHub github.Client
}

Context bridges config and the core workspace for CLI commands.

func LoadContext

func LoadContext() (*Context, error)

LoadContext discovers config from the current working directory and builds a workspace.

func LoadContextFromDir

func LoadContextFromDir(dir string) (*Context, error)

LoadContextFromDir discovers config from the given directory and builds a workspace.

func (*Context) ResolveCapsule

func (c *Context) ResolveCapsule(repo, arg string) (string, error)

ResolveCapsule figures out which capsule the user means within a repo. Does exact match, then fuzzy match. Single fuzzy match is used directly; multiple matches prompt an interactive picker; zero matches return an error.

func (*Context) ResolveRepo

func (c *Context) ResolveRepo(arg string) (string, error)

ResolveRepo figures out which repo the user means. "." means infer from cwd (error if not in a repo). "" means try cwd, fall back to interactive picker. Anything else is a repo name lookup.

type PromptData

type PromptData struct {
	WorkspaceDisplayName string `json:"workspace_display_name"`
	RepoName             string `json:"repo_name"`
	RepoDisplayName      string `json:"repo_display_name"`
	RepoColor            string `json:"repo_color"`
	CapsuleName          string `json:"capsule_name"`
	IsCapsuleBoarded     bool   `json:"is_capsule_boarded"`
}

PromptData holds the context available to prompt templates and JSON output.

Jump to

Keyboard shortcuts

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