cli

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(streams Streams, prompt string) (bool, error)

func IsTerminal

func IsTerminal(streams Streams) bool

func NewAuthCommand

func NewAuthCommand(resolveAuthApp AuthResolver, resolveAuthService AuthServiceResolver, resolveRegion RegionResolver, streams Streams) *cobra.Command

func NewConfigCommand

func NewConfigCommand(resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func NewFocusCommand

func NewFocusCommand(resolveFocusApp FocusResolver, resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func NewHabitCommand

func NewHabitCommand(resolveHabitApp HabitResolver, resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func NewProjectCommand

func NewProjectCommand(resolveProjectApp ProjectResolver, resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func NewQuickCommand

func NewQuickCommand(resolveQuickApp QuickResolver, streams Streams) *cobra.Command

func NewRootCommand

func NewRootCommand(opts RootOptions) *cobra.Command

func NewTaskCommand

func NewTaskCommand(resolveTaskApp TaskResolver, resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func NewTodayCommand

func NewTodayCommand(resolveTaskApp TaskResolver, resolveConfigApp ConfigResolver, streams Streams) *cobra.Command

func Prompt

func Prompt(streams Streams, label, defaultValue string) (string, error)

func PromptSecret

func PromptSecret(streams Streams, label string, hasExisting bool) (string, error)

func SelectProject

func SelectProject(streams Streams, projects []domain.Project) (domain.Project, error)

func SelectRegion

func SelectRegion(streams Streams, defaultRegion string) (string, error)

Types

type AuthResolver

type AuthResolver func() (*app.AuthApp, error)

type AuthServiceResolver

type AuthServiceResolver func() (app.AuthService, error)

type ConfigResolver

type ConfigResolver func() (*app.ConfigApp, error)

type FocusResolver

type FocusResolver func() (*app.FocusApp, error)

type HabitResolver

type HabitResolver func() (*app.HabitApp, error)

type ProjectResolver

type ProjectResolver func() (*app.ProjectApp, error)

type QuickResolver

type QuickResolver func() (*app.QuickAddApp, error)

type RegionResolver

type RegionResolver func() (string, error)

type RootOptions

type RootOptions struct {
	Version             string
	Streams             Streams
	LoginAuthResolver   AuthResolver
	AuthServiceResolver AuthServiceResolver
	RegionResolver      RegionResolver
	ProjectResolver     ProjectResolver
	TaskResolver        TaskResolver
	FocusResolver       FocusResolver
	HabitResolver       HabitResolver
	QuickResolver       QuickResolver
	ConfigResolver      ConfigResolver
}

type Streams

type Streams struct {
	In     io.Reader
	Out    io.Writer
	ErrOut io.Writer
}

type TaskResolver

type TaskResolver func() (*app.TaskApp, error)

Jump to

Keyboard shortcuts

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