docs: 📚 Use OPENCODE_CONFIG_DIR in install docs#506
docs: 📚 Use OPENCODE_CONFIG_DIR in install docs#506
Conversation
docs(docs/README.opencode.md): 📚 Introduce OPENCODE_CONFIG_DIR and update install/verification commands for macOS/Linux, Command Prompt, PowerShell and Git Bash to use the variable; add a note about the default config directory.
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenCode installation documentation to support environments where the OPENCODE_CONFIG_DIR environment variable is set, allowing users to customize the location of their OpenCode configuration files. This is particularly useful when evaluating global settings for large features like superpowers or oh-my-opencode.
Changes:
- Added a note explaining that all paths use the default config directory unless
OPENCODE_CONFIG_DIRis set - Updated all installation scripts (macOS/Linux, Windows Command Prompt, PowerShell, Git Bash) to use
OPENCODE_CONFIG_DIRwith appropriate fallbacks - Updated verification commands to use the environment variable
- Updated various code examples to reference the environment variable where appropriate
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I was trying to not add noise everywhere in the doc especially since 95% of people are not customizing their config location. But I did want all the install scripts to act appropriately without the hardcoding. Im willing to update this to whatever the maintainers desire. This is a tradeoff between some visual noise vs accuracy that they should make, not copilot. |
|
Thanks for this. Given that this is visual noise that's going to be read by the agent, not by the human, I'm not too worried about that. Would you mind retargeting this at the |
|
Will do next week. |
📝 WalkthroughWalkthroughThe documentation for OpenCode installation and setup has been updated to parameterize file-system paths using a configurable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
docs/README.opencode.md (2)
205-205: Good variable-based command, but nearby path text is now inconsistent.Line 205 correctly respects
OPENCODE_CONFIG_DIR, but the surrounding prose still references only~/.config/opencode/..., which can confuse users with custom config directories.Proposed wording alignment
-Create your own skills in `~/.config/opencode/skills/`: +Create your own skills in `${OPENCODE_CONFIG_DIR:-~/.config/opencode}/skills/`: -Create `~/.config/opencode/skills/my-skill/SKILL.md`: +Create `${OPENCODE_CONFIG_DIR:-~/.config/opencode}/skills/my-skill/SKILL.md`:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/README.opencode.md` at line 205, The documentation mixes a variable-based example (mkdir -p "${OPENCODE_CONFIG_DIR:-$HOME/.config/opencode}/skills/my-skill") with surrounding prose that still mentions only "~/.config/opencode/..."; update the nearby explanatory text to reference OPENCODE_CONFIG_DIR and the fallback $HOME/.config/opencode so they match the command, e.g., explain that the command uses the OPENCODE_CONFIG_DIR environment variable with a default of $HOME/.config/opencode and that the skill directory is created under that resolved path; ensure mentions of "~/.config/opencode" are replaced or supplemented with OPENCODE_CONFIG_DIR and the default path to avoid confusion.
300-300: UseOPENCODE_CONFIG_DIRin Windows troubleshooting command too.This line reintroduces a hardcoded Windows config path, which conflicts with the new configurable-path approach.
Proposed docs tweak
-2. Check symlink/junction: `ls -l ~/.config/opencode/plugins/` (macOS/Linux) or `dir /AL "%USERPROFILE%\.config\opencode\plugins"` (Windows) +2. Check symlink/junction: `ls -l "${OPENCODE_CONFIG_DIR:-$HOME/.config/opencode}/plugins/"` (macOS/Linux) or `if not defined OPENCODE_CONFIG_DIR set OPENCODE_CONFIG_DIR=%USERPROFILE%\.config\opencode && dir /AL "%OPENCODE_CONFIG_DIR%\plugins"` (Windows)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/README.opencode.md` at line 300, Replace the hardcoded Windows config path in the troubleshooting command with the OPENCODE_CONFIG_DIR environment variable: change the dir command that currently references "%USERPROFILE%\.config\opencode\plugins" to use "%OPENCODE_CONFIG_DIR%\plugins" so Windows respects the configurable path; update the README.opencode.md line containing the example command (the one starting with dir /AL) accordingly and ensure surrounding text mentions OPENCODE_CONFIG_DIR, not the old hardcoded path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/README.opencode.md`:
- Line 205: The documentation mixes a variable-based example (mkdir -p
"${OPENCODE_CONFIG_DIR:-$HOME/.config/opencode}/skills/my-skill") with
surrounding prose that still mentions only "~/.config/opencode/..."; update the
nearby explanatory text to reference OPENCODE_CONFIG_DIR and the fallback
$HOME/.config/opencode so they match the command, e.g., explain that the command
uses the OPENCODE_CONFIG_DIR environment variable with a default of
$HOME/.config/opencode and that the skill directory is created under that
resolved path; ensure mentions of "~/.config/opencode" are replaced or
supplemented with OPENCODE_CONFIG_DIR and the default path to avoid confusion.
- Line 300: Replace the hardcoded Windows config path in the troubleshooting
command with the OPENCODE_CONFIG_DIR environment variable: change the dir
command that currently references "%USERPROFILE%\.config\opencode\plugins" to
use "%OPENCODE_CONFIG_DIR%\plugins" so Windows respects the configurable path;
update the README.opencode.md line containing the example command (the one
starting with dir /AL) accordingly and ensure surrounding text mentions
OPENCODE_CONFIG_DIR, not the old hardcoded path.
|
Superseded by #704.\n\nI retargeted #506 to the dev base, but it still used head branch cavanaug:main. GitHub does not allow changing an existing PR head branch to a different branch name, so I replayed the same docs change onto cavanaug:dev and opened #704 for a clean diff against dev.\n\nPlease review and merge #704 instead. |
docs(docs/README.opencode.md): 📚 Introduce OPENCODE_CONFIG_DIR and update install/verification commands for macOS/Linux, Command Prompt, PowerShell and Git Bash to use the variable; add a note about the default config directory.
Update the opencode installation documentation to support environments where the OPENCODE_CONFIG_DIR is set. This allows different global settings to be used. This for example is useful when evaluating global settings for large new features like superpowers or oh-my-opencode.
Motivation and Context
Today the docs are hardcoded to the default location of the opencode config files it does not respect the OPENCODE_CONFIG_DIR
How Has This Been Tested?
I have tested the linux install
Breaking Changes
No
Types of changes
Checklist
Additional context