Skip to main content
Each file in app/adapters/ defines one adapter — a named binding between Hyperterse and your database. Adapter files are YAML documents with a fixed schema.

Full schema

app/adapters/primary-db.terse

Field reference

string
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).
string
required
Connector type. Determines which database driver to use.Allowed values: postgres, mysql, mongodb, redis, sqlite
string
required
Database connection URI. Supports {{ env.VAR }} placeholders for secrets.
object
Driver-specific key-value options. All values must be strings.

Connection string formats

Standard PostgreSQL DSN. Supports all driver parameters in the query string or options map.Common options:

Lifecycle

1

Discovery

Hyperterse loads adapter definitions from app/adapters/*.terse.
2

Validation

Connector type, connection string presence, and name uniqueness are verified at compile time.
3

Initialization

At startup, all referenced adapters initialize their connections in parallel.
4

Execution

Tools resolve adapters by name when executing statements.
5

Shutdown

All connectors close concurrently on termination.
If any adapter fails to connect during initialization, the server does not start.

JSON Schema

Editor validation: schema/adapter.terse.schema.json. Associate with **/adapters/*.terse. See Configuration schemas.