spicetify/cli · error
config "current_theme" is blank
Error message
config "current_theme" is blank
What it means
ThemeAssetPath resolves theme file/folder paths, but the theme name comes from the `current_theme` config value. When that config entry is empty, no theme is selected, so any non-`root` kind lookup cannot be resolved and this error is thrown from src/cmd/path.go.
Source
Thrown at src/cmd/path.go:18
package cmd
import (
"errors"
"path/filepath"
"strings"
"github.com/spicetify/cli/src/utils"
)
// ThemeAssetPath returns path of theme; assets, color.ini, theme.js and user.css
func ThemeAssetPath(kind string) (string, error) {
InitSetting()
if kind == "root" {
return filepath.Join(utils.GetExecutableDir(), "Themes"), nil
} else if len(themeFolder) == 0 {
return "", errors.New(`config "current_theme" is blank`)
}
if kind == "folder" {
return themeFolder, nil
} else if kind == "color" {
color := filepath.Join(themeFolder, "color.ini")
return color, nil
} else if kind == "css" {
css := filepath.Join(themeFolder, "user.css")
return css, nil
} else if kind == "js" {
js := filepath.Join(themeFolder, "theme.js")
return js, nil
} else if kind == "assets" {
assets := filepath.Join(themeFolder, "assets")
return assets, nil
}
View on GitHub (pinned to 1f13f73616)
Solutions
- Set a theme: `spicetify config current_theme <theme-name>` (e.g. SpicetifyDefault), then retry
- Verify config-xpui.ini contains a non-empty current_theme value
- Reinstall/repair the config with `spicetify backup apply` after configuring
- Use kind "root" if you only need the Themes directory (works without current_theme)
Example fix
// before (blank in config-xpui.ini) current_theme = // after current_theme = SpicetifyDefault
Defensive patterns
Strategy: validation
Validate before calling
theme := cfg.Get("Setting", "current_theme")
if theme == "" {
return errors.New("set current_theme in config-xpui.ini before resolving theme paths")
} Try / catch
path, err := cmd.ThemeAssetPath("css")
if err != nil && strings.Contains(err.Error(), `config "current_theme" is blank`) {
// prompt user to run: spicetify config current_theme <name>
return err
} Prevention
- Always set current_theme before using theme path lookups
- Use kind "root" if you only need the Themes directory (no theme required)
- After config resets/reinstalls, re-run `spicetify config current_theme ...`
- In scripts, check the config value before invoking theme-dependent commands
When it happens
Trigger: Calling ThemeAssetPath("folder"|"color"|"css"|"js"|"assets") (or running `spicetify path -c ...`) while the `current_theme` line in config-xpui.ini is blank — e.g. fresh install, config reset, or theme never set via `spicetify config current_theme <name>`.
Common situations: Fresh spicetify installation where setup was never completed; a corrupted/overwritten config file; CI environments lacking a config; users who deleted the Themes folder and cleared the setting.
Related errors
AI-assisted analysis of spicetify/cli@1f13f73616 (2026-08-31).
Data as JSON: /api/errors/3db3cb74d2d9d74b.
Report an issue: GitHub.