-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add OPENCODE_CONFIG_DIR environment variable support #629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add OPENCODE_CONFIG_DIR environment variable support #629
Conversation
- Add env var check to getCliConfigDir() for config directory override - Update detectExistingConfigDir() to include env var path in locations - Add comprehensive tests (7 test cases) - Document in README Closes code-yeongyu#627
|
All contributors have signed the CLA. Thank you! ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
I have read the CLA Document and I hereby sign the CLA |
rip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Follow-up: Documentation for Ghost Profiles?Would you be open to adding a documentation section about using OMO with OCX Ghost Profiles? Since OCX already sets I'm thinking a section like "Ghost Profiles (OCX Integration)" covering:
Let me know if this would be welcome, or if you'd prefer to keep the OMO docs focused and link to OCX docs instead. |
(cherry picked from commit d641608)
|
@sisyphus-dev-ai review |
…gyu#629) - Add env var check to getCliConfigDir() for config directory override - Update detectExistingConfigDir() to include env var path in locations - Add comprehensive tests (7 test cases) - Document in README Closes code-yeongyu#627
- Add env var check to getCliConfigDir() for config directory override - Update detectExistingConfigDir() to include env var path in locations - Add comprehensive tests (7 test cases) - Document in README Closes #627
Summary
Adds
OPENCODE_CONFIG_DIRenvironment variable support for config directory override, enabling compatibility with OCX ghost mode profiles.Closes #627
Changes
getCliConfigDir()insrc/shared/opencode-config-dir.tsdetectExistingConfigDir()to include env var path in locations arrayBehavior
OPENCODE_CONFIG_DIR=/custom/path/custom/pathOPENCODE_CONFIG_DIR=./relativeOPENCODE_CONFIG_DIR=""or whitespaceTesting
CLAUDE_CONFIG_DIRpattern in codebaseOCX Integration
OCX ghost mode can now set the env var when spawning OpenCode:
OPENCODE_CONFIG_DIR=~/.config/opencode/profiles/work opencodeSummary by cubic
Adds OPENCODE_CONFIG_DIR to let users override the OpenCode config directory. This enables OCX ghost mode profile isolation while keeping defaults when the env var isn’t set.
Written for commit 0e7516c. Summary will update on new commits.