Repository navigation
Configuration
Config basenames, most preferred first (from packages/core/src/brand.ts):
rift.jsonc, rift.json, opencode.jsonc, opencode.json
Precedence, lowest to highest (from packages/opencode/src/config/config.ts):
- Remote well-known config fetched from a
wellknownauth entry. - Global files in the config directory:
config.json, thenopencode.json,opencode.jsonc,rift.json,rift.jsonc(each file layers over the last, sorift.jsoncwins). - The file named by the
OPENCODE_CONFIGenvironment variable. - Project
rift.json/opencode.jsonfiles walking up from the project directory (nearer files win). -
.rift/.opencodedirectories found the same way, then in the home directory, thenOPENCODE_CONFIG_DIR. -
OPENCODE_CONFIG_CONTENTenvironment variable. - Console org config for the active account.
- Managed config directory and macOS managed preferences (highest).
Run rift debug paths to print the actual directories on your machine. On a machine that upgraded from OpenCode, the paths still read opencode (see compatibility below).
TUI behavior (theme, leader key, keybinds, scroll, cursor, mouse, attention) lives separately in tui.json / tui.jsonc, not in rift.json. Use OPENCODE_TUI_CONFIG to load a custom TUI config path.
Types and descriptions come from packages/core/src/v1/config/config.ts. All keys are optional.
| Key | Type | Default | Meaning |
|---|---|---|---|
autoupdate |
boolean or "notify"
|
unset (ask) |
true: install patch releases silently, still ask for minor and major. false: stop checking. |
model |
string (provider/model) |
unset | Default model. |
small_model |
string (provider/model) |
unset | Small model for tasks like title generation. |
plannerModel |
string (provider/model) |
unset | Vibe Mode planner default. |
executorModel |
string (provider/model) |
unset | Vibe Mode executor default. |
vibe_mode |
boolean |
unset (off) | Enable Vibe Mode by default for new sessions. |
brain_rot |
boolean |
unset (off) | Enable Brain Rot Mode by default for new sessions. |
vibe_max_attempts |
int |
2 (0 unlimited) |
Failed executor attempts before the planner rewrites the step. Default applied in session/prompt.ts. |
vibe_review |
boolean |
true |
Planner reviews each executor step. |
vibe_review_max_rounds |
int |
2 (0 unlimited) |
Rejected reviews per step before the planner rewrites the step. Default applied in session/prompt.ts. |
verify |
boolean |
true |
Run project checks after edits. |
verify_commands |
string[] |
unset (auto-detect) | Commands to run instead of auto-detecting. Always run from the project root. |
verify_timeout_ms |
int |
600000 (10 min; 0 disables) |
Kill a single check after this long. |
verify_scope_warn_files |
int |
15 (0 disables) |
Warn when more files changed than this. |
verify_browser_url |
string (URL) |
unset | Load this URL in a real browser after the commands run. |
verify_claims |
boolean |
true |
Compare the agent summary against the real diff. |
verify_claims_model |
string (provider/model) |
Vibe planner, else session model | Model used for the summary-vs-diff comparison. |
Example:
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-5",
"verify": true,
"verify_browser_url": "http://localhost:3000",
"plannerModel": "anthropic/claude-opus-5",
"executorModel": "anthropic/claude-haiku-4-5-20251001"
}Every RIFT_* variable is copied onto its OPENCODE_* counterpart once at startup (adoptEnv in packages/core/src/brand.ts), so both spellings work. An already-set legacy variable wins, so nothing a caller set is overwritten. About ninety variables are read by their legacy names throughout the codebase.
Variables RIFT defines or documents:
-
RIFT_INSTALL_DIR: install directory (default~/.rift/bin). -
RIFT_VERSION(orVERSION): version for the installer andrift upgrade. -
RIFT_NO_SHELL=1: do not open a new shell after install. -
RIFT_RELEASES_API: override where the newest release is looked up. -
RIFT_INSTALL_URL: override where the install script is fetched from on update. -
RIFT_BROWSER_PATH: point thebrowsertool andverify_browser_urlat a specific browser executable. -
RIFT_BANNER_COLS/RIFT_BANNER_MODE: test hooks for the installer banner. -
OPENCODE_CONFIG,OPENCODE_CONFIG_DIR,OPENCODE_CONFIG_CONTENT,OPENCODE_DISABLE_PROJECT_CONFIG,OPENCODE_DISABLE_AUTOUPDATE,OPENCODE_ALWAYS_NOTIFY_UPDATE,OPENCODE_TUI_CONFIG,OPENCODE_PERMISSION: honored as named (aRIFT_spelling is adopted onto each).
Run rift debug paths for the exact locations. Typical macOS output on a machine that upgraded from OpenCode:
home /Users/shiv
data /Users/shiv/.local/share/opencode
bin /Users/shiv/.cache/opencode/bin
log /Users/shiv/.local/share/opencode/log
repos /Users/shiv/.local/share/opencode/repos
cache /Users/shiv/.cache/opencode
config /Users/shiv/.config/opencode
state /Users/shiv/.local/state/opencode
tmp /var/folders/.../T/rift
- Auth:
auth.jsonin the data directory (packages/opencode/src/auth/index.ts). - Sessions: SQLite database in the data directory:
opencode.db, oropencode-<channel>.dbfor non-default channels (packages/core/src/database/database.ts). - Logs:
opencode.login the log directory (packages/core/src/observability/logging.ts).
Each directory prefers the RIFT name but keeps using an existing legacy one (brandedDir in packages/core/src/brand.ts). A legacy directory is used in place when no RIFT directory exists yet, so an upgrade keeps its auth and sessions. Nothing is copied or deleted; a fresh install simply starts under the new name. Coming from OpenCode, existing opencode.json, auth and sessions keep working: RIFT reads both names and leaves the old directory where it is.