Fix documentation drift and phone layouts

- Correct stale UI labels, flows, endpoints, and env var docs across the docs site
- Refresh git and chat screenshots and drop unused images
- Fit source control tabs and commit rows on phone widths; fix terminal filler color
This commit is contained in:
Chris Scott committed 2026-10-04 11:32:53 -04:00
1 parent d767fa2c93
commit 03500affe8
58 files changed
+254 -188

No files matched your search

+20 -17
View File
@@ -70,7 +70,7 @@ docker compose up -d --force-recreate app
### AUTH_SECRET
Required for production. Encrypts session data.
Required for production. Signs session cookies, so changing it signs every user out.
Generate:
```bash
@@ -84,7 +84,7 @@ AUTH_SECRET=your-generated-secret
### Session Duration
Sessions expire after 7 days. A new session is created on each login.
Sessions last 7 days and slide: once a session is more than a day old, the next request extends it by another 7 days, so an active session does not expire. A new session is created on each login.
### Secure Cookies
@@ -105,13 +105,16 @@ AUTH_SECURE_COOKIES=false
For accessing via IP on a local network:
```bash
# Include all access URLs (both frontend and backend)
AUTH_TRUSTED_ORIGINS=http://localhost:5173,http://localhost:5003,http://192.168.1.244:5003
# Include every URL you open the Manager from
AUTH_TRUSTED_ORIGINS=http://localhost:5003,http://192.168.1.244:5003
# Disable secure cookies for HTTP
AUTH_SECURE_COOKIES=false
```
!!! note "Origin order"
The first entry in `AUTH_TRUSTED_ORIGINS` is the Manager's auth base URL, which OAuth providers redirect back to. Put the URL you sign in from first. For `pnpm dev`, that is `http://localhost:5173`.
### Production (HTTPS)
For production with HTTPS:
@@ -134,34 +137,34 @@ Passwordless authentication using WebAuthn.
Configure your domain:
```bash
# Local development (use backend port)
# Docker or a production build on this machine
PASSKEY_RP_ID=localhost
PASSKEY_RP_NAME=OpenCode Manager
PASSKEY_ORIGIN=http://localhost:5003
# Local development with pnpm dev (the page is served by Vite)
PASSKEY_RP_ID=localhost
PASSKEY_RP_NAME=OpenCode Manager
PASSKEY_ORIGIN=http://localhost:5173
# Production
PASSKEY_RP_ID=yourdomain.com
PASSKEY_RP_NAME=OpenCode Manager
PASSKEY_ORIGIN=https://yourdomain.com
# Local network access
PASSKEY_RP_ID=localhost
PASSKEY_RP_NAME=OpenCode Manager
PASSKEY_ORIGIN=http://192.168.1.244:5003
```
!!! note "Port Selection"
- Use the **backend** port (5003) for PASSKEY_ORIGIN
- Not the frontend port (5173)
- The origin must match where the auth API is served
!!! note "Origin selection"
- `PASSKEY_ORIGIN` must be the origin of the page you sign in from, which is the URL in the browser's address bar
- `PASSKEY_RP_ID` must be that page's hostname or a parent domain of it
- Browsers only offer passkeys on HTTPS or `localhost`, so plain-HTTP access by LAN IP cannot use passkeys. For LAN or remote access, serve the Manager over HTTPS on a domain (for example, through a [Cloudflare Tunnel](cloudflare-tunnel.md)) and use that domain
### Adding a Passkey
1. Log in with password
2. Go to **Settings > Account**
3. Click **Add Passkey**
4. Follow browser/device prompts
5. Name your passkey
3. Optionally enter a passkey name
4. Click **Add Passkey**
5. Follow browser/device prompts
### Supported Authenticators
+1 -1
View File
@@ -155,7 +155,7 @@ With `AUTH_SECURE_COOKIES=true` you also cannot sign in over plain HTTP, because
| Symptom | Cause | Fix |
|---------|-------|-----|
| Preview stays blank or cannot connect | `PREVIEW_PUBLIC_URL` is not set, so the panel uses port 5004 on the Manager hostname | Set `PREVIEW_PUBLIC_URL` and restart the Manager |
| **Preview session is invalid or expired.** inside the panel | The browser blocked the preview cookie: the hostnames are on different domains, or the Manager was opened by its LAN address | Put both hostnames on the same domain and open the Manager through the tunnel, or use **Open in new tab** |
| **Preview session expired. Reopen it from OpenCode Manager.** inside the panel right after selecting a port | The browser blocked the preview cookie: the hostnames are on different domains, or the Manager was opened by its LAN address | Put both hostnames on the same domain and open the Manager through the tunnel, or use **Open in new tab** |
| **Preview must run on a different origin than OpenCode Manager.** | `PREVIEW_PUBLIC_URL` points at the Manager's own hostname | Use a separate hostname for the preview |
| Old file contents, or another project's files | Cloudflare cached the files | Add the [cache rule](#3-turn-off-caching-for-the-preview-hostname), then purge the cache under **Caching > Configuration** |
| Live reload does not work, or the Terminal does not connect | WebSockets are off | Turn on [WebSockets](#4-check-websockets) |
+7 -1
View File
@@ -472,7 +472,13 @@ docker-compose build
# Rebuild without cache
docker-compose build --no-cache
# Update and restart (uses upgrade script)
# Update and restart (run from the repo root)
./scripts/docker-upgrade.sh # cached rebuild, pulls first (~1-2 min)
./scripts/docker-upgrade.sh --tools # cached rebuild with a fresh uv/opencode install (~17 min)
./scripts/docker-upgrade.sh --full # full --no-cache rebuild (~25 min)
# Add --no-pull to skip `git pull`, or --logs to follow logs after starting.
# Or manually (equivalent to --full):
docker-compose down
git pull
docker-compose build --no-cache
+8 -1
View File
@@ -96,6 +96,7 @@ The preview gateway serves dev servers through an authenticated, separate origin
| Variable | Description | Default |
|----------|-------------|---------|
| `WORKSPACE_PATH` | Path to workspace directory | `./workspace` (Docker: `/workspace`) |
| `REPO_BROWSE_ROOT` | Root directory the folder browser may browse. When unset, folder browsing is disabled | empty (disabled) |
## OpenCode Server
@@ -107,6 +108,7 @@ The preview gateway serves dev servers through an authenticated, separate origin
| `OPENCODE_HEALTH_POLL_MS` | OpenCode health watcher poll interval | `30000` |
| `OPENCODE_HEALTH_FAILURE_THRESHOLD` | Failed health checks before recovery starts | `2` |
| `OPENCODE_SERVER_PASSWORD` | Basic Auth password for the managed OpenCode server. OpenCode 2 always requires one: when unset, OpenCode Manager generates and persists a password (override it any time via Settings → OpenCode → Server Auth). DB-stored passwords override this env var. The default `docker-compose.yml` does not forward this variable from `.env`; add it to the compose `environment:` block or set it via Settings → OpenCode → Server Auth. | auto-generated |
| `OPENCODE_BIN` | Path to an externally managed OpenCode binary. Overrides binary discovery; while set, in-app upgrade and version install are disabled (HTTP 409) | - |
> **Upgrade note:** `OPENCODE_PUBLIC_URL` is no longer used. MCP OAuth redirects now point at the Manager's `/api/mcp-oauth-proxy/callback`, built from the request: the scheme comes from `X-Forwarded-Proto` (first value, `http` or `https` only), then the `Origin` header, then `http`; the host comes from `X-Forwarded-Host` when present, otherwise `Host`. Behind a reverse proxy, forward `X-Forwarded-Proto` and `X-Forwarded-Host` (or preserve `Host`) and remove `OPENCODE_PUBLIC_URL`; the Manager logs a warning at startup while it is still set.
@@ -125,6 +127,11 @@ Sandboxed agent commands run inside a microVM managed by `msb` (see [Agent Sandb
|----------|-------------|---------|
| `MSB_PATH` | Path to the `msb` executable | `msb` |
| `MSB_LIBKRUNFW_PATH` | Path to the `libkrunfw` firmware library used by `msb` (set in the container image) | `/opt/microsandbox/lib/libkrunfw.so` |
| `MSB_BACKEND` | Backend the microsandbox client uses | `local` |
| `MSB_HOME` | Microsandbox home directory for state | `~/.microsandbox` |
| `MSB_PROFILE` | Microsandbox profile passed through to the client | - |
| `MSB_API_URL` | Microsandbox API URL passed through to the client | - |
| `MSB_API_KEY` | Microsandbox API key passed through to the client | - |
| `SANDBOX_IMAGE` | OCI image the microVM boots from. Digest-pinned by default so a rebuilt guest image is actually adopted; see [Sandbox Guest Image](../features/sandboxing.md#sandbox-guest-image) for what the default ships and how to build your own | `docker.io/cstechdev/ocm-sandbox@sha256:9df035cf…` |
| `SANDBOX_MEMORY` | MicroVM memory (e.g. `4G`) | `4G` |
| `SANDBOX_CPUS` | MicroVM CPU count | `2` |
@@ -164,7 +171,7 @@ Sandboxed agent commands run inside a microVM managed by `msb` (see [Agent Sandb
# Server
PORT=5003
HOST=0.0.0.0
NODE_ENV=development
NODE_ENV=production
# Required for production
AUTH_SECRET=generate-with-openssl-rand-base64-32
+6 -3
View File
@@ -10,6 +10,9 @@ Configure social login with OAuth providers.
| Google | Social login |
| Discord | Social login |
!!! note "Callback base URL"
Callback URLs are built from the **first** entry in `AUTH_TRUSTED_ORIGINS`. The `localhost:5003` examples below match the Docker default. With `pnpm dev`, the default first origin is `http://localhost:5173`, so register `http://localhost:5173/api/auth/callback/<provider>` instead.
## GitHub OAuth
### Create OAuth App
@@ -96,20 +99,20 @@ Once configured:
1. Go to the login page
2. Click the provider button (GitHub, Google, Discord)
3. Authorize in the popup
3. Authorize on the provider's page (the browser redirects there and back)
4. You're logged in
### First OAuth Login
On first OAuth login:
- Account is created automatically
- An account is created automatically, unless a preconfigured admin (`ADMIN_EMAIL` and `ADMIN_PASSWORD`) is set; then sign-up is disabled and an OAuth login without an existing account is rejected
- Email from provider is used
- No password is set (OAuth-only)
### Linking Accounts
If you have an existing password account, logging in with an OAuth provider that uses the same email will link the accounts automatically.
If you have an existing account, logging in with an OAuth provider that uses the same email links the accounts automatically, as long as the provider reports that email as verified. Otherwise the login fails with an "account not linked" error.
## Production Considerations
+1 -1
View File
@@ -86,7 +86,7 @@ pnpm test # Run CLI, backend, and frontend tests
```bash
cd backend
bun --watch-path src --watch src/index.ts # Start with hot reload
pnpm test # Run tests (uses Vitest)
pnpm test # Run bun tests, then Vitest with coverage
vitest <file> # Run single test file
vitest --ui # Test UI
vitest --coverage # Coverage report
+17 -15
View File
@@ -14,7 +14,7 @@ A compact model switcher is embedded directly in the chat interface. Click the *
| **Favorites** | Pinned models always appear first in the list. |
| **Recents** | Last 10 used models appear below favorites (excluding the active one and any favorites). |
| **Variants** | Some models offer tier options (e.g., fast or pro). Variant items are highlighted and show a checkmark on the active selection. |
| **All Models…** | Opens the full model browser when you need a model not in recents or favorites. |
| **More models** | Opens the full model browser when you need a model not in recents or favorites. |
Favorites, recents, and variant choices are stored in OpenCode's own state file (`.opencode/state/opencode/model.json` in the workspace), so they are shared with the OpenCode TUI and survive Manager restarts. The active model itself is not persisted: on page load it resolves the same way the OpenCode TUI does — the `model` set in `opencode.json`, otherwise your most recent valid model, otherwise the provider default. A model you pick during a session stays active until the page is reloaded.
@@ -26,7 +26,7 @@ Each agent can declare its own `model` in `opencode.json`, which becomes that ag
To browse all available models:
1. Click **All Models…** in the quick-select popover
1. Click **More models** in the quick-select popover
2. Filter by provider or search by name
3. Click a model to select it
@@ -52,12 +52,11 @@ Configure API keys or OAuth for AI providers.
For providers that support OAuth (Anthropic, GitHub Copilot):
1. Go to **Settings > Providers**
2. Select a provider with the OAuth badge
3. Click **Add OAuth**
4. Choose authorization method:
- **Open Authorization Page** - Opens browser for sign-in
- **Use Authorization Code** - Provides code for manual entry
5. Complete the authorization flow
2. Under **OAuth Providers**, click **Connect** (or **Reconnect**) on the provider
3. In the **Connect to <provider>** dialog, choose an authentication method
4. Complete the flow:
- Browser-based methods open the provider's sign-in page
- Code-based methods show an **Authorization Code** field; paste the code and click **Complete Authentication**
### Testing Credentials
@@ -75,14 +74,14 @@ Create specialized AI agents with custom configurations.
### Creating an Agent
1. Go to **Settings > Agents**
2. Click **Create Agent**
1. Go to **Settings → OpenCode Config → Agents**
2. Click **Add Agent**
3. Configure:
- **Name** - Display name for the agent
- **Description** - What this agent does
- **System Prompt** - Instructions for the AI
- **Default Model** - Model to use
- **Allowed Tools** - Which MCP tools it can access
- **Tools Configuration** - Toggle the built-in Write, Edit, Bash, and Web Fetch tools
4. Click **Save**
@@ -104,11 +103,14 @@ Be concise but thorough. Prioritize issues by severity.
### Tool Permissions
Control which MCP tools an agent can use:
The **Tools Configuration** section toggles each built-in tool on or off:
- **All Tools** - Access to everything
- **Selected Tools** - Only specific tools
- **No Tools** - Pure conversation, no tool access
- **Write** - Create and modify files
- **Edit** - Edit existing files
- **Bash** - Run shell commands
- **Web Fetch** - Fetch content from the web
The **Permissions** section sets each of **Edit**, **Bash**, and **Web Fetch** to **Ask**, **Allow**, or **Deny**.
This is useful for:
+1 -1
View File
@@ -17,7 +17,7 @@ The token has two in-product consumers, neither of which is an agent:
| Consumer | How it obtains the token |
|----------|--------------------------|
| Generated plugins (`ocm-manager.js`, `ocm-sandbox.js`, `ocm-gh-env.js`) | The `OCM_INTERNAL_TOKEN` environment variable, injected into the OpenCode child process |
| External clients such as the `ocm` CLI | Settings -> Manager Token, served by `GET /api/settings/manager-token` |
| External clients such as the `ocm` CLI | Settings → OpenCode Config → Server maintenance → Manager Internal Token, served by `GET /api/settings/manager-token` |
The generated plugins are OpenCode 2 plugin modules — plain, dependency-free objects that default-export `{ id, setup }` and register their hooks and tools through the `setup` context. The Manager writes them to `<config home>/opencode/plugins/`; the legacy `opencode/plugin/` files are removed on install.
+5 -17
View File
@@ -38,24 +38,16 @@ When the assistant self-edits its agent definition (e.g., to refine behavior or
## Getting Started
1. Click **Assistant** in the sidebar or mobile tab bar
2. On first visit, OpenCode Manager initializes the workspace and creates a new session
3. A welcome prompt is automatically sent to orient the agent
4. Subsequent visits resume the most recent session
2. The page opens the Assistant session list
3. Click **New Session** to start a session with the built-in assistant
![Assistant Page](../images/assistant-page.png)
No manual setup is required. The workspace directory and all managed files are created automatically.
No manual setup is required. The workspace directory and all managed files are created automatically when the Manager starts.
## Session Views
The assistant page works in two modes:
| Mode | URL | What you see |
|------|-----|-------------|
| Redirect | `/assistant` | Instantly redirects to the last session or creates one |
| Session list | `/assistant?view=sessions` | Full session history with sidebar panels |
The session list exposes the same management panels as regular repos — file browser, MCP servers, skills, source control, and permissions reset.
The Assistant page (`/assistant`) shows the Assistant session list. Selecting a session opens it; **New Session** starts a new one. The page exposes the same management panels as regular repos — file browser, MCP servers, skills, source control, and permissions reset.
## Workspace Initialization
@@ -67,8 +59,4 @@ If a managed file was modified after initialization, the next session will recei
### Re-initializing
To re-apply all managed files to their latest defaults:
1. Navigate to the session list (`?view=sessions`)
2. Open the **Permissions** panel
3. Use the reset action to re-initialize the workspace
The workspace is re-applied to its latest defaults automatically when the Manager starts; managed files are only rewritten when their content changed. To clear the Assistant workspace's saved "Allow Always" permissions, open the **Reset Permissions** dialog from the Assistant sidebar (desktop) or the **More** drawer (mobile) and confirm.
+13 -13
View File
@@ -26,7 +26,7 @@ Shell rows can show live output and be killed; subagent rows open the child sess
## Model Selection
Click the **model name** in the chat prompt area to open the quick model switcher, where you can switch models, mark favorites, and pick variants without leaving the chat. Each agent keeps its own model selection. See [AI Configuration](ai-config.md#model-selection) for the full reference.
Click the **model name** in the chat prompt area to open the quick model switcher, where you can switch models, mark favorites, and pick variants without leaving the chat. Switching agents applies that agent's configured model. See [AI Configuration](ai-config.md#model-selection) for the full reference.
## Slash Commands
@@ -36,7 +36,7 @@ The fork keyboard shortcut opens the same message picker as `/fork`.
### Custom Commands
Create your own commands in **Settings > Custom Commands**:
Create your own commands in **Settings → OpenCode Config → Commands**:
```yaml
name: review
@@ -92,7 +92,7 @@ Toggle between two operational modes:
- AI can delete files
- Use for implementation tasks
Toggle modes using the mode selector in the chat header.
Toggle modes using the mode selector in the composer toolbar.
## Permission modes
@@ -176,11 +176,10 @@ Access your sessions from the sidebar:
### Searching Sessions
Find sessions by content:
Find sessions by title:
1. Click the search icon in the sessions panel
2. Type your search query
3. Results show sessions with matching content
1. Type in the always-visible **Search sessions...** box in the sessions panel
2. Results filter as you type
### Pinning Sessions
@@ -190,17 +189,17 @@ Pin important sessions to the top of the list. See [Session Pinning](session-pin
Remove sessions you no longer need:
1. Hover over a session
2. Click the delete icon
1. Swipe a session left to reveal the delete button, then tap it
2. Or click the **Manage sessions** icon and use the trash button on a session
3. Confirm deletion
### Bulk Delete
Remove multiple sessions at once:
1. Click **Select** in the sessions panel
2. Check sessions to delete
3. Click **Delete Selected**
1. Click the **Manage sessions** icon in the sessions panel
2. Check the sessions to delete
3. Click **Delete**
4. Confirm deletion
## Context Management
@@ -227,7 +226,8 @@ Use `/new` to start a new session when:
| Shortcut | Action |
|----------|--------|
| `↑` | Edit last message |
| `/` | Open command menu |
| `@` | Open file mention menu |
| `Escape` | Close autocomplete menus |
To edit a message, use the edit action on the last user message while the session is idle.
+12 -13
View File
@@ -11,7 +11,6 @@ The file browser displays your repository as an expandable tree:
- Click folders to expand/collapse
- Click files to preview content
- Icons indicate file types
- Modified files are highlighted
![File Browser](../images/file-browser.png)
@@ -26,16 +25,14 @@ Navigate quickly using the breadcrumb path at the top:
Filter files by name:
1. Click the search icon or press `/`
2. Type to filter visible files
3. Results update as you type
4. Press `Escape` to clear search
1. Type in the always-visible **Search** box
2. Results update as you type
## File Preview
Click any file to preview with:
- **Syntax Highlighting** - Support for 100+ languages
- **Syntax Highlighting** - Support for common languages
- **Line Numbers** - Easy reference for code discussions
- **Large File Support** - Virtualization for files with many lines
@@ -45,7 +42,7 @@ Syntax highlighting is provided for common languages including:
- JavaScript, TypeScript, JSX, TSX
- Python, Ruby, Go, Rust
- HTML, CSS, SCSS, Sass
- HTML, CSS, SCSS
- JSON, YAML, TOML, XML
- Markdown, SQL, Shell scripts
- And many more...
@@ -54,15 +51,17 @@ Syntax highlighting is provided for common languages including:
### Create File
1. Click the **New File** button in the file browser toolbar
2. Enter filename with extension
3. File is created and opened for editing
1. Click the **+** button in the file browser toolbar
2. In the **Create New** dialog, choose **File**
3. Enter a filename with extension
4. Click **Create**; the list refreshes with the new file
### Create Folder
1. Click the **New Folder** button in the file browser toolbar
2. Enter folder name
3. Folder is created in current directory
1. Click the **+** button in the file browser toolbar
2. In the **Create New** dialog, choose **Folder**
3. Enter a folder name
4. Click **Create**; the folder is created in the current directory
### Rename
+5 -5
View File
@@ -6,18 +6,18 @@ Comprehensive git integration for managing repositories and source control.
Clone any git repository:
1. Click the **Repositories** button in the sidebar
2. Click **Clone Repository**
1. Click the **Repos** button in the sidebar
2. Click **Add Repository**
3. Paste the repository URL
4. Click **Clone**
4. Click **Add Repository**
## Discovering Existing Repositories
Import repositories you already have on disk without recloning them:
1. Click the **Repositories** button in the sidebar
1. Click the **Repos** button in the sidebar
2. Click **Add Repository**
3. Select **Folder Discovery**
3. Select **Folder**
4. Enter a parent folder such as `/Users/you/Development`
5. Click **Discover Repositories**
+1 -1
View File
@@ -26,7 +26,7 @@ Each entry shows a timestamp, severity level, source, and message:
- **Copy** — Copy the currently visible (filtered and searched) entries to the clipboard.
- **Follow scrolling** — The view scrolls to the newest entry automatically. Scrolling up pauses following; scrolling back to the bottom resumes it.
If entries were evicted before you opened the tab, a notice above the view reports how many earlier entries were dropped.
When the buffer has evicted entries, a notice below the view reports how many earlier entries have been dropped since the Manager started.
## OpenCode Server Issues
+7 -7
View File
@@ -18,7 +18,7 @@ Local servers run as processes on your machine:
1. Open a repository and click **MCP** in the sidebar
2. Click **Add Server**
3. Select **Local**
3. Select **Local (Command)**
4. Configure:
![MCP Servers List](../images/mcp-servers-list.png)
@@ -51,9 +51,9 @@ Local servers run as processes on your machine:
Remote servers are accessed over HTTP/SSE:
1. Go to **Settings > MCP Servers**
1. Go to **Settings → OpenCode Config → MCP Servers**
2. Click **Add Server**
3. Select **Remote**
3. Select **Remote (HTTP)**
4. Configure:
```json
@@ -179,7 +179,7 @@ Web search capabilities:
Toggle servers on/off:
1. Go to **Settings > MCP Servers**
1. Go to **Settings → OpenCode Config → MCP Servers**
2. Find the server
3. Click the toggle switch
@@ -189,12 +189,12 @@ Disabled servers won't be started or connected.
Remove a server:
1. Click the **Delete** button
1. Click the **Delete Server** action
2. Confirm deletion
### Refresh Status
Use the refresh button in **Settings > MCP Servers** to reload the current connection status after changing a server outside the UI or completing OAuth.
Use the refresh button in **Settings → OpenCode Config → MCP Servers** to reload the current connection status after changing a server outside the UI or completing OAuth.
### Configuration Shape
@@ -209,9 +209,9 @@ Monitor server health:
| Status | Description |
|--------|-------------|
| Connected | Server is active and connected |
| Connecting | Connection is pending |
| Disabled | Server is configured but disabled |
| Auth Required | Remote server needs OAuth authentication |
| Registration Required | Remote server needs OAuth client registration |
| Failed | Server failed to start or connect |
## Tool Permissions
+15 -14
View File
@@ -94,11 +94,12 @@ Use **Shift+Enter** for new lines.
### Keyboard Shortcuts
Mobile keyboards have limited shortcut support. Use the toolbar buttons instead:
Mobile keyboards have limited shortcut support. Type directly in the composer:
- Mention files with the **@** button
- Access commands with the **/** button
- Toggle modes with the mode selector
- Type **@** to mention files
- Type **/** to access commands
- Toggle Plan/Build modes with the mode selector
- Use the composer **+** menu to accept all permissions, arm goal mode, or attach an image or PDF
## Swipe Navigation
@@ -106,15 +107,15 @@ Navigate with gestures:
### Swipe Right
Swipe from the left edge to go back:
Swipe from the left edge to go back to the previous view, wherever a back target exists.
- Opens the sidebar
- Returns to previous view
- Works throughout the app
### Swipe Left
On a session route, swipe from the right edge to open the More drawer.
### Swipe Requirements
- Start from the left edge (first 30px)
- Start from the left edge (first 30px) to go back
- Swipe at least 80px right
## Touch Optimizations
@@ -123,11 +124,11 @@ Swipe from the left edge to go back:
All interactive elements have minimum 44x44px touch targets for easy tapping.
### Long Press
### Row Actions
Long press for context menus:
Per-item actions are available without a context menu:
- Files: Rename, delete, copy path
- Messages: Copy, delete, regenerate
- Sessions: Rename, delete
- Files: open the **⋯** menu on a row for download, rename, and delete
- Messages: use the **copy** button on a message block
- Sessions: swipe a session left to reveal **delete**, or use manage mode to delete several
+2 -2
View File
@@ -10,7 +10,7 @@ Open a repository and click **Multi-run** in the header, next to **New Session**
2. Enter the **Prompt** to send to every model.
3. Select up to **five models** from the checkbox list, grouped by provider.
4. Leave **Isolate runs** on to give each model its own workspace.
5. Optionally set **Start from** to a branch or ref. Empty starts from the current HEAD.
5. With **Isolate runs** on, optionally change **Start from**: a local or `origin` branch. It defaults to the repository's current branch.
Click **Launch**. Each selected model gets its own session, and the same prompt is sent to all of them. Models are checked before any workspace is created, so a model that is not available fails its entry without creating a workspace while the other models still launch. Launching is parallel, and one model failing does not stop the others: the failed entry records its error while the rest keep running.
@@ -20,7 +20,7 @@ With **Isolate runs** on, each run is created in its own OpenCode workspace: a d
## Runs
The **Runs** tab lists each group and its entries. Every entry shows the model, its status, and for a started run the live session status indicator. From here you can:
The **Runs** tab lists the 20 most recent groups and their entries. Every entry shows the model, its status, and for a started run the live session status indicator. From here you can:
- **Open** a run to view its session and compare the result.
- **Discard** a run after confirmation. Discarding an isolated run also removes its workspace directory from the Workspaces tab; if that workspace was already removed, for example from the Workspaces tab, discarding still succeeds. A non-isolated run keeps its session in the repository.
+7 -8
View File
@@ -100,13 +100,12 @@ VAPID_SUBJECT=mailto:you@yourdomain.com
Navigate to **Settings** → **Notifications** to see all registered devices:
- Device name (if provided)
- Subscription date
- Last used timestamp
- Device name, or a truncated endpoint when the device has no name
- One relative timestamp: when it was last used, or when it was added if it has never been used
### Remove a Device
Click **Unsubscribe** next to a device to remove it from receiving notifications.
Click the **trash** icon next to a device to remove it from receiving notifications.
### Test Notifications
@@ -118,8 +117,8 @@ Control which events trigger notifications:
**Notification Settings:**
- **Enable Push Notifications** - Master toggle (default: off)
- **Permission Requested** - Get notified when agent needs permission (default: on)
- **Question Asked** - Get notified when agent has a question (default: on)
- **Session Error** - Get notified on session errors (default: on)
- **Session Complete** - Get notified when session finishes (default: off)
- **Permission requests** - Get notified when agent needs permission (default: on)
- **Agent questions** - Get notified when agent has a question (default: on)
- **Session errors** - Get notified on session errors (default: on)
- **Session completion** - Get notified when session finishes (default: off)
- **Goal outcomes** - Get notified when a session goal completes, is blocked, stops, or pauses (default: on)
+24 -4
View File
@@ -20,7 +20,7 @@ OpenCode Manager provides a comprehensive web interface for managing OpenCode AI
### File Management
- **Directory Browser** - Navigate files with tree view and search
- **Syntax Highlighting** - Code preview with highlighting for 100+ languages
- **Syntax Highlighting** - Code preview with highlighting for common languages
- **File Operations** - Create, rename, delete, and drag-and-drop upload
- **ZIP Download** - Download repos as ZIP (respects .gitignore)
@@ -43,7 +43,7 @@ OpenCode Manager provides a comprehensive web interface for managing OpenCode AI
- **Permission Modes** — Ask every time or Accept everything, per session, with a default for new sessions
- **Session Goals** — Keep a session working toward an objective until an auditor model says it is done or blocked
- **Multi-run** — Run one prompt across up to five models at once, optionally each in its own workspace
- **Per-Agent Model Selection** — Each agent retains its own model selection independently
- **Agent Model Selection** — Switching agents applies that agent's configured model
- **Session Pinning** — Pin important sessions to a dedicated section at the top of the session list
- **Mermaid Diagrams** - Visual diagram rendering in chat
@@ -72,11 +72,31 @@ OpenCode Manager provides a comprehensive web interface for managing OpenCode AI
- **Local Servers** - Add command-based MCP servers
- **Remote Servers** - Connect to HTTP-based MCP servers
- **Templates** - Pre-built configurations for common servers
- **Management** - Enable, disable, and configure servers
[Learn more →](mcp.md)
### Skills
- **Reusable Instructions** - `SKILL.md` instruction sets that give agents domain-specific workflows
- **Global and Project Scopes** - Share skills across all repositories or scope them to one repo
[Learn more →](skills.md)
### Agent Sandboxing
- **Isolated Shell Commands** - Run agent `shell` tool commands inside a microVM instead of the Manager container
- **Same Files, Separate Kernel** - Repositories are bind-mounted at the same paths, without access to Manager configuration, provider credentials, or SSH keys
[Learn more →](sandboxing.md)
### `ocm` CLI
- **Local TUI, Remote Repo** - Attach your local OpenCode TUI to a repo hosted on the Manager
- **Push and Pull** - Sync a local working tree with the Manager repo
[Learn more →](../ocm-cli.md)
### Text-to-Speech
- **Browser TTS** - Built-in Web Speech API support
@@ -130,7 +150,7 @@ Both pickers live under **Settings → General**.
### OpenCode Server Health
- **Live Status** — Server health indicator in Settings (Healthy/Unhealthy/Starting)
- **Live Status** — Server health indicator in Settings (Healthy/Unhealthy)
- **Graceful Restart** — Interrupted sessions resume natively after restart
- **Auto-Recovery** — Configurable health monitoring with automatic recovery on failure
- **Version Management** — View current versions and trigger OpenCode 2 upgrades from the UI
+3 -3
View File
@@ -6,7 +6,7 @@ The Preview panel lists the loopback ports that are currently listening, then pr
## Port List
Open **Preview** from the desktop sidebar tool list or the **More** drawer, including in the Assistant workspace. The port menu at the start of the toolbar lists every listening loopback port on the host as `:PORT command`, with the process's working directory underneath. Type in the menu to filter by port, command or directory. Working directories are read on Linux hosts (including the Docker image) and macOS; ports whose process runs inside the selected repository or workspace directory are grouped under **This repo** at the top, and the rest under **Other ports**. Other platforms list no ports.
Open **Preview** from the desktop sidebar tool list or the **More** drawer, including in the Assistant workspace. The port menu at the start of the toolbar lists every listening loopback port on the host as `:PORT command`, with the process's working directory underneath. Type in the menu to filter by port, command or directory. Working directories are read on Linux hosts (including the Docker image) and macOS; ports whose process runs inside the selected repository or workspace directory are grouped under **This repo** at the top, and the rest under **Other ports**. When no port belongs to the repository, the list is shown without group headings. Other platforms list no ports.
Until a port is selected, the panel body lists the dev servers of this repo so one click opens the preview, and counts the other listening ports. When nothing is listening, it points to the Terminal and Actions to start a dev server.
@@ -18,7 +18,7 @@ Selecting a port creates a preview session and renders the target in an iframe o
When preview is unavailable — `PREVIEW_PORT=0`, or the gateway could not listen on its port — the panel shows **Preview is unavailable**.
If the requested port is not listening yet, the panel shows **Waiting for port N…** and refetches the list every 2 seconds for up to 60 seconds, then shows an error with a **Retry** button.
If the requested port is not listening yet, the panel shows **Waiting for port N…** and refetches the list every 2 seconds. After 60 seconds it shows an error with a **Retry** button, but keeps polling, so the preview still opens if the port starts listening later.
## Gateway
@@ -54,7 +54,7 @@ A preview can be opened from more than one place:
- **Port** — the port menu described in [Port List](#port-list). Press Escape to close the menu without closing the panel.
- **Path** — enter a path and press **Go** (or Enter) to start a session for that path.
- **Reload** — remounts the iframe.
- **Reload** — creates a fresh preview session and remounts the iframe with it.
- **Open in new tab** — creates a fresh session and opens its start URL in a new tab with `noopener`. Start tokens are single-use, so this always mints a new one.
- **Viewport** — switch between Mobile (390 px), Tablet (820 px), and Full width. Hidden on small screens, where the panel is already phone-width.
+5 -5
View File
@@ -33,7 +33,7 @@ The `url` field accepts two placeholders:
| `{worktree}` | The basename of the current directory. |
| `{branch}` | The current git branch of the directory, from `git rev-parse --abbrev-ref HEAD`. |
For example, `http://localhost:5173/{worktree}` becomes `http://localhost:5173/feature-login` in a worktree named `feature-login`. If `{branch}` cannot be resolved (for example, a detached HEAD with no branch), the template is left unchanged.
For example, `http://localhost:5173/{worktree}` becomes `http://localhost:5173/feature-login` in a worktree named `feature-login`. On a detached HEAD, `{branch}` becomes `HEAD`. If the git command fails (for example, the directory is not a git checkout), the whole template is left unchanged, including `{worktree}`.
When the resolved URL is a local dev URL (`http://localhost:PORT`, `127.0.0.1`, `0.0.0.0`, or `[::1]`), it opens in the [Preview](preview.md) panel rather than a new browser tab.
@@ -71,7 +71,7 @@ Actions defined in the repository file never run until trusted (see [Trust](#tru
```
- `version` is required and must be `1`.
- `projectActions` and `setupWorktree` are optional. Up to 50 actions and 20 setup commands are allowed.
- `projectActions` and `setupWorktree` are optional. Up to 20 setup commands are allowed. Personal actions are limited to 50; the file itself has no action limit.
- An action `url` must start with `http://` or `https://`.
- A repository action whose `id` matches a personal action is not listed or run, and the dialog reports a warning, so personal actions always win. It is still part of the file's trusted content (see [Trust](#trust)).
- `.ocm` and `.ocm/project.json` must be regular files and directories. A symbolic link at either path is reported as an invalid file and is never written through.
@@ -83,7 +83,7 @@ Project actions are not available in the Assistant workspace.
The Project Actions dialog moves items between personal settings and the repository file from each row's **⋯** menu:
- **Move to repository** writes the item into `.ocm/project.json` and removes it from personal settings. Because the user authored it, the file is trusted automatically.
- **Move to repository** writes the item into `.ocm/project.json` and removes it from personal settings. Because the user authored it, the file is trusted automatically, unless it already holds untrusted actions or setup commands; in that case it stays untrusted until reviewed.
- **Move to my settings** removes the item from `.ocm/project.json` (deleting the file if it becomes empty) and stores it in personal settings.
Moves are transactional: if the file write or the settings update fails, the file is restored.
@@ -97,11 +97,11 @@ Commands in `.ocm/project.json` run on your machine, so the Manager does not run
- Trusting requires echoing the exact hash of the content shown, so a file cannot be swapped between review and trust.
- Untrusted repository commands never run — not from the header menu, and not as worktree setup commands.
- The dialog shows a banner above its tabs while the file is untrusted. **Review** lists the untrusted commands, and **Trust these commands** confirms. Attempting to run an untrusted action prompts for trust first.
- Moving an item into the file auto-trusts it, because the user authored it.
- Moving an item into the file auto-trusts it, because the user authored it, unless the file already holds untrusted actions or setup commands.
## Worktree Setup Commands
Setup commands run once after a new working directory is created — Manager worktrees and every OpenCode workspace, including workspaces created by multi-run and by agents through `ocm`. They run in a PTY with `set -e`, so the first failing command stops the rest.
Setup commands run once after a new working directory is created — Manager worktrees and OpenCode workspaces created through the Manager, including workspaces created by multi-run and by agents through `ocm`. Workspaces created directly in OpenCode do not run setup commands. They run in a PTY with `set -e`, so the first failing command stops the rest.
- `$ROOT_PROJECT_PATH` is available in the environment and points at the repository's main checkout.
- Personal setup commands always run. Repository setup commands are skipped while the file is untrusted; the skipped result is reported.
+11 -8
View File
@@ -18,7 +18,7 @@ The microVM sees repositories through bind mounts at the same paths used by the
| WebUI `!command` shell mode (`POST /api/session/:sessionID/shell`) | Yes; it spawns through the same `Shell.create` path as the `shell` tool, so it is planned and routed into the microVM. It is not badged in the UI because the surface fires no `tool.execute.after` hook |
| Shell API (`POST /api/shell`) | Yes; it spawns through the same `Shell.create` path as the `shell` tool. It is not badged in the UI because the surface fires no `tool.execute.after` hook |
| Slash-command shell templates (`` !`cmd` ``, `POST /api/session/:sessionID/command`) | No; OpenCode expands each interpolation itself with the configured shell, directly on the host and outside `Shell.create`, so the `create.before` hook never sees it |
| PTY terminals (`POST /api/pty`, `POST /api/pty/:ptyID/connect`), including the Manager Terminal panel and project action terminals | No; normal OpenCode behavior, with the user's configured shell. Manager terminals and project actions receive the repo-scoped GitHub token env through `CredentialProvider.getGhCliEnv` at creation; commits take their identity from git config |
| PTY terminals (`POST /api/pty`, `GET /api/pty/:ptyID/connect`), including the Manager Terminal panel and project action terminals | No; normal OpenCode behavior, with the user's configured shell. Manager terminals and project actions receive the repo-scoped GitHub token env through `CredentialProvider.getGhCliEnv` at creation; commits take their identity from git config |
| OpenCode file tools | No; while enforcement is on they are denied the global configuration directory (see [Mounts and Secrets](#mounts-and-secrets)) |
| Manager-side git operations | No |
| Plugins and custom tools | No; normal OpenCode behavior |
@@ -69,7 +69,7 @@ The overlay exposes `/dev/kvm`, `/dev/net/tun`, and `NET_ADMIN` without enabling
All projects share one microVM named `ocm-workspace`:
- It mounts the four project roots plus the OpenCode directories agents are handed absolute paths to, at identical guest paths. See [Mounts and Secrets](#mounts-and-secrets).
- It mounts the four project roots plus the OpenCode tool-output, global-skills, and agent temporary directories, at identical guest paths. See [Mounts and Secrets](#mounts-and-secrets).
- Repositories and worktrees created after boot are visible immediately because their parent roots are mounted.
- Each command supplies its own working directory through `msb exec -w`.
- A session outside the mounted roots is refused rather than executed on the host.
@@ -97,10 +97,13 @@ The microVM receives writable bind mounts for:
| `/workspace/.opencode/state/opencode/forge/worktrees` | Project root: worktrees created by the opencode-forge plugin for its loops |
| `/workspace/.opencode/state/opencode/tool-output` | Where OpenCode saves the full content of a truncated tool result before handing the agent that absolute path |
| `/workspace/.config/opencode/skills` | Global skills, including the scripts and reference files a skill bundles and refers to by absolute path |
| `/workspace/.opencode/tmp/opencode` | The temporary directory the `shell` tool description tells agents to use for work outside the workspace |
| `/workspace/.opencode/tmp/opencode` | The temporary directory OpenCode's environment instructions tell agents to prefer for work outside the workspace |
Each is mounted at the identical guest path. That is the point: OpenCode hands the model absolute host paths, and the host-side `read`, `write`, and `glob` tools resolve them against the container. A path that is not mounted resolves for those tools but not for a sandboxed `shell` call, which is how an agent ends up searching for a file it was just told the exact location of.
!!! warning "Known gap: shell output files"
OpenCode writes background and truncated `shell` output to files under `/workspace/.opencode/state/opencode/shell/` and tells the agent their paths. That directory is not mounted, so a sandboxed `shell` call cannot read them; the host-side `read` tool can.
Only the four project roots are accepted as working directories. The other three mounts are readable and writable but are never a valid working directory, so `shell` calls still have to run inside a repository or a worktree.
No internal API token exists anywhere under the mounted roots. The token lives in the Manager's database and reaches the generated plugins only through the `OCM_INTERNAL_TOKEN` environment variable of the Manager's own OpenCode process, which is never part of the guest environment.
@@ -109,7 +112,7 @@ Because `localhost` inside the microVM is the guest rather than the Manager, and
The microVM also mounts a runtime-owned tmpfs at `/tmp`. It is sized to one quarter of the microVM memory, clamped to 1-512 MiB, so agent commands get guest-only scratch space that is not backed by a host filesystem.
The agent temporary directory is separate from that tmpfs. The Manager sets `TMPDIR=/workspace/.opencode/tmp` on the OpenCode child, which puts OpenCode's own temporary directory at `/workspace/.opencode/tmp/opencode` — the path its `shell` tool description advertises — so the same files are visible to sandboxed commands and to the host-side file tools. Everything else under `TMPDIR` (temporary files from host-side `git`, `gh`, and MCP servers) stays out of the guest. The Manager empties the mounted directory each time it starts the OpenCode child, matching the lifetime it had in the container's `/tmp`; it clears the contents rather than the directory itself, because replacing the directory would detach a running microVM's bind mount.
The agent temporary directory is separate from that tmpfs. The Manager sets `TMPDIR=/workspace/.opencode/tmp` on the OpenCode child, which puts OpenCode's own temporary directory at `/workspace/.opencode/tmp/opencode` — the path its environment instructions advertise — so the same files are visible to sandboxed commands and to the host-side file tools. Everything else under `TMPDIR` (temporary files from host-side `git`, `gh`, and MCP servers) stays out of the guest. The Manager empties the mounted directory each time it starts the OpenCode child, matching the lifetime it had in the container's `/tmp`; it clears the contents rather than the directory itself, because replacing the directory would detach a running microVM's bind mount.
The following remain outside the microVM:
@@ -157,7 +160,7 @@ The enforcement stamp remains authoritative for the lifetime of the OpenCode chi
## Git Credentials in the Sandbox
The guest environment is empty by default, so a sandboxed `git push`, `git pull`, or `gh` call has no credentials and fails to authenticate. This applies to agent `shell` calls, WebUI `!command` shell mode, and the shell API alike, since all three are routed into the microVM.
By default the guest receives no credentials, so a sandboxed `git push`, `git pull`, or `gh` call fails to authenticate. The repo's git identity (`GIT_AUTHOR_*` / `GIT_COMMITTER_*`) is always forwarded, so `git commit` works either way. This applies to agent `shell` calls, WebUI `!command` shell mode, and the shell API alike, since all three are routed into the microVM.
Forwarding is opt-in, off by default:
@@ -170,7 +173,7 @@ When enabled, the planner resolves credentials on the host and the shim forwards
- One `http.<host>.extraheader` pair per configured host, so a command can authenticate against every host you have a credential for, not just the repo's own remote.
- Where several credentials share a host, the repo-bound credential wins, then `defaultGitCredentialId`. Exactly one credential is ever sent per host — git treats `http.<url>.extraheader` as multi-valued and would otherwise send competing `Authorization` headers.
- `GIT_AUTHOR_*` / `GIT_COMMITTER_*` so `git commit` has an identity, and `GH_TOKEN` / `GITHUB_TOKEN` for `gh`.
- `GH_TOKEN` / `GITHUB_TOKEN` for `gh`.
- At most 16 hosts. Beyond that the Manager logs a warning and forwards the first 16 rather than emitting a `GIT_CONFIG_COUNT` that git would reject.
Both the switch and the credentials themselves are resolved per command, so turning forwarding on or off, or changing a credential, takes effect on the next sandboxed command without restarting the OpenCode server. Only the sandbox enable toggle requires a restart.
@@ -179,7 +182,7 @@ Understand the trade-off before enabling it. `msb exec -e` is the only injection
## Sandbox Guest Image
`SANDBOX_IMAGE` defaults to a digest-pinned reference of `docker.io/cstechdev/ocm-sandbox`. The `Sandbox Image` workflow (`.github/workflows/sandbox-image.yml`) builds `Dockerfile.sandbox` natively: `linux/amd64` on `ubuntu-latest` and `linux/arm64` on `ubuntu-24.04-arm`. Pull requests from this repository that touch the Dockerfile or workflow run build-time verification without publishing or requiring registry credentials. A manual `workflow_dispatch` publishes both platforms by digest and merges them into one manifest list, tagged with the commit SHA, package version, and optional `tag` input (default `latest`). Publishing requires `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` repository secrets. The job summary prints the index digest to pin.
`SANDBOX_IMAGE` defaults to a digest-pinned reference of `docker.io/cstechdev/ocm-sandbox`. The `Sandbox Image` workflow (`.github/workflows/sandbox-image.yml`) builds `Dockerfile.sandbox` natively: `linux/amd64` on `ubuntu-latest` and `linux/arm64` on `ubuntu-24.04-arm`. Pull requests from this repository that touch the Dockerfile, the workflow, or `scripts/sandbox-dockerd-start.sh` run build-time verification without publishing or requiring registry credentials. A manual `workflow_dispatch` publishes both platforms by digest and merges them into one manifest list, tagged with the commit SHA, package version, and optional `tag` input (default `latest`). Publishing requires `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` repository secrets. The job summary prints the index digest to pin.
Native runners avoid the x86_64 `rustc` segmentation fault observed under qemu-user on the arm64 build host. Later uv releases also failed in that environment. Neither platform skips toolchain execution to work around emulation failures. A single-platform local build on an arm64 host is:
@@ -205,7 +208,7 @@ It is built from the same `node:24.21.0-trixie` tag as the Manager image (Debian
| `ping`, `ip`, `ss`, `netstat`, `dig`, `host`, `nslookup`, `nc`, `traceroute`, `lsof`, `rsync` | apt | The base image ships no network diagnostics at all. The image build fails if any of these is missing |
| `pnpm` | `npm install -g` (`PNPM_VERSION`) | Installed into `/usr/local` as root. A project `packageManager` pin of a different version is honoured by pnpm itself, which downloads it into the pnpm store on first use; the build verifies that as an unknown uid |
| `bun`, `bunx` | official installer (`BUN_VERSION`) | Installed to `/opt/bun`, world-readable, both symlinked onto `PATH` |
| `uv`, `uvx` | Astral installer (`UV_VERSION`) | Standalone binaries on `PATH`; `uv tool` shims land in `/opt/agent-tools/bin`, which is on `PATH`. Held at 0.12.7: later releases segfault under qemu-user x86_64 emulation, which is how the amd64 platform is built from an arm64 host |
| `uv`, `uvx` | Astral installer (`UV_VERSION`) | Standalone binaries on `PATH`; `uv tool` shims land in `/opt/agent-tools/bin`, which is on `PATH`. Pinned at 0.12.7 |
| `fallow` | `npm install -g` (`FALLOW_VERSION`) | Dead-code and unused-export analysis CLI |
| `rustc`, `cargo`, `rustup` | rustup (`RUST_VERSION`, minimal profile) | `RUSTUP_HOME=/usr/local/rustup` and `CARGO_HOME=/usr/local/cargo` follow the official rust image layout and are opened to every uid afterwards, so the exec user can `cargo install` and add toolchains; `/usr/local/cargo/bin` is on `PATH` |
| `go` | official tarball (`GO_VERSION`) | Unpacked to `/usr/local/go`, on `PATH`. `GOBIN=/opt/agent-tools/bin` puts `go install` binaries next to the other agent tools; `GOPATH` and the module cache default under the writable `HOME` |
+2 -2
View File
@@ -149,10 +149,10 @@ You can customize the deny list by adding or removing glob patterns. One pattern
Each schedule stores a run history panel with:
- **Status** - Running, completed, or failed
- **Status** - Running, completed, failed, or cancelled (a running run can be stopped with **Cancel run**)
- **Trigger source** - Manual or scheduled
- **Log output** - Execution metadata and captured results
- **Assistant output** - Rendered markdown preview and raw markdown
- **Assistant output** - Rendered markdown
- **Errors** - Failure details when a run does not complete
This makes recurring jobs easy to review without digging through raw session data first.
+4 -3
View File
@@ -4,7 +4,7 @@ Monitor the managed OpenCode server's status and control restarts and upgrades f
## Overview
OpenCode Manager runs a supervised OpenCode server process to handle agent sessions. The **OpenCode** tab in Settings shows the server's current status, version information, and provides controls for restarting or upgrading the server without bringing down the Manager itself.
OpenCode Manager runs a supervised OpenCode server process to handle agent sessions. The **OpenCode Config** tab in Settings shows the server's current status, version information, and provides controls for restarting or upgrading the server without bringing down the Manager itself.
![Server Health and Status](../images/server-health-status.png)
@@ -14,7 +14,8 @@ OpenCode Manager runs a supervised OpenCode server process to handle agent sessi
|-----------|---------|
| **Healthy** | The OpenCode server is running and responding to health checks |
| **Unhealthy** | The server is not responding. The Manager will attempt automatic recovery. |
| **Starting** | The server is being initialized after a restart or Manager startup |
The panel shows a single **Server Status** value, `Healthy` or `Unhealthy`. A server that is still starting after a restart or Manager startup is reported as **Unhealthy** until its first successful health check.
The panel also displays:
@@ -85,7 +86,7 @@ Click **Update** to check for and install the newest supported OpenCode 2 versio
3. Restarts the server using the same session-resume flow described above
4. The new version is displayed in the status panel after restart
Installing a specific version from Settings → OpenCode works the same way; versions outside the supported range are rejected before any download. A failure before the installed binary is replaced (registry lookup, download, or extraction) returns an error without restarting the server. If the failure happens after the binary is replaced and the server recovers to a usable state, a recovery notice is shown with the fallback version.
Installing a specific version from Settings → OpenCode Config works the same way; versions outside the supported range are rejected before any download. A failure before the installed binary is replaced (registry lookup, download, or extraction) returns an error without restarting the server. If the failure happens after the binary is replaced and the server recovers to a usable state, a recovery notice is shown with the fallback version.
When `OPENCODE_BIN` is set, the OpenCode binary is managed outside the Manager: **Update** and version installs are refused with `409` and nothing is downloaded or restarted.
+6 -6
View File
@@ -4,7 +4,7 @@ Pin important sessions to the top of your session list so you can find them quic
## Overview
Session pinning lets you mark any session as "pinned" — it moves to a dedicated **Pinned** section above your **Recent** sessions, regardless of how old it is. This is useful for:
Session pinning lets you mark any session as "pinned" — it moves to a dedicated **Pinned** section above your other sessions. This is useful for:
- Active feature branches you switch between throughout the day
- Long-running investigations or debugging sessions
@@ -12,11 +12,11 @@ Session pinning lets you mark any session as "pinned" — it moves to a dedicate
## Pinning a Session
Each session card has an actions menu (three dots or swipe gesture); the first entry toggles pinning:
Each session card has an actions menu (the **⋮** button, hidden in manage mode); its entry toggles pinning:
![Session List with Pinned Section](../images/session-pins-list.png)
The pinned session appears in a **Pinned** section above the **Recent** section. Unpinned sessions stay in **Recent** sorted by last activity.
The pinned session appears in a **Pinned** section above the **Today** section and older sessions. Unpinned sessions stay in those sections, sorted by last activity.
![Pin/Unpin Dropdown](../images/session-pin-dropdown.png)
@@ -27,15 +27,15 @@ Pin state persists across page reloads and browser sessions. Pinned sessions rem
| Action | How |
|--------|-----|
| **Pin a session** | Open the session actions menu and select **Pin to top** |
| **Unpin a session** | Open the session actions menu and select **Unpin** — it moves back to the Recent section |
| **Unpin a session** | Open the session actions menu and select **Unpin** — it moves back to the Today or older sessions |
| **Bulk operations** | Pin/unpin is per-session. Bulk delete and other management tools work as normal on pinned sessions |
## What Happens When a Pinned Session is Deleted
If a pinned session is deleted (manually or by context cleanup), it is removed from the Pinned section automatically. No stale pin entries remain.
Deleting a pinned session from the Manager also removes its pin. A pinned session deleted elsewhere, such as from the OpenCode TUI, disappears from the Pinned section, but its pin record stays in the Manager database.
## Notes
- Pinning is independent of session activity — a pinned session stays pinned even when new sessions push older ones out of the Recent view.
- In the sidebar, pinned sessions are always shown, even ones too old to have loaded. The full session list loads 25 sessions at a time, so an older pinned session appears in its Pinned section only after scrolling loads it.
- The Pinned section supports any number of pinned sessions.
- Pinning is stored server-side in the Manager and is Manager-wide rather than per-user, so the same pins are shown on every device and browser.
+7 -6
View File
@@ -42,21 +42,22 @@ Skill names must match the pattern `^[a-z0-9]+(-[a-z0-9]+)*$`:
## Managing Skills
Skills are managed per-repository through the Skills panel in the sidebar, or via the API.
Create and edit skills in **Settings → OpenCode Config → Skills**. The **Skills** panel in a repository's sidebar lists the skills available there and can install, delete, and load them into a session. Skills can also be managed through the API.
![Skills Manager](../images/skills-manager.png)
### API Endpoints
All endpoints are under `/api/settings/skills`.
All paths are relative to `/api/settings`. `repoId` is required whenever `scope=project`.
| Method | Path | Description |
|--------|------|-------------|
| `GET` | `/skills` | List all skills (optional `?repoId=` filter) |
| `GET` | `/skills/:name` | Get a specific skill (requires `scope` query param, optional `repoId`) |
| `GET` | `/skills` | List all skills (optional `?repoId=` or `?directory=` filter) |
| `POST` | `/skills/install` | Install a skill from a GitHub URL (JSON body with `sourceType: "github"`, `url`, `scope`, `repoId`, `overwrite`) or from uploaded files (multipart form) |
| `GET` | `/skills/:name` | Get a specific skill (requires `scope` query param) |
| `POST` | `/skills` | Create a new skill |
| `PUT` | `/skills/:name` | Update an existing skill (requires `scope` query param, optional `repoId`) |
| `DELETE` | `/skills/:name` | Delete a skill (requires `scope` query param, optional `repoId`) |
| `PUT` | `/skills/:name` | Update an existing skill (requires `scope` query param) |
| `DELETE` | `/skills/:name` | Delete a skill (requires `scope` query param) |
### Create Request
+1 -1
View File
@@ -55,7 +55,7 @@ Connect to OpenAI-compatible STT endpoints for higher accuracy transcription.
1. Go to **Settings > Voice**
2. Under **Speech-to-Text**, select **External API** provider
3. Enter the **STT Server URL**:
3. Enter the **API Endpoint**:
- OpenAI: `https://api.openai.com`
4. Enter your **API Key**
5. Wait for model discovery
+4 -4
View File
@@ -119,14 +119,14 @@ Kokoro-style composite voices are supported. Combine multiple voices for unique
To listen to an AI response:
1. Click the **Play** button on a message
1. Click the **Read aloud** button on a message
2. Audio streams and plays
### Playback Controls
While audio is playing:
- **Stop** - End playback immediately
- **Stop playback** - End playback immediately
- Audio stops if you navigate away
## Markdown Sanitization
@@ -135,8 +135,8 @@ Before sending text to TTS, markdown is cleaned for better speech:
- Code blocks removed entirely
- Inline code: `code` → code
- Links: [text](url) → text
- Images: ![alt](url) → alt
- Links: `[text](url)` → text
- Images: `![alt](url)` → alt
- Bold/italic/strikethrough markers removed
- Headers: ### Header → Header
- List markers removed
+7 -6
View File
@@ -12,9 +12,9 @@ Fill in your account details:
- **Name** - Your display name
- **Email** - Used for login
- **Password** - Minimum 8 characters recommended
- **Password** - At least 8 characters (required)
Click **Create Account** to continue.
Click **Create Admin Account** to continue.
### Step 2: Configure Provider (Optional)
@@ -41,16 +41,17 @@ When these are set:
- Admin user is created automatically on first startup
- Setup wizard is skipped
- Users must log in with configured credentials
- Registration is disabled, so no new accounts can be created
- `ADMIN_PASSWORD` sets the password only when the admin is first created, or when `ADMIN_PASSWORD_RESET=true`; changing it later has no effect otherwise
## Adding Passkeys
After initial setup, you can add passkey authentication for passwordless login:
1. Go to **Settings > Account**
2. Click **Add Passkey**
3. Follow your browser/device prompts
4. Name your passkey (e.g., "MacBook Touch ID")
2. Optionally enter a passkey name (e.g., "MacBook Touch ID")
3. Click **Add Passkey**
4. Follow your browser/device prompts
Passkeys provide:
+4 -3
View File
@@ -55,9 +55,9 @@ docker exec -it opencode-manager sh
| Volume | Container Path | Purpose |
|--------|---------------|---------|
| `opencode-workspace` | `/workspace` | Repository storage |
| `opencode-data` | `/app/data` | Database and config |
| `opencode-bin` | `/home/node/.opencode/bin` | OpenCode binary, persisted across container recreations |
| `opencode-workspace` | `/workspace` | Repository storage, plus OpenCode configuration and state |
| `opencode-data` | `/app/data` | SQLite database |
| `opencode-bin` | `/home/node/.opencode/bin` | OpenCode versions installed from Settings, persisted across container recreations (the bundled binary is part of the image) |
## Local Development
@@ -65,6 +65,7 @@ For contributors who want to develop locally instead of using Docker.
### Prerequisites
- [Git](https://git-scm.com/downloads) - Required; `pnpm dev` checks for it
- [pnpm](https://pnpm.io/installation) - Package manager (required for workspaces)
- [Bun](https://bun.sh) - Backend runtime
- [OpenCode TUI](https://opencode.ai) 2.x, 2.0.15 or newer - `curl -fsSL https://opencode.ai/v2/install | bash`
+2 -2
View File
@@ -58,7 +58,7 @@ Choose the onboarding flow that matches your setup:
1. Click the **folder icon** in the sidebar
2. Click **Add Repository**
3. Select **Remote Repository**
3. Select **Remote**
4. Paste a repository URL (HTTPS or SSH)
5. Click **Add Repository**
@@ -66,7 +66,7 @@ Choose the onboarding flow that matches your setup:
1. Click the **folder icon** in the sidebar
2. Click **Add Repository**
3. Select **Folder Discovery**
3. Select **Folder**
4. Enter a parent folder such as `/Users/you/Development`
5. Click **Discover Repositories**
Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 KiB

After

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 KiB

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 KiB

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

+4 -1
View File
@@ -33,7 +33,7 @@ Open [http://localhost:5003](http://localhost:5003) and create your admin accoun
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
- **Chat & sessions** — Real-time SSE streaming with slash commands, `@file` mentions, Plan/Build modes, and agent switching with configured models
- **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
@@ -55,6 +55,7 @@ OpenCode Manager runs as a pnpm workspace:
- **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)
- **Terminal & Dev Loop** — Repo terminals, project actions, and an authenticated dev-server preview — [Learn more](features/terminal.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)
@@ -63,6 +64,8 @@ OpenCode Manager runs as a pnpm workspace:
- **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)
- **Agent Sandboxing** — Run agent shell commands inside an isolated microVM — [Learn more](features/sandboxing.md)
- **`ocm` CLI** — Attach your local OpenCode TUI to a Manager-hosted repo — [Learn more](ocm-cli.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)
+17 -6
View File
@@ -5,7 +5,7 @@
## Quickstart
1. **Get your Manager URL** — the web UI address where your OpenCode Manager is running (e.g., `https://manager.example.com`)
2. **Generate an internal token** — go to **Settings → Manager Token** in the web UI and click **Generate**
2. **Copy your internal token** — open **Settings → OpenCode Config → Server maintenance**, expand **Manager Internal Token**, and copy the token
3. **Install the CLI** — `pnpm add -g @opencode-manager/ocm-cli`
4. **Log in** — `ocm login https://your-manager-url` (paste the token when prompted)
5. **List repos** — `ocm list` to see repos configured on the Manager
@@ -130,7 +130,7 @@ The token is stored in a platform-specific token store: the macOS Keychain (serv
Windows is not supported: the CLI falls back to the same file store, but the `0600` mode is not enforced there and hidden token entry requires `bash`.
Generate or rotate your internal token from **Settings → Manager Token** in the Manager web UI (Settings cog in the sidebar, then **Manager Token**).
View, copy, or rotate your internal token from **Settings → OpenCode Config → Server maintenance → Manager Internal Token** (Settings cog in the sidebar). A token exists by default: the disclosure shows it behind an eye toggle with a copy button. Click the refresh icon to rotate it; a second click confirms, invalidating the previous token and marking an OpenCode server restart as pending.
---
@@ -145,8 +145,8 @@ ocm logout Forget saved token and state
ocm status Show current manager URL, repo, and whether token is set
ocm list List ready repos from the manager
ocm use <repoId|name> Attach to a specific repo and remember it as last
ocm push [--force] [--create] [--yes] [--full] Mirror $PWD to the matching Manager repo (fast bundle/patch sync by default)
ocm pull [--force] [--full] Mirror the matching Manager repo over $PWD (fast bundle/patch sync by default)
ocm push [repoId] [--force] [--create] [--yes] [--full] Mirror $PWD to the matching Manager repo (fast bundle/patch sync by default)
ocm pull [repoId] [--force] [--full] Mirror the matching Manager repo over $PWD (fast bundle/patch sync by default)
ocm install [--dir <path>] [--force] [--no-link] Vendor the CLI + TUI plugin into the OpenCode config dir
ocm --help Show this help
```
@@ -218,7 +218,18 @@ The CLI's environment and token inputs:
| Endpoint | Method | Purpose |
|---|---|---|
| `/api/internal/opencode-workspaces` | GET | List ready repos with directory + originUrl |
| `/api/internal/repo-mirror/:repoId/up` | POST | Receive tarball, write to repo dir |
| `/api/internal/repo-mirror/:repoId/down` | GET | Stream tarball of repo dir |
| `/api/internal/repos/:repoId/mirror/begin` | POST | Begin a chunked tarball upload (pass `repoId` `0` with `create` to create the repo) |
| `/api/internal/repos/:repoId/mirror/parts/:uploadId/:index` | PUT | Upload one tarball chunk |
| `/api/internal/repos/:repoId/mirror/commit` | POST | Commit the uploaded chunks into the repo dir |
| `/api/internal/repos/:repoId/mirror/uploads/:uploadId` | DELETE | Abort an upload and clean up staging |
| `/api/internal/repos/:repoId/mirror` | GET | Stream a tarball of the repo dir (the `--full` pull) |
| `/api/internal/repos/:repoId/mirror/bundle` | POST | Upload a git bundle (fast push) |
| `/api/internal/repos/:repoId/mirror/bundle` | GET | Download a git bundle (fast pull) |
| `/api/internal/repos/:repoId/mirror/patch` | GET | Snapshot branch, HEAD, and working-tree patch |
| `/api/internal/repos/:repoId/mirror/patch` | POST | Apply a working-tree patch (fast push) |
| `/api/internal/repos/:repoId/mirror/head` | GET | Read the server branch, HEAD, and dirty state |
| `/api/internal/repos/:repoId/mirror/contains/:sha` | GET | Check whether a commit is contained in the server HEAD |
| `/api/internal/repos/:repoId/mirror/target` | GET | Plan the repo/worktree a branch maps to |
| `/api/internal/repos/:repoId/mirror/target` | POST | Ensure that target repo/worktree exists |
| `/api/opencode-proxy/*` | ALL | Token-protected proxy from Manager to single OpenCode server |
| `/api/opencode-proxy/repos/:repoId/*` | ALL | Token-protected proxy that defaults the request location to the repo directory |
+17 -4
View File
@@ -33,7 +33,7 @@ docker-compose build --no-cache
**Symptoms:** Container won't start after an OpenCode upgrade, or the OpenCode settings show a malformed binary
The OpenCode binary lives in its own named volume (`opencode-bin`). To remove only that volume and let the entrypoint reinstall the pinned bundled version on next start, without touching the workspace or database volumes:
OpenCode versions installed from Settings live in their own named volume (`opencode-bin`); the bundled version is part of the image. On start, the entrypoint already removes a persisted binary that is malformed or outside the supported range. If a persisted version still misbehaves, remove only that volume so the container falls back to the bundled binary, without touching the workspace or database volumes:
```bash
docker-compose down
@@ -69,6 +69,13 @@ ports:
- "8080:5003" # Use different host port
```
Then add the new URL to the allowed origins in `.env`, or sign-in fails with an invalid-origin error:
```bash
AUTH_TRUSTED_ORIGINS=http://localhost:8080
PASSKEY_ORIGIN=http://localhost:8080
```
### Permission Denied Errors
**Symptoms:** Container can't write to volumes
@@ -77,7 +84,13 @@ Startup tolerates workspace directories that already exist with wrong ownership;
**Solutions:**
1. Fix ownership:
1. In Docker, the entrypoint re-owns `/app/data` and `/workspace` on every start, so a host-side `chown` is overwritten. When you bind-mount a host directory with `OCM_WORKSPACE_HOST_PATH`, set `PUID` and `PGID` in `.env` to the host user that owns it:
```bash
PUID=1000
PGID=1000
```
2. For local development, fix ownership of the local directories:
```bash
sudo chown -R $(id -u):$(id -g) ./workspace ./data
```
@@ -277,8 +290,8 @@ docker compose start app
**Solutions:**
1. Swipe from screen edge
2. Swipe faster (within 300ms)
1. Start the swipe within 30px of the screen edge
2. Swipe at least 80px
3. Check no UI element is blocking
## Getting More Help
@@ -45,7 +45,7 @@ export function CommitsTab({ repoId, branch, onSelectCommit }: CommitsTabProps)
{data.commits.map((commit) => (
<button
key={commit.hash}
className="flex items-start gap-3 px-3 py-2 text-left hover:bg-accent/50 transition-colors border-b border-border last:border-0"
className="flex w-full items-start gap-3 px-3 py-2 text-left hover:bg-accent/50 transition-colors border-b border-border last:border-0"
onClick={() => onSelectCommit?.(commit.hash)}
>
<div className="flex-shrink-0 w-8 h-8 rounded-full bg-accent flex items-center justify-center mt-0.5">
@@ -196,14 +196,15 @@ export function SourceControlPanel({
<button
key={tab.id}
className={cn(
'flex items-center gap-1.5 px-3 py-2 text-sm transition-colors border-b-2 -mb-px',
'flex items-center gap-1.5 py-2 text-sm whitespace-nowrap transition-colors border-b-2 -mb-px',
isMobile ? 'flex-1 justify-center px-2' : 'px-3',
activeTab === tab.id
? 'border-primary text-foreground'
: 'border-transparent text-muted-foreground hover:text-foreground hover:bg-accent'
)}
onClick={() => setActiveTab(tab.id)}
>
<Icon className="w-4 h-4" />
{!isMobile && <Icon className="w-4 h-4" />}
<span>{tab.label}</span>
{tab.id === 'changes' && changesCount > 0 && (
<span className="text-xs px-1.5 py-0.5 rounded-full bg-accent">
@@ -183,7 +183,7 @@ export function TerminalPanel({ repoId, directory, isOpen, onClose }: TerminalPa
</Button>
</div>
<div className="relative flex-1 min-h-0">
<div className="relative flex-1 min-h-0 bg-background">
{terminals.length === 0 ? (
<div className="flex h-full items-center justify-center text-sm text-muted-foreground">
{isLoading || isCreating ? 'Starting terminal...' : 'No terminals'}
+3
View File
@@ -61,6 +61,9 @@ nav:
- Contributing: development/contributing.md
- Troubleshooting: troubleshooting.md
not_in_nav: |
features/opencode-workspaces.md
markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true