{"record":{"id":"91c901f75bd05bfb","repo":"spicetify/cli","slug":"invalid-option-available-options-e-c-a-s","errorCode":null,"errorMessage":"invalid option\navailable options: -e, -c, -a, -s","messagePattern":"invalid option\navailable options: -e, -c, -a, -s","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"spicetify.go","lineNumber":218,"sourceCode":"\t\t\tif styleFocus {\n\t\t\t\tif len(commands) == 0 {\n\t\t\t\t\treturn cmd.ThemeAllAssetsPath()\n\t\t\t\t}\n\t\t\t\treturn cmd.ThemeAssetPath(commands[0])\n\t\t\t} else if extensionFocus {\n\t\t\t\tif len(commands) == 0 {\n\t\t\t\t\treturn cmd.ExtensionAllPath()\n\t\t\t\t}\n\t\t\t\treturn cmd.ExtensionPath(commands[0])\n\t\t\t} else if appFocus {\n\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","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/spicetify/cli/blob/1f13f736163165234eef4fb792a03f9b5b732aa4/spicetify.go#L200-L236","documentation":"The spicetify CLI `path` command only accepts the flags -e, -c, -a or -s (extension, custom app, style/theme focus). Any other flag string passed after `path` is rejected with this error before any path lookup happens, because main() validates each flag against a fixed whitelist in spicetify.go.","triggerScenarios":"Running `spicetify path` with any flag other than -e, -c, -a or -s (e.g. `spicetify path -x`, `spicetify path --all`, or a typo like `-E`). The loop at spicetify.go:216-219 compares each raw flag string exactly and fails on the first mismatch.","commonSituations":"Users coming from other CLIs type GNU-style long flags (`--ext`, `--apps`); users misremember `-s` (style) as `-t` for theme; users copy commands from outdated docs where the flag set differed.","solutions":["Remove or correct the invalid flag; only -e, -c, -a and -s are valid after `path`","If you wanted all paths, run `spicetify path all` (a subcommand, not a flag)","Run `spicetify -h` to see the current valid flags","Update spicetify if docs mention flags not present in your installed version"],"exampleFix":"// before\nspicetify path --theme\n// after\nspicetify path -c   # or: spicetify path all","handlingStrategy":"validation","validationCode":"validFlags := map[string]bool{\"-e\": true, \"-c\": true, \"-a\": true, \"-s\": true}\nfor _, f := range flags {\n    if !validFlags[f] {\n        return fmt.Errorf(\"invalid option %q; available options: -e, -c, -a, -s\", f)\n    }\n}","typeGuard":"func isValidPathFlag(f string) bool {\n    switch f {\n    case \"-e\", \"-c\", \"-a\", \"-s\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Only use -e, -c, -a, -s after `spicetify path`","Prefer documented subcommands (`all`, `userdata`) over guessed flags","Check `spicetify -h` after upgrading, since flags can change"],"tags":["cli","invalid-flag","argument-parsing"],"backgroundTag":"invalid-cli-option","analyzedSha":"1f13f736163165234eef4fb792a03f9b5b732aa4","analyzedAt":"2026-08-31T18:57:59.754Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}