snippetbashTip
opencode — An AI coding agent. Some subcommands such as `auth`, `models`, `web`, etc. have their own usage docu
Viewed 0 times
opencodesuchcommandcodingclisomeagentsubcommands
Problem
How to use the
opencode command: An AI coding agent. Some subcommands such as auth, models, web, etc. have their own usage documentation. More information: <https://opencode.ai/docs/cli/>.Solution
opencode — An AI coding agent. Some subcommands such as auth, models, web, etc. have their own usage documentation. More information: <https://opencode.ai/docs/cli/>.Start the interactive TUI:
opencodeContinue the most recent session:
opencode {{[-c|--continue]}}Run opencode in non-interactive mode by passing a prompt directly:
opencode run "{{message}}"Use a specific model and agent:
opencode run {{[-m|--model]}} {{provider}}/{{model}} --agent {{agent_name}} "{{message}}"List all available models from configured providers:
opencode modelsManage credentials and login for providers:
opencode auth loginStart a headless opencode server for API access:
opencode serve {{[-h|--hostname]}} {{hostname}} {{[-p|--port]}} {{port}}Create a new agent with custom configuration:
opencode agent createCode Snippets
Start the interactive TUI
opencodeContinue the most recent session
opencode {{[-c|--continue]}}Run opencode in non-interactive mode by passing a prompt directly
opencode run "{{message}}"Use a specific model and agent
opencode run {{[-m|--model]}} {{provider}}/{{model}} --agent {{agent_name}} "{{message}}"List all available models from configured providers
opencode modelsContext
tldr-pages: common/opencode
Revisions (0)
No revisions yet.