Skip to content

Allow skipping DB if the config file is available#4358

Merged
cloutiertyler merged 6 commits intomasterfrom
drogus/skip-db-in-CLI-commands
Feb 20, 2026
Merged

Allow skipping DB if the config file is available#4358
cloutiertyler merged 6 commits intomasterfrom
drogus/skip-db-in-CLI-commands

Conversation

@drogus
Copy link
Collaborator

@drogus drogus commented Feb 19, 2026

Description of Changes

This PR introduces a possibility to skip passing a DB name to various commands if there is a config file with one database defined

API and ABI breaking changes

This changes the behaviour of several CLI commands:

  1. call
  2. subscribe
  3. sql
  4. describe
  5. logs
  6. delete

Expected complexity level and risk

4 - it's tricky to get all of the combinations of CLI arguments right

Testing

I've tested the simplest cases manually.

clockwork-labs-bot and others added 4 commits February 19, 2026 19:23
…or messages

- Commands with unambiguous <database> args (logs, delete) now fall through
  to treat unknown database names as ad-hoc databases instead of erroring,
  removing the need for --no-config in those cases.
- `spacetime sql` falls through similarly when 2+ args are provided (first
  must be a database since sql expects exactly 1 query).
- Multi-target config errors now list the configured databases instead of
  the generic "not in the config file" message.
- `spacetime sql "SELECT ..."` with multi-target config gives a helpful
  error suggesting the correct syntax instead of the misleading "missing
  <query>" error.
@cloutiertyler cloutiertyler force-pushed the drogus/skip-db-in-CLI-commands branch from 54ea59e to 01a5bff Compare February 20, 2026 16:23
The clap-standard SCREAMING_CASE placeholders like <FUNCTION_NAME> in
help strings end up as bare HTML/JSX tags in the generated CLI reference
markdown, causing the Docusaurus MDX build to fail. Rather than changing
the help text conventions, add a post-processing step to the doc
generation script that escapes <PLACEHOLDER> patterns outside backtick
code spans. Regenerate CLI docs.
@cloutiertyler cloutiertyler force-pushed the drogus/skip-db-in-CLI-commands branch from 01a5bff to f8e0eb8 Compare February 20, 2026 16:24
@cloutiertyler cloutiertyler added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit 19cc87e Feb 20, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments