On this page
Defines the strictcli application with subcommands for version, profile management, demo animation, color preview, and config display.
#internal/cli
#internal/cli
Package cli builds howmuchleft's strictcli command tree and runs the statusline itself: it parses the status object Claude Code pipes on stdin, gathers usage, git and profile data, and hands the result to internal/render.
#SetVersion
func SetVersion(v string)SetVersion sets the application version string.
#RunStatuslineDirect
func RunStatuslineDirect() boolRunStatuslineDirect checks if stdin is piped and runs the statusline. Returns true if it handled the invocation (caller should exit), false otherwise.
#RunGitCacheRefresh
func RunGitCacheRefresh() boolRunGitCacheRefresh handles the detached invocation a render starts to refresh a repository's status cache:
howmuchleft --refresh-git-cache
Like statusline mode, it is dispatched before the strictcli app is built and is not a command in it: it exists for howmuchleft to call on itself, takes no options, prints nothing on success, and running any of the app's commands instead would run the migrations a render has no business running. Returns true if it handled the invocation (caller should exit), false otherwise.
#NewApp
func NewApp() *strictcli.AppNewApp builds and returns the strictcli application.
Every command is classified strictcli.EffectMutating, including the ones that only print. That is not a rubber stamp: every handler opens with runMigrations(), which converts a legacy ~/.config/howmuchleft.json to TOML (renaming the original to .bak) and writes any missing settings into ~/.config/howmuchleft/config.toml. Those are user-visible filesystem mutations, so no command here can honestly claim read_only. classification_test.go pins the table.