{"record":{"id":"ba7ee99e28dba818","repo":"spicetify/cli","slug":"invalid-option-available-options-all-userdata","errorCode":null,"errorMessage":"invalid option\navailable options: all, userdata","messagePattern":"invalid option\navailable options: all, userdata","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spicetify.go","lineNumber":229,"sourceCode":"\t\t\t\tif len(commands) == 0 {\n\t\t\t\t\treturn cmd.AppAllPath()\n\t\t\t\t}\n\t\t\t\treturn cmd.AppPath(commands[0])\n\t\t\t} else {\n\t\t\t\tfor _, v := range flags {\n\t\t\t\t\tif v != \"-e\" && v != \"-c\" && v != \"-a\" && v != \"-s\" {\n\t\t\t\t\t\treturn \"\", errors.New(\"invalid option\\navailable options: -e, -c, -a, -s\")\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif len(commands) == 0 && len(flags) == 0 {\n\t\t\t\t\treturn utils.GetExecutableDir(), nil\n\t\t\t\t} else if commands[0] == \"all\" {\n\t\t\t\t\treturn cmd.AllPaths()\n\t\t\t\t} else if commands[0] == \"userdata\" {\n\t\t\t\t\treturn utils.GetSpicetifyFolder(), nil\n\t\t\t\t}\n\t\t\t\treturn \"\", errors.New(\"invalid option\\navailable options: all, userdata\")\n\t\t\t}\n\t\t})()\n\n\t\tif err != nil {\n\t\t\tutils.Fatal(err)\n\t\t}\n\n\t\tlog.Println(path)\n\t\treturn\n\n\tcase \"watch\":\n\t\tcmd.InitPaths()\n\n\t\tvar name []string\n\t\tif len(commands) > 1 {\n\t\t\tname = commands[1:]\n\t\t}\n","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/spicetify/cli/blob/1f13f736163165234eef4fb792a03f9b5b732aa4/spicetify.go#L211-L247","documentation":"When `spicetify path` is called without focus flags, its only valid positional arguments are `all` and `userdata`. Any other positional word is rejected with this error by the fallback branch in spicetify.go.","triggerScenarios":"Running e.g. `spicetify path themes`, `spicetify path extensions`, or `spicetify path myapp` — the first command word is checked against exactly \"all\" and \"userdata\" and hits the default error return otherwise.","commonSituations":"Users guess subcommand names instead of using -e/-c/-a focus flags; users type `spicetify path theme` expecting the theme folder (correct: `spicetify path -c`); users abbreviate `userdata` incorrectly.","solutions":["Use `spicetify path all` for every relevant path or `spicetify path userdata` for the spicetify config folder","Use a focus flag instead: `-e` for extensions, `-c` for theme, `-a` for custom apps","Run `spicetify -h` to list valid path arguments"],"exampleFix":"// before\nspicetify path theme\n// after\nspicetify path -c folder","handlingStrategy":"validation","validationCode":"switch cmdWord {\ncase \"\", \"all\", \"userdata\":\n    // ok\ndefault:\n    return fmt.Errorf(\"invalid option %q; available options: all, userdata\", cmdWord)\n}","typeGuard":"func isValidPathParam(s string) bool { return s == \"all\" || s == \"userdata\" }","tryCatchPattern":null,"preventionTips":["Use exactly `all` or `userdata` as the positional argument","Use focus flags (-e/-c/-a) for other resource types instead of positional words","Consult `spicetify -h` rather than guessing subcommand names"],"tags":["cli","invalid-argument","argument-parsing"],"backgroundTag":"invalid-cli-option","analyzedSha":"1f13f736163165234eef4fb792a03f9b5b732aa4","analyzedAt":"2026-08-31T18:57:59.754Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}