mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Per-session permission modes: each root session runs in ask or auto. Auto answers each permission request once from the backend, child sessions inherit their root's mode, forks copy the source's mode, and scheduled runs and agent-created sessions stay on ask. A lock reason reports why a session's mode cannot change. Session goals: arm a goal in the composer and a backend audit loop keeps the session working until an auditor model returns done or blocked. The loop is bounded by continuation and token limits, survives restarts, and pushes an outcome notification. Goals cannot start on scheduled-run or child sessions. ocm session tool: allow-listed internal routes to list, create, follow up on, read replies from, and fork sessions. Created and forked sessions are pinned to ask, listing covers a repo's workspaces, and replies wait for the session to settle with a capped response. Multi-run: launch one prompt on up to five models, optionally each in its own OpenCode workspace, with per-entry status and discard. Also add the shared owners this group needed (session launcher, session reply, workspace create/remove, multi-run storage) and update the feature docs.
88 lines
5.8 KiB
Markdown
88 lines
5.8 KiB
Markdown
---
|
|
hide:
|
|
- toc
|
|
---
|
|
|
|
# OpenCode Manager
|
|
|
|
Mobile-first web interface for [OpenCode](https://opencode.ai) AI agents. Manage, control, and code from any device - your phone, tablet, or desktop.
|
|
|
|
<p align="center">
|
|
<img src="images/ocmgr-main.webp" alt="OpenCode Manager" class="hero hero-desktop" style="border: none" />
|
|
<img src="images/ocmgr-mobile.webp" alt="Mobile view" class="hero hero-mobile" />
|
|
<img src="images/mobile-repo-session-sheet.webp" alt="Mobile repository and session switcher" class="hero hero-mobile" />
|
|
</p>
|
|
|
|
!!! warning "Requires OpenCode 2"
|
|
OpenCode Manager requires **OpenCode 2.x at 2.0.15 or newer** (bundled 2.0.15); OpenCode 1.x is not supported. Upgrading from 1.x? See the [v1 → v2 migration guide](https://opencode.ai/v2/docs/migrate-v1).
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
git clone https://github.com/chriswritescode-dev/opencode-manager.git
|
|
cd opencode-manager
|
|
cp .env.example .env
|
|
echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
|
|
docker-compose up -d
|
|
```
|
|
|
|
Open [http://localhost:5003](http://localhost:5003) and create your admin account. That's it!
|
|
|
|
## What is OpenCode Manager?
|
|
|
|
OpenCode Manager is a mobile-first web interface for [OpenCode](https://opencode.ai) AI agents. It combines repository management, chat/session control, Git and file tools, schedules, AI configuration, MCP server management, push notifications, and full PWA support into a single responsive application.
|
|
|
|
- **Repository management** — Clone, discover, and manage multiple Git repos with SSH authentication and worktree support
|
|
- **Chat & sessions** — Real-time SSE streaming with slash commands, `@file` mentions, Plan/Build modes, and per-agent model selection
|
|
- **Schedules** — Recurring repo jobs with reusable prompts, run history, and linked sessions
|
|
- **AI configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents
|
|
- **MCP & Skills** — MCP server management and skill support
|
|
- **Audio** — Text-to-speech and speech-to-text (browser + OpenAI-compatible)
|
|
- **Mobile & notifications** — Installable PWA with push notifications and mobile-first navigation
|
|
|
|
## How It Works
|
|
|
|
OpenCode Manager runs as a pnpm workspace:
|
|
|
|
- The Bun/Hono backend initializes SQLite, Better Auth, settings, schedules, notifications, and an OpenCode client.
|
|
- A supervised OpenCode server handles agent sessions while the backend proxies API calls and streams events over SSE.
|
|
- The React/Vite frontend uses React Router and TanStack Query to render repositories, sessions, schedules, settings, and mobile navigation.
|
|
- The shared package keeps config, schemas, and TypeScript types aligned between backend and frontend.
|
|
- The `ocm-cli/` package provides the `ocm` CLI that attaches a local OpenCode TUI to a Manager-hosted repo.
|
|
|
|
## Key Features
|
|
|
|
- **Repositories & Git** — Multi-repo management, local discovery, SSH auth, worktrees, unified diffs, branch/commit management — [Learn more](features/git.md)
|
|
- **Chat & Sessions** — Real-time SSE streaming, slash commands, `@file` mentions, Plan/Build modes, Mermaid diagrams — [Learn more](features/chat.md)
|
|
- **Files** — Directory browser with tree view, syntax highlighting, create/rename/delete, ZIP download — [Learn more](features/files.md)
|
|
- **Schedules** — Recurring repo jobs with reusable prompts, run history, linked sessions — [Learn more](features/schedules.md)
|
|
- **Session Pinning** — Pin important sessions to the top of the session list — [Learn more](features/session-pins.md)
|
|
- **Assistant Mode** — Dedicated AI workspace with auto-provisioned skills for schedule management, notifications, settings, repo listing, and session management — [Learn more](features/assistant-mode.md)
|
|
- **AI Configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents — [Learn more](features/ai-config.md)
|
|
- **Server Health & Restart** — Monitor server status, graceful restarts with session resume, auto-recovery — [Learn more](features/server-health.md)
|
|
- **Manager Logs** — Manager log lines plus captured OpenCode server stdout/stderr in Settings, with level/source filters, search, and pause/copy controls — [Learn more](features/logs.md)
|
|
- **MCP Servers** — Add local or remote MCP servers with OAuth support — [Learn more](features/mcp.md)
|
|
- **Skills** — Skill support for extended agent capabilities — [Learn more](features/skills.md)
|
|
- **Mobile & PWA** — Responsive UI, installable on any device, iOS-optimized — [Learn more](features/mobile.md)
|
|
- **Push Notifications** — Background alerts for agent events — [Learn more](features/notifications.md)
|
|
- **Audio** — Text-to-speech and speech-to-text (browser + OpenAI-compatible) — [Learn more](features/tts.md) | [Learn more](features/stt.md)
|
|
|
|
## Project Layout
|
|
|
|
- `backend/` — Bun + Hono API routes, services, database migrations, auth, schedules, and OpenCode integration.
|
|
- `frontend/` — React + Vite app, pages, components, hooks, API clients, stores, contexts, and PWA assets.
|
|
- `shared/` — Workspace package for schemas, types, config, and utilities.
|
|
- `ocm-cli/` — `ocm` CLI that attaches a local OpenCode TUI to a Manager-hosted repo.
|
|
- `docs/` — MkDocs Material documentation.
|
|
- `scripts/`, `Dockerfile`, `docker-compose.yml` — Setup, build, and deployment support.
|
|
|
|
## Next Steps
|
|
|
|
- [Installation Guide](getting-started/installation.md) - Detailed setup instructions
|
|
- [Quick Start](getting-started/quickstart.md) - Get up and running fast
|
|
- [Development Setup](development/setup.md) - Local environment, scripts, and testing
|
|
- [Contributing](development/contributing.md) - How to contribute to OpenCode Manager
|
|
- [Features Overview](features/overview.md) - Explore all features
|
|
- [Schedules & Recurring Jobs](features/schedules.md) - Automate recurring repo reviews and follow-ups
|
|
- [Configuration](configuration/environment.md) - Environment variables and setup
|