-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(cli): add --githubcopilot and --local install options #550
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(cli): add --githubcopilot and --local install options #550
Conversation
Add two new CLI options for the install command: - --githubcopilot: Enable GitHub Copilot as a model provider with full agent configuration (claude-opus-4.5 for Sisyphus, gpt-5.2 for Oracle, claude-haiku-4.5 for Librarian/Explore, gemini-3-pro-preview for Frontend/Document-Writer, gemini-3-flash-preview for Multimodal-Looker) - --local: Write configuration to project-local .opencode/ directory instead of global ~/.config/opencode/, enabling per-project customization Update README.md with new options and usage examples. --- - src/cli/types.ts: Add githubcopilot to InstallArgs, hasGitHubCopilot to InstallConfig/DetectedConfig - src/cli/install.ts: Add validation, TUI prompt, config summary display with GitHub Copilot models - src/cli/config-manager.ts: Add generateOmoConfig priority for GitHub Copilot models, detection logic - src/cli/index.ts: Add --githubcopilot option and help text - README.md: Add GitHub Copilot examples and agent model documentation | Agent | Model | |--------------------------|------------------------------------| | Sisyphus | github-copilot/claude-opus-4.5 | | Oracle | github-copilot/gpt-5.2 | | Librarian | github-copilot/claude-haiku-4.5 | | Explore | github-copilot/claude-haiku-4.5 | | Frontend UI/UX Engineer | github-copilot/gemini-3-pro-preview | | Document Writer | github-copilot/gemini-3-pro-preview | | Multimodal Looker | github-copilot/gemini-3-flash-preview | ```bash bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no --githubcopilot=yes --- - src/cli/types.ts: Add local?: boolean to InstallArgs - src/cli/index.ts: Add --local option to install command - src/cli/config-manager.ts: Add isLocal to ConfigContext, add initLocalConfigContext() - src/cli/install.ts: Add local context initialization in both TUI and non-TUI modes The isLocal flag in ConfigContext prevents findOpenCodeBinaryWithVersion() from overwriting the local context when it calls initConfigContext() during OpenCode version detection. | Mode | OpenCode Config | oh-my-opencode Config | |---------|------------------------------|------------------------------------| | Global | ~/.config/opencode/opencode.json | ~/.config/opencode/oh-my-opencode.json | | Local | .opencode/opencode.json | .opencode/oh-my-opencode.json | bunx oh-my-opencode install --local --no-tui --claude=no --chatgpt=no --gemini=no --githubcopilot=yes
|
All contributors have signed the CLA. Thank you! ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant CLI as "CLI Install"
participant ConfigManager as "Config Manager"
participant FileSystem as "File System"
participant NPM as "NPM Registry"
participant OpenCode as "OpenCode Binary"
User->>CLI: "bunx oh-my-opencode install --githubcopilot=yes --local"
CLI->>CLI: "validateNonTuiArgs(args)"
CLI->>ConfigManager: "initLocalConfigContext()"
ConfigManager->>FileSystem: "create .opencode/ directory context"
CLI->>OpenCode: "check installation and version"
OpenCode-->>CLI: "version info"
CLI->>ConfigManager: "addPluginToOpenCodeConfig()"
ConfigManager->>FileSystem: "write .opencode/opencode.json"
CLI->>ConfigManager: "addAuthPlugins(config)"
ConfigManager->>NPM: "fetchLatestVersion(opencode-antigravity-auth)"
NPM-->>ConfigManager: "latest version"
ConfigManager->>FileSystem: "update plugin array"
CLI->>ConfigManager: "generateOmoConfig(installConfig)"
ConfigManager->>ConfigManager: "map GitHub Copilot models to agents"
CLI->>ConfigManager: "writeOmoConfig(config)"
ConfigManager->>FileSystem: "write .opencode/oh-my-opencode.json"
CLI->>User: "display configuration summary with GitHub Copilot models"
|
Greptile found no issues!From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
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.
Pull request overview
This PR adds two new CLI options to enhance installation flexibility: --githubcopilot for configuring GitHub Copilot as a model provider, and --local for installing to a project-specific .opencode/ directory instead of the global config.
- Adds GitHub Copilot as a first-class model provider option with dedicated agent configurations
- Enables local (project-specific) installations via the
--localflag - Updates documentation and help text to reflect the new installation options
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/cli/types.ts | Adds githubcopilot and local fields to InstallArgs and hasGitHubCopilot to config interfaces |
| src/cli/install.ts | Implements validation, TUI prompts, model selection logic, and config summaries for GitHub Copilot; adds local context initialization |
| src/cli/index.ts | Adds CLI options --githubcopilot and --local with updated help text and examples |
| src/cli/config-manager.ts | Implements local config context with initLocalConfigContext(), adds GitHub Copilot model mappings in config generation, and detection logic |
| README.md | Updates documentation with GitHub Copilot examples, installation steps, and agent model mappings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Gemini Powers frontend, documentation, and multimodal agents | ||
| GitHub Copilot Built-in OpenCode provider for Claude, GPT, and Gemini models |
Copilot
AI
Jan 6, 2026
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.
Spacing inconsistency in help text alignment. The "Gemini" line has extra spaces before "Powers" that don't match the alignment of "Claude" and "ChatGPT" lines. Additionally, "GitHub Copilot" description lacks proper alignment with the others.
| Gemini Powers frontend, documentation, and multimodal agents | |
| GitHub Copilot Built-in OpenCode provider for Claude, GPT, and Gemini models | |
| Gemini Powers frontend, documentation, and multimodal agents | |
| GitHub Copilot Built-in OpenCode provider for Claude, GPT, and Gemini models |
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.
1 issue found across 5 files
Confidence score: 5/5
- Only issue is cosmetic: extra space in Gemini’s CLI help text misaligns columns but doesn’t affect functionality, so overall risk stays low.
- Pay close attention to
src/cli/index.ts- ensures help text spacing stays consistent across models.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="src/cli/index.ts">
<violation number="1" location="src/cli/index.ts:42">
P3: Inconsistent spacing in help text - Gemini has an extra space compared to Claude and ChatGPT, causing misaligned columns in the CLI help output.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| Gemini Powers frontend, documentation, and multimodal agents | ||
| Claude Required for Sisyphus (main orchestrator) and Librarian agents | ||
| ChatGPT Powers the Oracle agent for debugging and architecture | ||
| Gemini Powers frontend, documentation, and multimodal agents |
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.
P3: Inconsistent spacing in help text - Gemini has an extra space compared to Claude and ChatGPT, causing misaligned columns in the CLI help output.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/index.ts, line 42:
<comment>Inconsistent spacing in help text - Gemini has an extra space compared to Claude and ChatGPT, causing misaligned columns in the CLI help output.</comment>
<file context>
@@ -23,28 +23,34 @@ program
- Gemini Powers frontend, documentation, and multimodal agents
+ Claude Required for Sisyphus (main orchestrator) and Librarian agents
+ ChatGPT Powers the Oracle agent for debugging and architecture
+ Gemini Powers frontend, documentation, and multimodal agents
+ GitHub Copilot Built-in OpenCode provider for Claude, GPT, and Gemini models
`)
</file context>
| Gemini Powers frontend, documentation, and multimodal agents | |
| Gemini Powers frontend, documentation, and multimodal agents |
|
Please merge this 🙏. Very valuable contribution. Thanks a lot! |
Really agree. copilot pro+ sub will be useful. |
|
Maybe also add it to utilize the "unlimited" requests with github-copilot subscription? So e.g. it doesnt consume usage and also do not send your code to X |
|
stale, if still relevant feel free to reopen with conflicts resolved. |
Summary
Need to install oh-my-opencode in a local folder with Github Copilot subscription option. While its possible to manually edit the oh-my-opecode.json file after the fact, it will be easier to have this as a CLI option to configure (--githubcopilot similar to --claude, --chatgpt, --gemini). Also explicitly added a --local option to CLI to allow creating everything in project specific .opencode instead of ~/.config/opencode
feat(cli): add --githubcopilot and --local install options
Add two new CLI options for the install command:
agent configuration (claude-opus-4.5 for Sisyphus, gpt-5.2 for Oracle,
claude-haiku-4.5 for Librarian/Explore, gemini-3-pro-preview for
Frontend/Document-Writer, gemini-3-flash-preview for Multimodal-Looker)
instead of global ~/.config/opencode/, enabling per-project customization
Changes
--githubcopilot Option
Files Modified:
GitHub Copilot Model Mapping:
Usage:
--local Option
Files Modified:
Key Design Decision:
The isLocal flag in ConfigContext prevents findOpenCodeBinaryWithVersion() from
overwriting the local context when it calls initConfigContext() during OpenCode
version detection.
Output Paths:
Usage:
bunx oh-my-opencode install --local --no-tui --claude=no --chatgpt=no --gemini=no --githubcopilot=yes
Testing
OR
Related Issues
Not created
Summary by cubic
Adds two new CLI options: --githubcopilot to configure agents to GitHub Copilot models, and --local to install per-project in .opencode. This makes setup easier for Copilot users and enables project-specific configs.
New Features
Migration
Written for commit b302dac. Summary will update on new commits.