Skip to content

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

FlagDescription
-v, --verboseEnable verbose logging output.
--configPath to a custom config file.
--jsonOutput results in JSON format.