cmd

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 53 Imported by: 0

Documentation

Overview

Package cmd provides CLI commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineHealthStatus added in v1.0.4

func DetermineHealthStatus(providers map[string]ProviderHealthStatus) string

func Execute

func Execute()

Execute execute command

func GetConfig

func GetConfig() *config.Config

GetConfig Get configuration

func IsQuietMode added in v1.0.4

func IsQuietMode() bool

IsQuietMode returns true when --quiet is explicitly set. Scripts should request machine output with --json/--agent instead of relying on pipe detection.

func NewHealthHandler added in v1.0.4

func NewHealthHandler(health *HealthResponse) http.Handler

Types

type AnalyzeReport added in v1.0.4

type AnalyzeReport struct {
	Total      int    `json:"total"`
	Active     int    `json:"active"`
	Completed  int    `json:"completed"`
	Q1         int    `json:"q1"`
	Q2         int    `json:"q2"`
	Q3         int    `json:"q3"`
	Q4         int    `json:"q4"`
	Urgent     int    `json:"urgent"`
	High       int    `json:"high"`
	Medium     int    `json:"medium"`
	Low        int    `json:"low"`
	Overdue    int    `json:"overdue"`
	TodayTasks int    `json:"today_tasks"`
	ThisWeek   int    `json:"this_week"`
	Generated  string `json:"generated"`
}

AnalyzeReport comprehensive report (cmd-specific JSON contract with flat fields)

type AuthLogoutReceipt added in v1.0.4

type AuthLogoutReceipt struct {
	Provider     string `json:"provider"`
	DisplayName  string `json:"display_name"`
	TokenPath    string `json:"token_path"`
	HadToken     bool   `json:"had_token"`
	TokenDeleted bool   `json:"token_deleted"`
}

type AuthShowDetails added in v1.0.4

type AuthShowDetails struct {
	Provider      string `json:"provider"`
	DisplayName   string `json:"display_name"`
	Alias         string `json:"alias"`
	TokenPath     string `json:"token_path"`
	Status        string `json:"status"`
	Authenticated bool   `json:"authenticated"`
	Valid         string `json:"valid"`
	ExpiresAt     string `json:"expires_at"`
	NextAction    string `json:"next_action"`
}

type AuthSnapshot

type AuthSnapshot struct {
	Provider      string
	DisplayName   string
	ShortName     string
	TokenPath     string
	Authenticated bool
	Valid         *bool
	StatusText    string
	ExpiresAt     string
	NextAction    string
}

type AuthStatusRow added in v1.0.4

type AuthStatusRow struct {
	Provider      string `json:"provider"`
	DisplayName   string `json:"display_name"`
	Alias         string `json:"alias"`
	Status        string `json:"status"`
	Authenticated bool   `json:"authenticated"`
	Valid         string `json:"valid"`
	ExpiresAt     string `json:"expires_at"`
	NextAction    string `json:"next_action"`
}

type CLIError added in v1.0.4

type CLIError struct {
	Message  string
	Err      error
	ExitCode int
}

func (*CLIError) Error added in v1.0.4

func (e *CLIError) Error() string

func (*CLIError) Unwrap added in v1.0.4

func (e *CLIError) Unwrap() error

type DayData

type DayData struct {
	Date      string `json:"date"`
	Completed int    `json:"completed"`
}

DayData daily data

type HealthResponse added in v1.0.4

type HealthResponse struct {
	StartTime           time.Time                       `json:"start_time"`
	Status              string                          `json:"status"`
	Live                bool                            `json:"live"`
	Ready               bool                            `json:"ready"`
	TokenManagerRunning bool                            `json:"token_manager_running"`
	Providers           map[string]ProviderHealthStatus `json:"providers"`
	TokenStatus         map[string]TokenHealthStatus    `json:"token_status"`
	Scheduler           *SchedulerHealthStatus          `json:"scheduler,omitempty"`
	Uptime              string                          `json:"uptime"`
}

type InputMode

type InputMode int

InputMode input mode

const (
	ModeNormal InputMode = iota
	ModeSearch
	ModeDetail
	ModeConfirmDelete
)

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Initialization

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update

func (Model) View

func (m Model) View() string

View rendering

type PriorityAnalysis

type PriorityAnalysis = analyze.PriorityAnalysis

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type PriorityData

type PriorityData = analyze.PriorityData

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type ProviderHealthStatus added in v1.0.4

type ProviderHealthStatus struct {
	Loaded        bool   `json:"loaded"`
	Authenticated bool   `json:"authenticated"`
	Error         string `json:"error,omitempty"`
}

type ProviderInfo

type ProviderInfo struct {
	Name         string
	ShortName    string
	DisplayName  string
	Description  string
	AuthType     string
	Enabled      bool
	Connected    bool
	Capabilities []string
}

ProviderInfo Provider information

type ProviderListRow added in v1.0.4

type ProviderListRow struct {
	Name        string `json:"name"`
	ShortName   string `json:"short_name"`
	Status      string `json:"status"`
	AuthType    string `json:"auth_type"`
	Description string `json:"description"`
}

type QuadrantAnalysis

type QuadrantAnalysis = analyze.QuadrantAnalysis

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type QuadrantData

type QuadrantData = analyze.QuadrantData

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type SchedulerHealthStatus added in v1.0.4

type SchedulerHealthStatus struct {
	Running       bool      `json:"running"`
	Interval      string    `json:"interval,omitempty"`
	LastRunTime   time.Time `json:"last_run_time,omitempty"`
	NextRunTime   time.Time `json:"next_run_time,omitempty"`
	LastRunStatus string    `json:"last_run_status,omitempty"`
	TotalRuns     int       `json:"total_runs"`
	SuccessRuns   int       `json:"success_runs"`
	FailedRuns    int       `json:"failed_runs"`
}

type SortType

type SortType int

SortType sorting type

const (
	SortByDueDate SortType = iota
	SortByPriority
	SortByCreated
	SortByTitle
	SortCount
)

type SummaryData

type SummaryData = analyze.SummaryData

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type TimeAnalysis

type TimeAnalysis = analyze.TimeAnalysis

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type TimeData

type TimeData = analyze.TimeData

Type aliases for the analyze package DTOs. The cmd layer uses these aliases for renderer compatibility while delegating computation to internal/analyze.

type TokenHealthStatus added in v1.0.4

type TokenHealthStatus struct {
	HasToken        bool      `json:"has_token"`
	IsValid         bool      `json:"is_valid"`
	NeedsRefresh    bool      `json:"needs_refresh"`
	Refreshable     bool      `json:"refreshable"`
	ExpiresAt       time.Time `json:"expires_at,omitempty"`
	TimeUntilExpiry string    `json:"time_until_expiry,omitempty"`
}

type TrendAnalysis

type TrendAnalysis struct {
	DailyCompletions []DayData `json:"daily_completions"`
	WeeklyAverage    float64   `json:"weekly_average"`
	TotalCompleted   int       `json:"total_completed"`
}

TrendAnalysis trend analysis results (cmd-specific JSON contract)

type ViewType

type ViewType int

ViewType view type

const (
	ViewDashboard ViewType = iota
	ViewTasks
	ViewQuadrant
	ViewProjects
	ViewProviders
	ViewAuth
	ViewCount
)

Jump to

Keyboard shortcuts

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