cli

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 24 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 NewAppWithoutDiscovery added in v0.6.1

func NewAppWithoutDiscovery() (*App, error)

NewAppWithoutDiscovery creates a minimal App without running project discovery. Used by init command when discovery fails due to stale global config.

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
	InitColumns  *string
	InitName     *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

	// column command
	ColumnUsed *bool

	// column add
	ColumnAddUsed     *bool
	ColumnAddName     *string
	ColumnAddColor    *string
	ColumnAddPosition *int
	ColumnAddBoard    *string

	// column delete
	ColumnDeleteUsed  *bool
	ColumnDeleteName  *string
	ColumnDeleteForce *bool
	ColumnDeleteBoard *string

	// column rename
	ColumnRenameUsed  *bool
	ColumnRenameOld   *string
	ColumnRenameNew   *string
	ColumnRenameBoard *string

	// column edit
	ColumnEditUsed  *bool
	ColumnEditName  *string
	ColumnEditColor *string
	ColumnEditBoard *string

	// column list
	ColumnListUsed  *bool
	ColumnListBoard *string

	// column move
	ColumnMoveUsed     *bool
	ColumnMoveName     *string
	ColumnMovePosition *int
	ColumnMoveAfter    *string
	ColumnMoveBoard    *string
}

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