CLI Reference
The complete guide to the opencode command-line interface.
Core Commands
opencode start
Starts the interactive agent session in the current directory.
opencode start --debug
opencode auth
Authenticate with a model provider.
opencode auth login --provider <name>
opencode init
Initialize a new configuration file in the current directory.
opencode init
opencode version
Print the current version and build info.
Global Flags
| Flag | Description |
|---|---|
-v, --verbose | Enable verbose logging output. |
--config | Path to a custom config file. |
--json | Output results in JSON format. |