Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dae4e53

Browse files
committed
docs: profile selection logic
1 parent 184782b commit dae4e53

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ dryrun --profile billing snapshot diff --latest
167167

168168
See [`docs/dryrun-toml.md`](docs/dryrun-toml.md) for all profile options.
169169

170+
Every DB-related command (`init`, `import`, `probe`, `dump-schema`, `lint`, `drift`, `stats apply`, all `snapshot` subcommands) accepts `--profile` and falls back to the resolved profile's `db_url` and `schema_file` when the corresponding CLI flag is not provider.
171+
172+
> **Note:** the MCP server is currently single-database. Using the default profile. Or the option is to run one `dryrun mcp-serve` process per database. Native multi-database support inside one MCP process is tracked in [#4](https://github.com/boringSQL/dryrun/issues/4).
173+
170174
## MCP server
171175

172176
Add `dryrun` to your AI assistant. If you installed via Homebrew, `dryrun` is already on your PATH:
@@ -183,6 +187,8 @@ claude mcp add dryrun -- /path/to/dryrun mcp-serve
183187

184188
That's it. The server auto-discovers `.dryrun/schema.json` in the current project. No database credentials needed, your AI assistant gets full schema intelligence from the offline snapshot.
185189

190+
For projects with multiple databases, run one `dryrun mcp-serve` per database and add an entry per server in your client config. Native multi-database serving inside one MCP process is tracked in [#4](https://github.com/boringSQL/dryrun/issues/4).
191+
186192
See the [Tutorial](TUTORIAL.md) for live database setup, SSE transport, and Claude Desktop configuration.
187193

188194
## More

docs/dryrun-toml.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ profile = "offline"
5656

5757
### Resolution order
5858

59-
1. `--db` flag (CLI only, bypasses profiles entirely)
60-
2. `--schema-file` flag (CLI only)
61-
3. `--profile` flag
62-
4. `PROFILE` environment variable
63-
5. `[default].profile` in dryrun.toml
64-
6. Auto-discovery of `.dryrun/schema.json`
59+
A profile is selected from:
60+
61+
1. `--profile` flag
62+
2. `PROFILE` environment variable
63+
3. `[default].profile` in dryrun.toml
64+
4. Auto-discovery of `.dryrun/schema.json` (no profile, just a schema)
65+
66+
CLI flags `--db` and `--schema-file` override the resolved profile's matching fields for that invocation; they don't bypass the profile, so `database_id` and `project_id` are still taken from it. `--profile billing --db $OTHER` connects to `$OTHER` but keys snapshots under billing's `database_id`.
67+
68+
Every DB command (`init`, `import`, `probe`, `dump-schema`, `lint`, `drift`, `stats apply`, all `snapshot` subcommands) accepts `--profile` and falls back to the resolved profile's `db_url` / `schema_file` when the corresponding CLI flag is omitted.
6569

6670
Relative paths in `schema_file` are resolved from the project root (the directory containing `dryrun.toml`). Absolute paths work too.
6771

0 commit comments

Comments
 (0)