The essential OpenCode commands are the ones that let you (a) authenticate and pick a model, (b) bootstrap a project context, and © safely iterate while making changes. In the TUI, that usually means /connect (add credentials), /models (choose the active model), /init (create/update AGENTS.md so the agent understands your project conventions), and /help (discover what’s available without guessing). Once you’re working, “safety and control” commands like /undo and /redo are core because they let you roll back conversation steps and file edits in a predictable way, instead of manually hunting down what changed.
In day-to-day use, you’ll also reach for a few quality-of-life commands. /editor opens your external editor for composing longer prompts (useful when you want to specify constraints precisely), and /export writes the current conversation to Markdown so you can save decisions or paste them into docs. /details toggles tool execution details, which is handy when you’re debugging why a command ran or why a tool result looks the way it does. /compact (alias /summarize) helps you keep a long session manageable by compacting the conversation—useful when the discussion is getting lengthy and you want the agent to carry forward the important context without scrolling forever. And if your workflow involves sharing or reviewing sessions with teammates, /share and /unshare matter (even if you only use them occasionally).
On the CLI side (outside the TUI), the “essential” set is about automation and headless workflows: opencode auth login / opencode auth list for credential management; opencode models to list available models across providers (and optionally refresh the cache); and opencode run for non-interactive usage in scripts (for example, generating a changelog summary from a diff, or checking a code snippet explanation in CI logs). If you want OpenCode available over a network, opencode web and opencode serve start a headless server, and opencode attach lets a terminal UI connect to that backend from another machine—useful for remote dev boxes. This is also where OpenCode can fit naturally into data-heavy developer tooling: if you’re building an embedding pipeline for a vector database like Milvus (and later deploying it on Zilliz Cloud), it’s common to script “generate schema + generate ingestion job + validate query examples” in repeatable commands—OpenCode’s CLI mode can be part of that loop without forcing a full interactive session every time.