spicetify/cli · error
invalid option available options: -e, -c, -a, -s
Error message
invalid option available options: -e, -c, -a, -s
What it means
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.
Source
Thrown at spicetify.go:218
if styleFocus {
if len(commands) == 0 {
return cmd.ThemeAllAssetsPath()
}
return cmd.ThemeAssetPath(commands[0])
} else if extensionFocus {
if len(commands) == 0 {
return cmd.ExtensionAllPath()
}
return cmd.ExtensionPath(commands[0])
} else if appFocus {
if len(commands) == 0 {
return cmd.AppAllPath()
}
return cmd.AppPath(commands[0])
} else {
for _, v := range flags {
if v != "-e" && v != "-c" && v != "-a" && v != "-s" {
return "", errors.New("invalid option\navailable options: -e, -c, -a, -s")
}
}
if len(commands) == 0 && len(flags) == 0 {
return utils.GetExecutableDir(), nil
} else if commands[0] == "all" {
return cmd.AllPaths()
} else if commands[0] == "userdata" {
return utils.GetSpicetifyFolder(), nil
}
return "", errors.New("invalid option\navailable options: all, userdata")
}
})()
if err != nil {
utils.Fatal(err)
}
View on GitHub (pinned to 1f13f73616)
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
Example fix
// before spicetify path --theme // after spicetify path -c # or: spicetify path all
Defensive patterns
Strategy: validation
Validate before calling
validFlags := map[string]bool{"-e": true, "-c": true, "-a": true, "-s": true}
for _, f := range flags {
if !validFlags[f] {
return fmt.Errorf("invalid option %q; available options: -e, -c, -a, -s", f)
}
} Type guard
func isValidPathFlag(f string) bool {
switch f {
case "-e", "-c", "-a", "-s":
return true
}
return false
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- invalid option available options: all, userdata
- Command "{{v}}" not found. Run "spicetify -h" for a list of
AI-assisted analysis of spicetify/cli@1f13f73616 (2026-08-31).
Data as JSON: /api/errors/91c901f75bd05bfb.
Report an issue: GitHub.