cli

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	History bool
	Help    bool
	Time    int
	Words   int
	File    string
	Text    string
	SetHelp bool
	Lang    string
)
View Source
var ConfigCommand = &cobra.Command{
	Use:   "config",
	Short: "Configure your Couik preferences",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cmd.Usage())
		os.Exit(0)
	},
}
View Source
var RootCmd = &cobra.Command{
	Use:   "couik",
	Short: "Your typing experience brought to the terminal",
	Run:   func(cmd *cobra.Command, args []string) {},
}
View Source
var SetCommand = &cobra.Command{
	Use:   "set",
	Short: "Set config preferences",
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) < 2 {
			fmt.Println(cmd.Usage())
			os.Exit(0)
		}
		key, value := args[0], args[1]

		SetConfig(key, value)
		fmt.Printf("Setting %s to %s", key, value)

		os.Exit(0)
	},
}
View Source
var StatsCmd = &cobra.Command{
	Use:   "stats",
	Short: "display your stats",
	Run: func(cmd *cobra.Command, args []string) {
		DisplayStats()
		os.Exit(0)
	},
}

Functions

func DisplayHelp

func DisplayHelp()

func DisplayHistory

func DisplayHistory()

func DisplayStats added in v0.1.3

func DisplayStats()

func GetTextFromFile added in v0.1.1

func GetTextFromFile(filepath string) (string, error)

func Init

func Init()

func ParseConfigLang added in v0.1.3

func ParseConfigLang(language string) database.Language

func SetConfig added in v0.1.1

func SetConfig(key, value string)

Types

type Config added in v0.1.1

type Config struct {
	Mode           string `yaml:"mode"`            // default mode for quote typing
	DashboardASCII string `yaml:"dashboard_ascii"` // path for custom dashboard ascii
	QuoteType      string `yaml:"quote_type"`      // small, mid, thicc
	Time           string `yaml:"time"`            // prefered time (30, 60, etc...)
	Language       string `yaml:"language"`        // preferred language for tests
}

func GetConfig added in v0.1.1

func GetConfig() Config

Jump to

Keyboard shortcuts

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