OpenCode Snippets
Source: OpenCode Documentation
Terminal User Interface (TUI) Commands
# Connect to a provider, for example Amazon Bedrock, Anthropic, Azure, GitHub Copilot, OpenAI, Ollama and others/connect
# Select user interface theme/theme
# Select models/model
# Initialize OpenCode for project after cd into project directory, create AGENTS.md/init
# Undo changes/undo
# Redo changes/redo
# View sessions/sessions
# Start sub agent@code-reviewer@security-engineer
# Manage skills/skills
# Quit, Exit/exit/q
# Reference file with @How is authentication handled in @packages/functions/src/api/index.tsCommand Line Interface (CLI)
Section titled “Command Line Interface (CLI)”# Open opencode with directory as contextopencode
# Helpopencode -h
# Create a new agent with guide, prompt injectionsopencode agent create
# Manage sessionsopencode session# Manage sessions, List themopencode session listOpenCode Configuration
Section titled “OpenCode Configuration”Microsoft Documentation MCP Server
Section titled “Microsoft Documentation MCP Server”Source: Configuration originally from MCP Servers - microsoft/skils - GitHub
{ "$schema": "https://opencode.ai/config.json", "mcp": { "microsoft-docs": { "type": "remote", "url": "https://learn.microsoft.com/api/mcp" } }}