Replies: 2 comments 2 replies
-
I will be doing this for now:
But I am still curious to see other answers :) |
Beta Was this translation helpful? Give feedback.
2 replies
-
fwiw I hacked together a solution using # ~/.bash_aliases
# claude
# * NOTE: requires `envsubst` (from `gettext` package)
if [[ -f "$HOME/git/claude_config/.env" ]]; then
export $(grep -v '^#' "$HOME/git/claude_config/.env" | xargs)
envsubst < "$HOME/git/claude_config/claude_desktop_config.json.tpl" \
> "$HOME/git/claude_config/claude_desktop_config.json"
fi then in my git repo In the repo my
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I am looking for suggestions for how to version my
claude_desktop_config.json
without committing secrets.More details
Background
Like many of you, I like to version control my dotfiles. I consider
claude_desktop_config.json
to be a dotfile.My dotfiles are not publicly accessible, but maybe they will be one day. I prefer not to include secrets in my dotfiles.
Some servers that I have seen (ex) require that secrets be included in
claude_desktop_config.json
. To my knowledge, the secrets need to be included verbatim. Please correct me if that's not true. I am getting my info from this part of the docs.Possible solutions
One solution would be to version control a template, and build
claude_desktop_config.json
fromclaude_desktop_config.json.template
. If anyone has already done this I would be curious to see how you did it :)If there are other ways to get specific variables & values from my default shell environment into my servers, that would be nice to know about :).
Potentially confusing part of the docs
The docs state:
Someone could interpret this to mean that
"some_key"
can be a key, like"GITHUB_TOKEN"
. That would actually be quite convenient. But example configuration for several servers suggests that it should be a value, like an actual GitHub token string. Examples:Github Server:
}
Brave Search:
I've confirmed that setting
"some_key"
to an environment key does not work with the following test:in my shell:
claude_desktop_config.json
Quit & Restart Claude Desktop
Result:

Brave search works again if I set
Pre-submission Checklist
Question Category
Beta Was this translation helpful? Give feedback.
All reactions