Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catppuccin/cli
/ functions
Functions
84 in github.com/catppuccin/cli
⨍
Functions
84
◇
Types & classes
25
↓ 12 callers
Method
Error
Error implements error
schema/schema.go:47
↓ 8 callers
Function
HandleDir
HandleDir handles a directory, replacing certain parts with known attributes.
internal/utils/systems.go:24
↓ 7 callers
Function
ShareDir
ShareDir generates the share directory for the cli.
internal/utils/systems.go:46
↓ 6 callers
Function
GetEnv
GetEnv gets an environment variable. If not defined, it gets the fallback.
internal/utils/utils.go:26
↓ 5 callers
Function
InstallLinks
InstallLinks is a wrapper over MakeLinks that parses the mode and uses it to create the correct link, as specified by the ctprc.
internal/utils/symlinks.go:131
↓ 5 callers
Function
PathExists
PathExists checks if a path exists
internal/utils/utils.go:39
↓ 4 callers
Function
RunHooks
RunHooks runs a list of hooks.
internal/utils/utils.go:144
↓ 3 callers
Function
Lint
Lint is for linting against the schema
schema/schema.go:19
↓ 3 callers
Function
mapValue
(v any)
schema/convert.go:37
↓ 2 callers
Function
BoolAnd
BoolAnd uses booleans in an AND operator
internal/utils/utils.go:86
↓ 2 callers
Function
CheckBetter
CheckBetter checks if better is greater than check. If it is, it returns better, otherwise it returns check. It also returns a BoolAnd of checkbetter
internal/utils/utils.go:78
↓ 2 callers
Function
CloneRepo
CloneRepo clones a repo into the specified location.
internal/utils/systems.go:72
↓ 2 callers
Function
GetTemplateDir
GetTemplateDir gets the location of the template directory.
internal/utils/utils.go:133
↓ 2 callers
Function
InitTemplate
InitTemplate initializes a template repo for the repo name specified.
internal/utils/systems.go:85
↓ 2 callers
Function
MakeLinks
MakeLinks loops through a list and converts its attributes into arguments for MakeLink.
internal/utils/symlinks.go:68
↓ 2 callers
Method
Marshal
()
internal/pkg/structs/program.go:19
↓ 2 callers
Function
RemoveInstalled
(packages []string)
internal/cli/uninstall.go:39
↓ 2 callers
Function
installer
(packages []string)
internal/cli/install.go:43
↓ 1 callers
Function
CloneRepo
CloneRepo clones a repo into the specified location.
internal/ui/progress.go:32
↓ 1 callers
Function
CloneTemplate
CloneTemplate creates the template directory and clones the template repo into it.
internal/utils/utils.go:116
↓ 1 callers
Function
Execute
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the r
internal/cli/root.go:25
↓ 1 callers
Function
HandleDirPath
HandleDirPath is a function to handle a directory when making a symlink
internal/utils/symlinks.go:104
↓ 1 callers
Function
HandleFilePath
HandleFilePath handles files that are made with symlinks
internal/utils/symlinks.go:118
↓ 1 callers
Method
Init
()
internal/ui/installInput.go:55
↓ 1 callers
Method
Init
()
internal/ui/execInput.go:31
↓ 1 callers
Method
Init
()
internal/ui/repoInput.go:51
↓ 1 callers
Function
InstallFlavours
InstallFlavours is a wrapper for InstallLinks which takes the flavour and handles the install accordingly
internal/utils/symlinks.go:148
↓ 1 callers
Function
IsWindows
IsWindows checks if OS is Windows
internal/utils/utils.go:34
↓ 1 callers
Function
ListContains
DieIfError kills the program if err is not nil. func DieIfError(err error, message string) { if err != nil { // log.Fatalf("%s.\nFailed with error:
internal/utils/utils.go:68
↓ 1 callers
Function
MakeLocation
MakeLocation saves the locations written to during installation into a file for later access.
internal/utils/systems.go:115
↓ 1 callers
Method
MarshalLocation
()
internal/pkg/structs/saved_flavours.go:11
↓ 1 callers
Function
NewExecModel
(p string)
internal/ui/execInput.go:18
↓ 1 callers
Function
NewInitialModel
()
internal/ui/repoInput.go:38
↓ 1 callers
Function
NewInstallModel
(p string)
internal/ui/installInput.go:29
↓ 1 callers
Function
NewSpinnerParent
()
internal/ui/spinner.go:22
↓ 1 callers
Function
OSReadDir
OSReadDir expands a directory path into a list of files within that directory. Not recursive.
internal/utils/systems.go:54
↓ 1 callers
Function
PullUpdates
PullUpdates opens a git repo and pulls the latest changes.
internal/utils/network.go:24
↓ 1 callers
Method
RenderView
()
internal/ui/installInput.go:125
↓ 1 callers
Function
Run
()
internal/ui/ui.go:10
↓ 1 callers
Method
Run
()
internal/pkg/structs/program.go:80
↓ 1 callers
Function
SearchRepos
SearchRepos searches through a SearchRes for the best match
internal/utils/utils.go:94
↓ 1 callers
Function
StartClone
(repo string)
internal/ui/progress.go:49
↓ 1 callers
Function
Unmarshal
Unmarshal YAML to map[string]any instead of map[any]any.
schema/convert.go:10
↓ 1 callers
Function
UnmarshalProgram
(data []byte)
internal/pkg/structs/program.go:13
↓ 1 callers
Function
UnmarshalSearch
(data []byte)
internal/pkg/structs/search.go:7
↓ 1 callers
Method
Update
(msg tea.Msg)
internal/ui/installInput.go:59
↓ 1 callers
Function
UpdateJSON
UpdateJSON makes a search request for all Catppuccin repos and caches them.
internal/utils/network.go:50
↓ 1 callers
Function
UserHomeDir
UserHomeDir gets the user's home directory
internal/utils/utils.go:48
↓ 1 callers
Method
View
()
internal/ui/installInput.go:144
↓ 1 callers
Method
Write
Write intercepts the content and updates the percentage
internal/ui/progress.go:61
↓ 1 callers
Function
finalPause
()
internal/ui/progress.go:77
↓ 1 callers
Function
handleArgs
(args []string)
internal/cli/new.go:22
↓ 1 callers
Function
lint
(r io.Reader, loader gojsonschema.JSONLoader)
schema/schema.go:23
↓ 1 callers
Function
linter
(filePath string)
internal/cli/lint.go:42
↓ 1 callers
Function
makeLink
MakeLink makes a symlink from a path to another path with a suffix.
internal/utils/symlinks.go:21
↓ 1 callers
Function
mapMap
(in map[any]any)
schema/convert.go:29
↓ 1 callers
Function
mapSlice
(in []any)
schema/convert.go:21
↓ 1 callers
Function
searchPackage
(searchQuery []string)
internal/cli/search.go:27
↓ 1 callers
Method
updateInputs
(msg tea.Msg)
internal/ui/installInput.go:116
↓ 1 callers
Function
updater
(packages []string)
internal/cli/update.go:29
Function
GetRepoName
()
internal/ui/spinner.go:16
Method
Init
()
internal/ui/progress.go:87
Method
Init
()
internal/ui/spinner.go:29
Function
NewProgressBar
()
internal/ui/progress.go:25
Function
TestHandleDir
(t *testing.T)
internal/utils/utils_test.go:10
Function
TestInvalidSchema
(t *testing.T)
schema/schema_test.go:22
Function
TestValidSchema
(t *testing.T)
schema/schema_test.go:12
Function
UnmarshalLocation
(data []byte)
internal/pkg/structs/saved_flavours.go:5
Method
Update
(msg tea.Msg)
internal/ui/progress.go:91
Method
Update
(msg tea.Msg)
internal/ui/execInput.go:35
Method
Update
(msg tea.Msg)
internal/ui/repoInput.go:55
Method
Update
(msg tea.Msg)
internal/ui/spinner.go:33
Method
View
()
internal/ui/progress.go:115
Method
View
()
internal/ui/execInput.go:62
Method
View
()
internal/ui/repoInput.go:83
Method
View
()
internal/ui/spinner.go:52
Function
init
()
internal/cli/uninstall.go:21
Function
init
()
internal/cli/lint.go:12
Function
init
()
internal/cli/new.go:9
Function
init
Create the command
internal/cli/update.go:12
Function
init
()
internal/cli/search.go:14
Function
init
()
internal/cli/install.go:23
Function
init
()
cmd/ctp/main.go:9
Function
main
()
cmd/ctp/main.go:19