Cloud Mode (cloud:true)
Configuration
Cloud mode configuration, environment variables, and precedence rules.
Enable Cloud Mode
Environment variables:
OPENSTEER_MODE=cloud
OPENSTEER_API_KEY=osk_your_key_here
Constructor config:
const opensteer = new Opensteer({
cloud: {
apiKey: 'osk_your_key_here',
baseUrl: 'https://api.opensteer.com', // default
authScheme: 'api-key', // default, or 'bearer'
},
})
Passing cloud: true uses environment variables for configuration. Passing a cloud object overrides OPENSTEER_MODE.
Config Precedence
Values resolve from lowest to highest priority:
| Priority | Source | Example |
|---|---|---|
| 1 (lowest) | Runtime defaults | mode: 'local', model: 'gpt-5.1' |
| 2 | Config file | .opensteer/config.json |
| 3 | Environment variables | OPENSTEER_MODE=cloud |
| 4 (highest) | Constructor input | new Opensteer({ cloud: true }) |
Dotenv Autoload
OpenSteer loads .env files from storage.rootDir (default: process.cwd()) in this order:
.env.<NODE_ENV>.local.env.local(skipped whenNODE_ENV=test).env.<NODE_ENV>.env
Existing process.env values are never overwritten. Set OPENSTEER_DISABLE_DOTENV_AUTOLOAD=true to disable.
Auth Schemes
| Scheme | Header | When |
|---|---|---|
api-key (default) | x-api-key: osk_... | Standard API key auth |
bearer | Authorization: Bearer osk_... | Bearer token auth |
Announcement Policy
Control cloud session URL printing with OPENSTEER_REMOTE_ANNOUNCE:
| Value | Behavior |
|---|---|
always (default) | Print session URL on launch |
tty | Print only in interactive terminals |
off | Never print |
Cloud mode is fail-fast — it does not fall back to local mode on failure.
