Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

File layout and environment variables

Config

LocationContents
$RSTUBE_CONFIG_DIR/config.tomlConfigured playlists and videos (TOML)

Fallbacks, in order:

  1. $RSTUBE_CONFIG_DIR/config.toml if the env var is set
  2. $XDG_CONFIG_HOME/rstube/config.toml
  3. $HOME/.config/rstube/config.toml

State

LocationContents
$RSTUBE_STATE_DIR/positions.redbPer-video resume positions (redb key/value store)
$RSTUBE_STATE_DIR/history.jsonlPlayback history (JSON-lines, append on play, rewritten on forget)
$RSTUBE_STATE_DIR/playlist_cache.jsonCached playlist and single-video metadata (JSON)

Fallbacks:

  1. $RSTUBE_STATE_DIR/... if the env var is set
  2. $XDG_STATE_HOME/rstube/...
  3. $HOME/.local/state/rstube/...

Env vars

VarEffect
RSTUBE_CONFIG_DIROverride the config directory
RSTUBE_STATE_DIROverride the state directory
XDG_CONFIG_HOMEStandard XDG var; respected if RSTUBE_CONFIG_DIR is unset
XDG_STATE_HOMEStandard XDG var; respected if RSTUBE_STATE_DIR is unset

Both RSTUBE_* env vars are useful for testing — point rstube at a temp directory without touching your real config or history.

Safe to delete

Every file under these directories is regenerated on demand. If you want a clean slate:

# nuke everything
rm -rf ~/.config/rstube ~/.local/state/rstube

# keep config, reset state
rm -rf ~/.local/state/rstube

# keep history, refresh the playlist cache
rm ~/.local/state/rstube/playlist_cache.json