Documentation
¶
Overview ¶
Package cmd wires the cobra command tree for the civitai CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUsage = errors.New("usage error")
ErrUsage classifies a command-line USAGE error — a bad flag or malformed invocation — as distinct from a runtime failure. It carries no visible text of its own: it is attached to Cobra's own flag-parsing error (see NewRootCmd's SetFlagErrorFunc) so that errors.Is(err, ErrUsage) is true while the message the user sees stays exactly what Cobra produced. The process entrypoint (cmd/civitai) maps it to a dedicated exit code.
Functions ¶
func NewRootCmd ¶
NewRootCmd builds the root command with all subcommands attached.
func SetBuildInfo ¶
func SetBuildInfo(v, c, d string)
SetBuildInfo lets main inject the build version, commit, and date. Goreleaser release binaries pass real ldflag values, which are authoritative. For a plain `go install github.com/civitai/cli/cmd/civitai@latest` (or any source build), the ldflags are absent and the injected values are still the "dev" defaults — in that case we fall back to runtime/debug.ReadBuildInfo so `civitai version` reports the module version (e.g. v0.1.1 or a pseudo-version) and the embedded VCS revision/time instead of dev/none/unknown.
Types ¶
This section is empty.
Source Files
¶
- app.go
- app_create.go
- app_dev_token.go
- app_dev_tunnel.go
- app_init.go
- app_pull.go
- app_status.go
- app_submit.go
- app_validate.go
- app_withdraw.go
- articles.go
- buzz.go
- collections.go
- compat.go
- completion.go
- creators.go
- download.go
- htmlrender.go
- images.go
- layout.go
- login.go
- model_versions.go
- models.go
- read.go
- root.go
- safeterm.go
- spawn_unix.go
- tags.go
- update_cache.go
- update_check.go
- update_notice.go
- upgrade.go
- usage_error.go
- users.go
- version.go
- whoami.go