bridge.yaml is the project-local configuration file for Bridge. It tells the CLI what your project is called and which named providers an agent can read from.
Bridge keeps the config intentionally small:
- one file
- one project name
- one map of named providers
Where Bridge looks for configuration
Bridge readsbridge.yaml from the current working directory.
That means:
bridge initcreatesbridge.yamlin the directory where you run itbridge read,bridge ls,bridge status, andbridge connectexpect the file to exist in the current directory- Bridge does not currently search parent directories for a config file
Minimal configuration
Runningbridge init creates a minimal config like this:
bridge init uses the current directory name as the default project name. If bridge.yaml already exists, the command does not overwrite it.
A real example
Most projects will start with one local provider and one database provider:filesis a filesystem provider rooted at./docsdbis a Postgres provider whose connection string comes from an environment variable
Top-level fields
| Field | Type | Required | What it does |
|---|---|---|---|
version | string | yes | Configuration format version. Bridge currently writes "1". |
name | string | yes | Project name. bridge init defaults this to the current directory name. |
providers | map | yes | Named provider definitions keyed by provider alias such as files or db. |
Provider entries
Each entry underproviders is keyed by the name you want agents and humans to use at the command line.
- is chosen by you
- is what you pass to
--from - should be short and memorable
| Field | Type | Required | What it does |
|---|---|---|---|
type | string | yes | Provider type such as filesystem or postgres |
uri | string | yes | Connection target for that provider |
Supported provider types today
Bridge currently recognizes two provider types:| Type | Accepted URI forms | Notes |
|---|---|---|
filesystem | file://./path, file:///absolute/path | Must point to an existing directory |
postgres | postgres://..., postgresql://... | Used for listing tables and reading rows |
bridge connect with a literal URI, Bridge infers the type from the URI scheme automatically.
Examples:
bridge connect with an environment variable name, Bridge requires --type and writes the placeholder into bridge.yaml for you:
Filesystem URIs
Filesystem providers usefile:// URIs.
Relative paths
bridge.yaml lives.
Absolute paths
Postgres URIs
Postgres providers use standard connection strings:Environment variable expansion
Bridge expands environment variables inside strings using the exact${VAR_NAME} syntax.
Bridge writes that ${VAR_NAME} form automatically when you connect with a bare env var name such as DATABASE_URL.
Example:
- a single variable in a full string like
${DATABASE_URL} - multiple variables inside one URI
env_var_not_set.
How Bridge updates the file
bridge init
- creates
bridge.yamlif it does not exist - uses the current directory name as
name - initializes
providersas an empty map - returns
"already_exists"instead of overwriting an existing file
bridge connect
- loads the existing config
- accepts either a literal URI or a bare environment variable name as
<target> - infers the provider type from a literal URI scheme when possible
- requires
--typewhen<target>is an environment variable name - inserts or updates the named provider entry
- writes the updated
bridge.yamlback to disk
bridge remove
- deletes the named provider from
providers - writes the updated file back to disk
Common mistakes
Missing config file
Missing config file
If you run a Bridge command in a directory without
bridge.yaml, Bridge returns config_not_found. Run bridge init first, or change into the project directory that already contains the config file.Invalid or unsupported URI
Invalid or unsupported URI
Bridge currently understands
file://, postgres://, and postgresql:// schemes. A value like redis://localhost will fail with invalid_uri.Invalid connect target
Invalid connect target
A
bridge connect target must be either a full URI such as postgres://localhost:5432/mydb or a bare environment variable name such as DATABASE_URL. Placeholder syntax like ${DATABASE_URL} is for bridge.yaml, not for the CLI input.Missing environment variable
Missing environment variable
If your config references
${DATABASE_URL} and that variable is not set, Bridge fails fast with env_var_not_set rather than guessing or continuing with a partial value.Filesystem path points to the wrong thing
Filesystem path points to the wrong thing
A filesystem provider must point to an existing directory. If the directory does not exist, or if the path resolves outside the configured root during reads, Bridge returns a provider error.
Configuration philosophy
Bridge keeps configuration intentionally narrow:- one project-local file
- explicit named providers
- URI-based backend selection
- environment variables for secrets
Next steps
Providers
Learn exactly how the filesystem and Postgres providers behave today.
Quickstart
Start with the minimal Bridge workflow and connect your first provider.
CLI interface
See how Bridge turns configuration into structured JSON commands and output.