occtl

Coordinate OpenCode sessions and workflows from the CLI.

4|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/colinmollenhour/occtl --skill occtl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: occtl
Source: https://github.com/colinmollenhour/occtl/tree/main
Command: npx skills add https://github.com/colinmollenhour/occtl --skill occtl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode session management across multiple projects is tedious and error-prone. occtl provides a unified CLI to manage sessions, read messages, watch events, send prompts, respond to permissions, and coordinate worktrees, reducing context switching and manual steps.

Core Features & Use Cases

  • List sessions across directories with filters and sorting to monitor activity
  • Read full message histories and fetch the last message for quick context
  • Stream real-time session events (messages, status, diffs, todos) for live monitoring
  • Send prompts programmatically with optional model/agent/variant configuration
  • Respond to permission requests with manual or auto-approve options
  • Inspect diffs, todos, and summaries to track progress and cost
  • Manage git worktrees to enable parallel, isolated sessions and Ralph Mode workflows
  • Install or view the bundled OpenCode skill for quick setup and usage
  • Use cross-project orchestration patterns to coordinate work across directories
  • Manage session lifecycles end-to-end from creation to sharing

Quick Start

Install occtl and use it to manage OpenCode sessions from the CLI by listing sessions, reading messages, sending prompts, and coordinating worktrees.

Frequently Asked Questions about occtl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage OpenCode sessions across multiple projects from the command line?

You can manage OpenCode sessions across multiple projects from the command line using a CLI tool that lists sessions, reads messages, sends prompts, and coordinates git worktrees. This unified CLI reduces context switching and manual steps.

Can I stream real-time OpenCode session events like diffs and todos in the terminal?

Yes, you can stream real-time OpenCode session events in the terminal. The orchestration CLI supports streaming live updates for messages, status changes, diffs, and todos to enable continuous monitoring of active sessions.

What is the best way to automate sending prompts and approving permissions for OpenCode sessions?

The best way to automate sending prompts and approving permissions for OpenCode sessions is using a CLI orchestration tool. It allows sending prompts programmatically with optional model configurations and responding to permission requests via manual or auto-approve options.

Do I need a running OpenCode server to orchestrate sessions and coordinate worktrees?

Yes, you need an accessible OpenCode server to orchestrate sessions and coordinate worktrees. The CLI requires an OpenCode server running locally or accessible via environment-detected host and port configurations to manage session lifecycles.

How does git worktree coordination work for parallel and isolated OpenCode sessions?

Git worktree coordination for parallel and isolated OpenCode sessions works by managing multiple working directories from a unified CLI. This setup enables isolated workflows, cross-project orchestration patterns, and Ralph Mode workflows without manual directory switching.

What limitations exist when trying to monitor session cost and progress across directories?

When monitoring session cost and progress across directories, the primary limitation is the requirement for a consistently accessible OpenCode server. Without proper local or environment-detected host and port configuration, the CLI cannot inspect diffs, summaries, or track progress.