You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split the config directory into config, state and cache per the XDG spec #98
Today the CLI writes everything to $XDG_CONFIG_HOME/meshstack (or MESHSTACK_CONFIG_DIR), including tokens and cached API documents. These files get in the way if you want to back up or sync the config dir. You also have to be careful when clearing the cache so you don't destroy your profiles.
Proposed layout
File
Directory
Why
profiles.json, profiles.json.lock
XDG_CONFIG_HOME/meshstack
Actual configuration
credentials/<profile>.json
XDG_CONFIG_HOME/meshstack
Actual configuration
credentials-cache/<profile>/<credential>.json
XDG_STATE_HOME/meshstack
State because cache should be deletable without the user noticing
versionCheck.json
XDG_STATE_HOME/meshstack
Automatic timestamp
api-docs*.json, *.lastcheck.json
XDG_CACHE_HOME/meshstack
Cached, downloaded again when missing
Open questions
Overrides: add MESHSTACK_STATE_DIR and MESHSTACK_CACHE_DIR, each defaulting to its own XDG location rather than to a folder of the config dir.
Defaults: honor XDG_* on every OS, as the config dir does. When unset, cache uses os.UserCacheDir (~/.cache on Linux). Go has no state-dir function, so state falls back to ~/.local/state on Linux, as the XDG spec defines, and to a folder under the platform config dir on macOS (some tools use XDG locations as well here) and Windows.
Migration: deleting the old files would require users to login again, which happens anyway after token expiration.
Activity