Repository navigation
Store config in the user config directory instead of ~/note - #81
Merged
Merged
Conversation
The config (including saved Notehub credentials) now lives in $XDG_CONFIG_HOME/note, or ~/.config/note when that isn't set, and in %AppData%\note on Windows. Container platforms such as muse persist the standard config directory across container replacement, but not an arbitrary ~/note directory, so sign-ins were being lost. ConfigDir now returns an error when no home or config directory can be found, rather than falling back to the current directory, which could leave tokens inside a repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bucknalla
approved these changes
Oct 31, 2026
Resolve go.mod/go.sum conflicts by taking master's go-m1cpu v0.2.4 (newer than the v0.2.2 bump on this branch). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AYbrESTG2Up5m3mzsRSABh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
muse doesn't preserve
~/notewhen it replaces a container, so anyone runningnotehubthere lost their saved login (and the rest of the config) every time the container was replaced. Platforms like muse do persist the standard config directory, so the config now lives there.What changed
The config file, which includes saved Notehub credentials, has moved:
~/note/config.json$XDG_CONFIG_HOME/note/config.json, or~/.config/note/config.jsonif that isn't set%USERPROFILE%\note\config.json%AppData%\note\config.json~/.configis used on macOS as well, matching tools likegh, rather than~/Library/Application Support, which is harder to find and has a space in the path. A relative$XDG_CONFIG_HOMEis ignored, as the XDG spec requires.0700), since it holds tokens.ConfigDir()now returns(string, error). When no home or config directory can be found (for example,$HOMEunset in a stripped-down container), commands now fail with a clear error. Before, they fell back to the current directory, which could leave tokens in a repository.lib/config-unix.goandlib/config-windows.goare replaced by onelib/config-dir.go.Impact
Existing config at
~/note/config.jsonisn't migrated, so users need to runnotehub loginagain once after upgrading.This branch also includes the earlier commit 644f8e8 (go-m1cpi update for the Apple M5 crash, and help agent text).
Testing
go vetpasses for the host OS andGOOS=windowsgo test ./...passes inlib🤖 Generated with Claude Code