Repository navigation
feat: file-based config (~/.config/lmnr/claude-code-plugin.json), drop userConfig - #4
Merged
Merged
Conversation
….json Symmetric, file-based config shared with the Codex plugin. Codex has no per-plugin secret store, so both plugins now read the key from a laminar-owned per-agent file (written by `lmnr-cli plugin add claude-code`) instead of Claude Code's keychain-backed userConfig. - config.ts: resolve projectApiKey/baseUrl from ~/.config/lmnr/claude-code-plugin.json; LMNR_PROJECT_API_KEY / LMNR_BASE_URL env still override (CI / existing shells). - plugin.json: drop userConfig entirely — the plugin installs with zero prompts and no `--config`, matching the Codex plugin's zero-config install. - Test covers file resolution + env override; README/CLAUDE.md updated; dist rebuilt. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Makes the Claude Code plugin symmetric with the Codex plugin: the project API key comes from a laminar-owned per-agent file, not Claude Code's keychain
userConfig.Why
Codex has no per-plugin secret store. To keep both plugins on one mental model (and let
lmnr-cli plugin addown key delivery), the key now lives in~/.config/lmnr/<agent>-plugin.json— the same directory both plugins already read foruser_id(credentials.json).Changes
config.ts: readprojectApiKey/baseUrlfrom~/.config/lmnr/claude-code-plugin.json;LMNR_PROJECT_API_KEY/LMNR_BASE_URLenv still override..claude-plugin/plugin.json: removeuserConfig— zero-prompt install, no--config.dist/hook.cjsrebuilt.Coupling
Pairs with lmnr-ts PR #279 (CLI writes the file and installs without
--config). Merge together.Tested
npm test(57 pass, incl. new), typecheck, build,claude plugin validatepasses.🤖 Generated with Claude Code
Note
Medium Risk
Changes where the Laminar project API key is read (plaintext file vs former plugin secret store); tracing fails open if unset, but misconfiguration could send traces to the wrong project or nowhere until the CLI file exists.
Overview
Aligns Claude Code plugin setup with the Codex plugin by sourcing the project API key and base URL from
~/.config/lmnr/claude-code-plugin.json(written bylmnr-cli plugin add claude-code) instead of Claude Code’suserConfigprompts.getLaminarConfig()now loadsprojectApiKey/baseUrlfrom that file (fail-open if missing), withLMNR_PROJECT_API_KEY/LMNR_BASE_URLstill overriding for CI or existing shell config..claude-plugin/plugin.jsondropsuserConfigso install is zero-prompt.Docs switch install to
lmnr-cli plugin add claude-code;dist/hook.cjsis rebuilt. A new test covers file resolution and env override.Reviewed by Cursor Bugbot for commit 99a1985. Bugbot is set up for automated code reviews on this repo. Configure here.