{"record":{"id":"2ace549ef48519c3","repo":"spicetify/cli","slug":"command-v-not-found-run-spicetify-h-for","errorCode":null,"errorMessage":"Command \"{{v}}\" not found.\nRun \"spicetify -h\" for a list of valid commands.","messagePattern":"Command \"(.+?)\\}\" not found\\.\nRun \"spicetify -h\" for a list of valid commands\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spicetify.go","lineNumber":363,"sourceCode":"\t\t\t}\n\n\t\tcase \"restore\":\n\t\t\tcmd.Restore()\n\t\t\tshouldRestart = true\n\n\t\tcase \"enable-devtools\":\n\t\t\tcmd.EnableDevTools()\n\t\t\tshouldRestart = true\n\n\t\tcase \"restart\":\n\t\t\tcmd.SpotifyRestart()\n\n\t\tcase \"auto\":\n\t\t\tcmd.Auto(version)\n\t\t\tshouldRestart = true\n\n\t\tdefault:\n\t\t\tutils.Fatal(errors.New(`Command \"` + v + `\" not found.\nRun \"spicetify -h\" for a list of valid commands.`))\n\t\t}\n\t}\n\n\tif !noRestart && !slices.Contains(commands, \"restart\") && shouldRestart {\n\t\tcmd.SpotifyRestart()\n\t}\n}\n\nfunc help() {\n\tutils.PrintBold(\"spicetify v\" + version)\n\tlog.Println(utils.Bold(\"USAGE\") + \"\\n\" +\n\t\t\"spicetify [-q] [-e] [-a] \\x1B[4mcommand\\033[0m...\\n\" +\n\t\t\"spicetify {-c | --config} | {-v | --version} | {-h | --help}\\n\\n\" +\n\t\tutils.Bold(\"DESCRIPTION\") + \"\\n\" +\n\t\t\"Customize Spotify client UI and functionality\\n\\n\" +\n\t\tutils.Bold(\"CHAINABLE COMMANDS\") + `\nbackup              Start backup and preprocessing of app files.","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/spicetify/cli/blob/1f13f736163165234eef4fb792a03f9b5b732aa4/spicetify.go#L345-L381","documentation":"main() dispatches on the first CLI word via a switch; the default branch fires for any word that is not a registered spicetify command, producing this fatal error before anything else runs.","triggerScenarios":"Running `spicetify <unknown-word>`, e.g. typos like `spicetify aply`, removed/renamed commands like `spicetify update` on older versions, or accidentally passing a bare word where a flag was expected.","commonSituations":"Typoed commands; following an outdated tutorial where the command was renamed (e.g. `watch`/`backup` changes across versions); shell aliases interfering; invoking a script name instead of a command.","solutions":["Check spelling of the command","Run `spicetify -h` for the list of valid commands in your installed version","Update spicetify (`spicetify upgrade`) if the command exists only in newer releases"],"exampleFix":"// before\nspicetify aply\n// after\nspicetify apply","handlingStrategy":"validation","validationCode":"validCommands := []string{\"apply\", \"update\", \"restore\", \"backup\", \"config\", \"path\", \"watch\", \"auto\", \"version\", \"-h\"}\nif !slices.Contains(validCommands, os.Args[1]) {\n    fmt.Fprintln(os.Stderr, \"unknown command; run spicetify -h\")\n    os.Exit(1)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify command spelling against `spicetify -h`","Update spicetify if following newer docs than your installed version","Script defensively: check `$?` after spicetify calls"],"tags":["cli","unknown-command","argument-parsing"],"backgroundTag":"unknown-command","analyzedSha":"1f13f736163165234eef4fb792a03f9b5b732aa4","analyzedAt":"2026-08-31T18:57:59.754Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}