Skip to content
paulsylPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

39 Commits

Folders and files

Repository files navigation

OpenCode + Direct Provider Routing + Antigravity Integration

A unified, high-performance terminal AI coding environment built inside Windows Subsystem for Linux (WSL Ubuntu).

It integrates:

  • OpenCode CLI (v1.18.4): Terminal AI coding agent executing directly against provider APIs.
  • Direct Provider Routing: Direct HTTPS routing to DeepSeek and Google AI Studio APIs (including Gemini and Claude models) using native API keys.
  • Antigravity Agents & Skills: Pre-loaded global SDLC workflows, rules, and skills imported from paulsyl/Antigravity.

🚀 Features

  • ⚡ Zero-Dependency Installer: Sets up Node 24 runtime, OpenCode CLI, Antigravity skills, and smart wrapper scripts automatically.
  • 🔑 Interactive Key Management (opencode keys): View masked status, add, or remove provider API keys with auto-invalidation of cached catalogs.
  • 🔒 Provider API Key Gating: Only models from providers with configured API keys are displayed or usable.
  • 🌐 Live Model Catalog Query & 1h Cache: Queries upstream /v1/models (DeepSeek) and /v1beta/models (Google AI Studio) live, cached locally for 1 hour.
  • 🤖 Pre-Loaded Antigravity SDLC Agents: @architect, @executor, @review-council, @specifier-grill, @specifier-prd, @orchestrator, @prototype, @ponytail, and @qa-orchestrator loaded globally by default.
  • 📈 Post-Task Execution Metrics: Displays a formatted, colorized terminal summary box after every task detailing the model(s) used, prompt/completion token counts, execution duration, and estimated cost.
  • 🔄 Unified Updater: Run opencode update to upgrade the OpenCode CLI binary.

📦 Installation & Quickstart

Step-by-Step Setup

  1. Clone the Repository:

    git clone https://github.com/paulsyl/Opencode.git /home/paulsyl/projects/opencode-omniroute
    cd /home/paulsyl/projects/opencode-omniroute
  2. Run the Automated Installer:

    ./setup-opencode-omniroute.sh
  3. Configure API Keys:

    opencode keys set deepseek <your-deepseek-api-key>
    opencode keys set gemini <your-gemini-api-key>
  4. Verify Provider Keys & Available Models:

    opencode keys list

⚙️ Configuration & Key Management

opencode keys Subcommand

Manage provider API keys interactively:

# List configured keys and cached model counts
opencode keys list

# Set or update API key for DeepSeek or Google AI Studio (Gemini/Claude)
opencode keys set deepseek sk-xxxx
opencode keys set gemini AQ.xxxx

# Remove API key
opencode keys remove deepseek

API keys are stored securely in ~/.config/opencode/env (mode 0600) and provider definitions are synchronized automatically in ~/.config/opencode/opencode.json.


💻 Agent Persona Model Mapping (opencode agent-map)

Launch interactive arrow-key TTY selection to bind agent personas to designated provider models:

opencode agent-map

Mappings are persisted atomically to .agents/agent-models.json and synced to ~/.config/opencode/opencode.json.

Agent / Skill Trigger / Command Default / Preferred Model Purpose
Architect @architect gemini/claude-3-opus Translates PRDs into vertical-sliced technical blueprints
Executor @executor gemini/gemini-2.5-pro Phase-by-phase implementation builder with escape hatch handling
Orchestrator @orchestrator gemini/gemini-3.6-flash Chains full SDLC pipeline automatically
Ponytail @ponytail gemini/gemini-3.6-flash Enforces minimal, lazy, zero-boilerplate code standards (YAGNI)
Ponytail Audit @ponytail-audit gemini/gemini-3.6-flash Whole-repo audit for over-engineering and bloat
Ponytail Debt @ponytail-debt gemini/gemini-3.6-flash Harvests deferred ponytail shortcuts into a debt ledger
Ponytail Gain @ponytail-gain gemini/gemini-3.6-flash Shows ponytail impact scoreboard (tokens, cost, speed)
Ponytail Help @ponytail-help gemini/gemini-3.6-flash Quick reference card for all ponytail commands
Ponytail Review @ponytail-review gemini/gemini-3.6-flash Code review focused exclusively on over-engineering
Prototype @prototype deepseek/deepseek-chat Rapid throwaway exploration without ceremony
QA Analyzer @qa-analyzer deepseek/deepseek-v4-flash Audits test execution against PRD test plans
QA Architect @qa-architect deepseek/deepseek-v4-flash Designs comprehensive black-box test plans
QA Execution @qa-execution gemini/gemini-3.5-flash Mechanically executes test steps against target app
QA Orchestrator @qa-orchestrator gemini/gemini-3.6-flash Master QA pipeline orchestrator
Review Council @review-council deepseek/deepseek-reasoner Multi-persona adversarial review council (Security, Data, Scope, Tests)
Setup Core Workflow @setup-core-workflow gemini/gemini-2.5-flash Configures SDLC core-workflow directory structure per repo
Specifier Grill @specifier-grill gemini/claude-3-opus Interactive interview grilling to align requirements
Specifier PRD @specifier-prd gemini/gemini-2.5-pro Generates canonical Product Requirements Document

📁 Repository Structure

opencode-omniroute/
├── README.md                           # Main documentation
├── setup-opencode-omniroute.sh         # Master installer & maintenance entry point
├── scripts/
│   ├── provider-catalog.js            # Live model catalog query, key gating & cache engine
│   ├── opencode-keys.js               # Interactive key manager CLI (opencode keys)
│   ├── agent-discovery.js             # Workspace skill scanner & model grouper
│   ├── agent-map-cli.js               # Arrow-key TTY UI for agent-model mapping
│   ├── fail-fast-reroute.js           # Key-gated fail-fast rerouting engine
│   └── configure-agent.sh             # Direct provider config generator
├── templates/
│   └── opencode-wrapper.sh            # Smart launcher daemon wrapper
└── docs/
    ├── ARCHITECTURE.md                 # Technical architecture specs
    ├── QUICKSTART.md                   # Quickstart guide
    └── TROUBLESHOOTING.md              # Troubleshooting guide

📄 License

MIT License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages