cmd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package cmd wires the cobra command tree for the persona CLI. All commands share access to a single *storage.Manager via the package-level storageManager variable, which must be initialised by main.go via Setup before Execute is called. This avoids the previous init()-time side effect of creating ~/.persona on import, which broke isolation in tests and prevented dependency injection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatppuccinFangScheme added in v0.1.0

func CatppuccinFangScheme(_ lipgloss.LightDarkFunc) fang.ColorScheme

CatppuccinFangScheme returns a fang ColorScheme themed with Catppuccin Mocha — peach as the primary accent (titles, command names) and sky as the secondary accent (program name in the synopsis). The `_` ignores fang's light/dark dispatch because we always render against Mocha.

func Execute

func Execute() error

func GetRootCmd

func GetRootCmd() *cobra.Command

func Setup added in v0.1.0

func Setup(mgr *storage.Manager)

Setup wires the cmd package with a ready-to-use storage manager. Call this exactly once from main before invoking the cobra command tree. Tests can pass a manager pointing at a temporary directory to run commands in isolation.

Types

type VersionInfo

type VersionInfo struct {
	Version   string `json:"version"`
	BuildTime string `json:"build_time"`
	GitCommit string `json:"git_commit"`
	GitBranch string `json:"git_branch"`
	GoVersion string `json:"go_version"`
	Platform  string `json:"platform"`
}

VersionInfo contains version and build information

Jump to

Keyboard shortcuts

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