GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - forebay/opencode-loader: OpenCode loader for the forebay AI-proxy ecosystem.

BranchesTags
Open more actions menu

Latest commit

 

History

374 Commits
374 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
SPEC.md
SPEC.md
 
 
build.mjs
build.mjs
 
 
icon.svg
icon.svg
 
 
package.json
package.json
 
 
plugin.json
plugin.json
 
 
tsconfig.json
tsconfig.json
 
 
typedoc.json
typedoc.json
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

opencode-loader

npm version npm downloads CI

TUI launcher and oc shell command for OpenCode. When loaded as an OpenCode plugin it installs an oc command into your shell; running oc opens an interactive TUI for switching between projects, managing plugins, and signing in to providers. It also drives plugin-updater on startup so all your git-based plugins stay current.

Under-the-Hood Architecture

flowchart TD
    START[OpenCode startup] -->|activate| PLUGIN[plugin.js]
    PLUGIN -->|earlyLaunch| UPDATER[plugin-updater]
    PLUGIN -->|install| OCBIN["oc / oc.cmd in ~/.local/bin"]
    PLUGIN -->|deployCommands| CMDS["/opencode-loader-config, /plugins, /accounts"]
    OCBIN -->|run oc| TUI["core-loader TUI (node tui.js)"]
    TUI --> PROJ[Projects tab]
    TUI --> PLUG[Plugins tab]
    TUI --> PROV[Providers tab (tui-extension.js)]
    PROV --> COREAUTH[(core-auth account store)]
Loading

Structure

  • src/
    • plugin.ts: the OpenCode plugin entry (activate/cleanup); installs the oc wrapper, runs plugin-updater, deploys commands. Also acts as the command CLI (node plugin.js <config|plugins|accounts>).
    • tui-extension.ts: the loader's custom Providers tab (auto-discovers installed providers).
    • commands.ts: cross-app slash-command definitions + their CLI actions.
  • dist/
    • compiled output (generated; not committed).

Requirements

  • Node.js 20+ (the TUI runs under Node, no Bun required; it reads the OpenCode session DB via Node 22+'s built-in node:sqlite, falling back to bun:sqlite when run under Bun).

Installation

Via plugin-updater (recommended)

npx plugin-updater@latest init https://github.com/intisy-ai/opencode-loader

Via npm

npm install opencode-loader

Plugin-updater entry

When using plugin-updater, add this entry to ~/.config/opencode/config/plugins.json:

{ "name": "opencode-loader", "url": "https://github.com/intisy-ai/opencode-loader", "enabled": true, "autoUpdate": true }

Restart OpenCode; the updater clones, builds and loads it.

When using npm directly, add to ~/.config/opencode/opencode.json:

{ "plugins": ["opencode-loader@latest"] }

Usage

oc              # Launch the TUI
oc 3            # Open project #3 directly
oc myproject    # Open the first project matching "myproject"

Keyboard shortcuts

Key Projects tab Plugins tab
↑↓ / W S Navigate Navigate
Enter Open action menu Open action menu
O Open project -
P Pin/Unpin -
H / U Hide / Unhide all -
F - Fetch remote updates
A - Toggle auto-update
← → Switch tabs Switch tabs
Q Quit Quit

Commands

Deployed automatically on activation to both apps' command directories (~/.config/opencode/command/ and ~/.claude/commands/):

Command Description
/opencode-loader-config View/change loader config (opencode-loader.json): list, get <key>, set <key> <value>. 100% of the config is reachable here.
/plugins List the loader-managed plugins and their state (from plugins.json).
/accounts List signed-in accounts across all providers (from the core-auth store).

Configuration

Config file: <configDir>/config/opencode-loader.json (edit it directly, or through whatever settings surface the app offers).

{
  "logging": true,
  "auto_update_check": true,
  "update_check_delay_ms": 1500,
  "update_check_interval_hours": 24,
  "catalog_cache_hours": 6,
  "default_tab": "projects",
  "use_proxy": false,
  "proxy_port": 34568
}
Key Default
logging true
auto_update_check true
update_check_delay_ms 1500
update_check_interval_hours 24
catalog_cache_hours 6
default_tab "projects"
use_proxy false
proxy_port 34568

Configuration (extra)

The TUI also stores its own settings in config/oc-config.json and the plugin list in config/plugins.json.

Dependencies

  • core-loader
  • core
  • plugin-updater
  • Bun

Logging

Logs are written to <configDir>/logs/YYYY-MM-DD/opencode-loader-HH-MM-SS.log and are toggled by this plugin's logging config (default on). Console mirroring is global, off by default, and controlled by the shared config/settings.json logConsole flag.

License

MIT.

About

OpenCode loader for the forebay AI-proxy ecosystem.

Topics

aiai-proxyapp-loaderforebayllmloaderopencodetypescript

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.