Skip to content

Conversation

@code-yeongyu
Copy link
Owner

  • Add getUserConfigDir() for OS-specific config paths:
    • Linux: XDG_CONFIG_HOME or ~/.config
    • macOS: ~/Library/Application Support
    • Windows: %APPDATA%
  • Add user-level config: {configDir}/opencode/oh-my-opencode.json
  • Add .opencode/oh-my-opencode.json as new project config path
  • Keep legacy paths (oh-my-opencode.json, .oh-my-opencode.json) for backward compatibility
  • Implement config merging: user config as base, project config overrides
  • agents are merged, disabled_* arrays are combined (union)

Config priority (highest to lowest):

  1. {project}/.opencode/oh-my-opencode.json
  2. {project}/oh-my-opencode.json (legacy)
  3. {project}/.oh-my-opencode.json (legacy)
  4. {userConfigDir}/opencode/oh-my-opencode.json (base)

Improves upon #17 by preserving backward compatibility and
supporting XDG_CONFIG_HOME on Linux.

- Add getUserConfigDir() for OS-specific config paths:
  - Linux: XDG_CONFIG_HOME or ~/.config
  - macOS: ~/Library/Application Support
  - Windows: %APPDATA%
- Add user-level config: {configDir}/opencode/oh-my-opencode.json
- Add .opencode/oh-my-opencode.json as new project config path
- Keep legacy paths (oh-my-opencode.json, .oh-my-opencode.json) for backward compatibility
- Implement config merging: user config as base, project config overrides
- agents are merged, disabled_* arrays are combined (union)

Config priority (highest to lowest):
1. {project}/.opencode/oh-my-opencode.json
2. {project}/oh-my-opencode.json (legacy)
3. {project}/.oh-my-opencode.json (legacy)
4. {userConfigDir}/opencode/oh-my-opencode.json (base)

Improves upon #17 by preserving backward compatibility and
supporting XDG_CONFIG_HOME on Linux.
@code-yeongyu code-yeongyu force-pushed the claude/review-new-pr-01Eu5o8ufuKaci9CJu86UbMd branch from 9ba3bb6 to ce12297 Compare December 11, 2025 23:47
@code-yeongyu code-yeongyu merged commit 9ba4155 into master Dec 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants