opencode-cli

Install, configure, and run the OpenCode CLI for headless tasks and APX runtime dispatch.

6|1|Updated May 8, 2026
One-click install
npx skills add https://github.com/agentprojectcontext/apx --skill opencode-cli-agentprojectcontext
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opencode-cli
Source: https://github.com/agentprojectcontext/apx/tree/main/src/core/runtime-skills/opencode-cli
Command: npx skills add https://github.com/agentprojectcontext/apx --skill opencode-cli-agentprojectcontext

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It guides you through installing the OpenCode CLI, configuring providers and authentication, and running non-interactive tasks without guessing at command flags. ## Core Features & Use Cases - Verified Installation: Install OpenCode using the official method and confirm success with version checks. - Provider & Model Setup: Manage authentication and list available providers and models via the CLI. - Headless Execution: Run tasks non-interactively with opencode run, including model selection and permission flags. - APX Integration: Dispatch project agents through the APX runtime using OpenCode, including Telegram message delivery. - Use Case: You want an agent to complete a coding task unattended. Use this Skill to verify the CLI, pick a model, and run opencode run --model provider/model "task" headlessly. ## Quick Start Ask the assistant to install OpenCode, verify it with opencode --version, and run a task headlessly using opencode run.

Frequently Asked Questions about opencode-cli

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

FAQPage Schema
How do I install the OpenCode CLI?▼

Use the official install method for your target machine from the OpenCode documentation, then verify the installation by running opencode --version. Always confirm the CLI responds before attempting further commands.

How do I run OpenCode non-interactively?▼

Use the headless run command: opencode run "task". You can specify a model with opencode run --model provider/model "task" or skip permission prompts with the --dangerously-skip-permissions flag.

How do I configure providers and models in OpenCode?▼

Run opencode providers to manage provider authentication and opencode models to list available models. Check opencode --help first to confirm the exact subcommands available in your installed version.

Can I use OpenCode as an APX runtime?▼

Yes, run a project agent through OpenCode with apx run <agent> --runtime opencode "task". If the task needs Telegram delivery, instruct OpenCode to use the exact command apx telegram send "message".

Why should I check opencode --help before running commands?▼

CLI flags and subcommands vary between versions, so inventing flags can cause failures. Inspecting opencode --help and opencode run --help ensures you use the exact syntax your installed version supports.