cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

Fatal prints an error and exits.

func Run

func Run()

Run is the main entry point for the CLI.

Types

type App

type App struct {
	GitClient     *git.Client
	GlobalStore   store.GlobalStore
	Paths         *config.Paths
	BoardStore    store.BoardStore
	CardStore     store.CardStore
	Prompter      prompt.Prompter
	InitService   *service.InitService
	BoardService  *service.BoardService
	CardService   *service.CardService
	AliasService  *service.AliasService
	BoardResolver *resolver.BoardResolver
	CardResolver  *resolver.CardResolver
	ProjectRoot   string
}

App holds all the dependencies for the CLI. Uses interfaces for testability.

func NewApp

func NewApp(interactive bool) (*App, error)

NewApp creates a new App with all dependencies wired up. If interactive is false, uses NoopPrompter that fails on prompts.

func (*App) GetCreator

func (a *App) GetCreator() (string, error)

GetCreator returns the username for the card creator field.

func (*App) RequireKan

func (a *App) RequireKan() error

RequireKan ensures Kan is initialized in the current project.

type CommandContext

type CommandContext struct {
	// Global flags
	NonInteractive *bool

	// init command
	InitUsed     *bool
	InitLocation *string

	// board command
	BoardUsed       *bool
	BoardCreateUsed *bool
	BoardCreateName *string
	BoardListUsed   *bool

	// add command
	AddUsed        *bool
	AddTitle       *string
	AddDescription *string
	AddBoard       *string
	AddColumn      *string
	AddParent      *string
	AddFields      *[]string

	// show command
	ShowUsed  *bool
	ShowCard  *string
	ShowBoard *string

	// list command
	ListUsed   *bool
	ListBoard  *string
	ListColumn *string

	// edit command
	EditUsed        *bool
	EditCard        *string
	EditBoard       *string
	EditTitle       *string
	EditDescription *string
	EditColumn      *string
	EditParent      *string
	EditAlias       *string
	EditFields      *[]string

	// serve command
	ServeUsed   *bool
	ServePort   *int
	ServeNoOpen *bool

	// migrate command
	MigrateUsed   *bool
	MigrateDryRun *bool
}

CommandContext holds parsed values and used flags for all commands.

Jump to

Keyboard shortcuts

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