cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 8 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
)
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)
	},
}

Functions

func DisplayHelp

func DisplayHelp()

func DisplayHistory

func DisplayHistory()

func GetTextFromFile added in v0.1.1

func GetTextFromFile(filepath string) (string, error)

func Init

func Init()

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...)
}

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