Repository navigation
Conversation
Both READMEs tell self-hosters to set EVERME_API_BASE before 'evercli auth login', and every host integration writes that same variable into its MCP entry — but core.LoadConfig only ever looked at EVERCLI_*, so the documented override was silently ignored and the CLI kept talking to the managed gateway (issue EverMind-AI#3). Bind api_base_url explicitly: EVERCLI_API_BASE_URL stays the (undocumented) escape hatch and keeps precedence, EVERME_API_BASE now satisfies the documented contract, and env still beats the config file as the priority list promises.
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.
Summary
Both READMEs tell self-hosters to set
EVERME_API_BASEbeforeevercli auth login, and every host integration writes that same variable into its MCP entry — butcore.LoadConfigonly ever looked atEVERCLI_*, because viper'sAutomaticEnvwithSetEnvPrefix("EVERCLI")cannot see anEVERME_-prefixed name. The documented override was therefore silently ignored and the CLI always talked to the managed gateway.Changes
cli/internal/core/config.go— bindapi_base_urlexplicitly toEVERCLI_API_BASE_URLandEVERME_API_BASE(first name wins) instead of relying onAutomaticEnvalone.cli/internal/core/config_test.go— three regression tests:EVERME_API_BASEoverrides the compiled-in default,EVERCLI_API_BASE_URLkeeps precedence, and env still beats the config file.Precedence for existing users is unchanged:
EVERCLI_API_BASE_URL>EVERME_API_BASE>config.yaml> compiled-in default, which matches the priority list documented onConfig.Self-hosters who configured the plugin by hand benefit as well:
plugin installcopies the resolvedapi_base_urlinto the host MCP entry asEVERME_API_BASE, so the same variable now flows from the CLI into every host integration.Test Plan
go1.27.4, linux/amd64, commit
1cfd5bf:Manual verification — the documented flow now reaches the configured endpoint instead of production:
cli/changedplugins/changed — not applicable, this PR does not touchplugins/Security
emk_*,evt_*, cookies, private URLs, or production logs are included — tests usehttps://selfhosted.example.comand127.0.0.1only.Related Issues
api_base_url.