Skip to content

snap-sites/opencode-gpt5-fork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-gpt5-fork

Claude/Gemini-style TUI via upstream opencode, plus a lightweight headless wrapper ocx for fast model/mode switching using OpenAI GPT‑5 models (gpt-5, gpt-5-mini, gpt-5-nano).

Quick start (local build)

Prereqs:

  • Install upstream opencode (see their README). Common installs:

    • macOS: brew install sst/tap/opencode
    • Any: npm i -g opencode-ai
  • Go 1.22+ installed for building ocx

Build ocx locally:

cd cmd/ocx
go build -o ocx .
sudo mv ocx /usr/local/bin/

Set your API key:

export OPENAI_API_KEY="sk-..."
# (optional) add to ~/.zshrc or ~/.bashrc

Use it:

ocx --model gpt-5-mini --mode code "Write a Python function that parses CSV to JSON"
ocx --model gpt-5 --mode plan "Design a FastAPI service with JWT auth"
ocx --model gpt-5-nano --mode debug --file app.py "Fix NoneType crash on startup"

If you prefer the full TUI:

opencode
# TAB toggles Plan/Build, /models switches models, @ adds files

Release builds (GitHub Actions)

  1. Push this repo to https://github.com/YOURUSER/opencode-gpt5-fork.
  2. Tag a release:
git tag v0.1.0
git push origin v0.1.0
  1. GitHub Actions will publish binaries (macOS, Linux, Windows) to Releases.

Install via curl on macOS/Linux:

curl -fsSL https://raw.githubusercontent.com/YOURUSER/opencode-gpt5-fork/main/scripts/install.sh | bash

Windows PowerShell:

iwr -useb https://raw.githubusercontent.com/YOURUSER/opencode-gpt5-fork/main/scripts/install.ps1 | iex

Replace YOURUSER above with your GitHub username (or org).

Configuration

presets/opencode.json pre-maps gpt-5, gpt-5-mini, gpt-5-nano for OpenAI. ocx writes .opencode/opencode.json into your project with the selected default model.

Notes

  • ocx launches the upstream opencode TUI with your model and style preselected.
  • For purely non-interactive runs, we’ll tighten the integration later.
  • This repo intentionally avoids heavy changes to upstream opencode.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published