app/adapters/ defines one adapter — a named binding between the runtime and a database. Adapter files are YAML documents with a fixed schema.
Full schema
app/adapters/primary-db.terse
Field reference
Adapter identifier, referenced by tools via
use. Must be unique across all adapters. Must match ^[a-zA-Z][a-zA-Z0-9_-]*$.Default: filename without the .terse extension (e.g., primary-db from primary-db.terse).Connector type. Determines which database driver to use.Allowed values:
postgres, mysql, mongodb, redisDatabase connection URI. Supports
{{ env.VAR }} placeholders for secrets.Driver-specific key-value options. All values must be strings.
Connection string formats
- PostgreSQL
- MySQL
- MongoDB
- Redis
options map.Common options:| Key | Example | Description |
|---|---|---|
sslmode | require, disable, verify-full | SSL mode |
connect_timeout | "10" | Timeout in seconds |
application_name | "hyperterse" | Name reported to server |
Lifecycle
Validation
Connector type, connection string presence, and name uniqueness are verified
at compile time.
JSON Schema
Editor validation:schema/adapter.terse.schema.json. Associate with **/adapters/*.terse. See Configuration schemas.