strait.json configuration file that all SDKs and the CLI can read. This replaces the TypeScript-specific strait.config.ts file (now deprecated).
Getting Started
Run the init command to create astrait.json file:
Field Reference
project (required)
sdk (optional)
SDK client configuration. These values are read by all five SDKs.
CLI fields (optional)
These fields are read by the CLI only. SDKs ignore them.Environment Variable Overrides
Environment variables always take precedence overstrait.json values. This lets you use the config file for defaults while overriding per-environment in CI/CD or production.
Config File Discovery
All SDKs and the CLI look forstrait.json in the current working directory. There is no upward directory traversal — the file must be at the project root where commands are invoked.
SDK discovery order
- Explicit path (if provided via options)
strait.jsonin working directorystrait.config.ts/.js/.mjs/.cjs(deprecated, TypeScript SDK only)
CLI discovery order
- Explicit
--configflag strait.jsonin working directorystrait.config.ts/.js/.mjs/.cjs(deprecated)
CLI connection resolution priority
When the CLI resolves server URL, project ID, and API key, the priority chain is:Loading Config from Each SDK
Migrating from strait.config.ts
If you’re using the deprecated strait.config.ts, run:
strait.json file. You can then delete your strait.config.ts. The SDKs and CLI will automatically prefer strait.json when both files exist.
When a .ts config file is loaded, the SDK and CLI emit a deprecation warning:
strait init Command
The strait init command scaffolds a new strait.json interactively:
- Project ID
- Project name (optional)
- Source directory (default:
src) - Runtime — Node.js or Bun (default: Node.js)
- Base URL (optional)
.gitignore and offers to add .strait (the build output directory).
Non-interactive mode
For CI/CD or scripting, use--yes with --project: