Skip to content

Repository files navigation

OpenCode Dashboard

A web dashboard for managing your OpenCode configuration — skills, commands, agents, MCP servers, providers, models — and tracking your spending metrics and token usage, all from your browser.

How it works

OpenCode Dashboard runs as an OpenCode server plugin. When you start OpenCode, the plugin automatically:

  1. Starts a local web server on port 11337
  2. Opens the dashboard in your default browser

From there you can visually manage everything in your OpenCode config — create skills, add MCP servers, tweak agent prompts, configure providers — without hand-editing JSON files.

If you open a second OpenCode instance while one is already running, the plugin detects the existing dashboard and skips starting a duplicate. No extra browser tabs, no port conflicts.

Installation

Tell your AI:

Add @igorvelho/opencode-dashboard-plugin to the plugin list in my opencode.json

That's it. Start OpenCode and the dashboard opens automatically at http://localhost:11337.

Requirements: OpenCode 1.4.0 or newer.

Manual Installon

Add the plugin to your OpenCode config at ~/.config/opencode/opencode.json:

{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@igorvelho/opencode-dashboard-plugin"]
}

OpenCode will automatically install the plugin from npm on next startup.

Verify Installation

Start a new OpenCode session. Your default browser should open to the dashboard. You should see the version number in the bottom-left corner of the sidebar.

Updating

OpenCode caches plugins after first install. To update to the latest version, clear the plugin cache and restart OpenCode:

rm -rf ~/.cache/opencode/packages/@igorvelho*

Features

  • Metrics & Usage — Track token usage, API costs, and session statistics with visual charts and breakdowns by project and model
  • Skills — Create, edit, and delete custom skills with a markdown editor and YAML frontmatter support
  • Commands — Manage slash commands (file-based and JSON-defined, read-only for built-in commands)
  • Agents — Configure custom agents with system prompts, model overrides, and tool permissions
  • MCP Servers — Add, remove, and toggle MCP server configurations with a visual editor
  • Providers & Models — Configure AI providers and their model settings
  • Config Editor — Raw JSONC editor for opencode.json with syntax highlighting
  • Backup & Restore — Full or redacted config backups with automatic secret detection
  • Workspace Management — Switch between multiple OpenCode config directories

Configuration

Environment VariableDescriptionDefault
OPENCODE_CONFIG_DIRPath to OpenCode config directory~/.config/opencode
PORTDashboard server port11337

Platform Support

The plugin auto-opens the dashboard in your default browser on all platforms:

PlatformMethod
WSLcmd.exe /c start (opens in Windows browser)
macOSopen
Windowscmd /c start
Linuxxdg-open

Contributing

Contributions are welcome! Fork the repo, create a branch, and submit a PR.

Prerequisites

  • Node.js 18+
  • npm

Setup

git clone https://github.com/igorvelho/opencode-dashboard.git
cd opencode-dashboard
# Install dependencies (three separate node_modules — root, server, client)
npm install
cd server && npm install
cd ../client && npm install
cd ..

Development

npm run dev

This starts both the API server (port 3001) and the Vite dev server (port 5173) via concurrently. Open http://localhost:5173 — the Vite dev server proxies API requests to the backend.

Tests

npm test# run all tests (server)
npm run test:watch --prefix server # watch mode

Tests live in server/tests/ and use temp directories with real file I/O (no filesystem mocks).

Production Build

npm run build
npm start

Open http://localhost:11337 — the server serves the built client as static files.

Architecture

opencode-dashboard/
├── client/ React 19 + Vite + Tailwind v4 + shadcn/ui
├── server/ Express API (TypeScript)
├── shared/ TypeScript types and Zod validation schemas
└── plugin/ OpenCode server plugin (starts dashboard, opens browser)
LayerStack
ClientReact 19, TypeScript, Vite, shadcn/ui (base-nova), Tailwind CSS v4, React Router
ServerExpress, TypeScript, gray-matter, jsonc-parser, Zod
SharedTypeScript types and Zod schemas used by both client and server
PluginOpenCode server plugin — manages lifecycle, auto-opens browser

How Releases Work

This project uses a CI-driven release process. You never need to manually build or deploy.

  1. Make your changes on a feature branch
  2. Submit a PR to master — only the maintainer can merge
  3. On merge to master, GitHub Actions automatically:
    • Builds the client (Vite) and server (TypeScript)
    • Strips types from the plugin source
    • Publishes the built output to npm as @igorvelho/opencode-dashboard-plugin
    • Creates a git tag and GitHub Release (if the version in package.json was bumped)

To cut a new version: bump version in both the root package.json and plugin/package.json, merge to master, and CI handles the rest.

License

MIT License — see LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages