Skip to content

feat: shorter CLI forms for selection, global flags, JSON output, scope targets and cursors - #980

Merged
kvlonge merged 1 commit into
mainfrom
feat/cli-ceremony
Oct 6, 2026
Merged

kvlonge merged 1 commit into
mainfrom
feat/cli-ceremony

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

Several CLI forms needed typing the tool could work out: global flags only worked before the subcommand, selection needed --select, lineage and query lacked --json, sqb scope required kind prefixes even for unique names, and cursor overrides needed type-specific flags.

Changes

  • --project-dir, --no-color and --debug work before or after the subcommand (under sqb dbt, --project-dir still goes before dbt).
  • compile, plan, build, test, seed, freshness, audit and check take selectors as positional arguments, combined with --select.
  • --json on lineage and query (shorthand for --format json).
  • sqb scope accepts bare model, source, seed and function names; declaration kinds that can share names keep their prefix, with C960 showing the prefixed form.
  • --start-cursor / --end-cursor on build, plan and load, typed from the selected models; mixed cursor types fail with S303. The -ts / -int flags still work.
  • CLI docs, selectors, quickstart, waffle-shop README and the bundled skill updated.

Verification

  • Unit and E2E tests for each form; focused pytest (416 passed), ruff, fensu check and make check-ci.
  • Compared with 0.134.8 on a large real project: 16 selectors (paths, tags, intersections, unions, exclusions, graph operators, globs) select the same models, functions and seeds with the same diagnostics, and positional selectors match --select.

…pe targets and cursors

Accept --project-dir, --no-color and --debug after the subcommand as well as
before it. Treat positional arguments to compile, plan, build, test, seed,
freshness, audit and check as selectors, combined with any --select values.
Add --json as shorthand for --format json on lineage and query. Let sqb scope
take bare model, source, seed and function names, resolved with the shared
target resolver; macros, enums, constants, tests and audits keep their prefix
and fail with C960 when written bare. Add --start-cursor and --end-cursor to
build, plan and load, typed from the selected models' cursor type; a
selection mixing timestamp and integer cursors fails with S303. The -ts and
-int flags keep working.
@kvlonge
kvlonge enabled auto-merge (squash) October 6, 2026 14:08
@kvlonge
kvlonge merged commit e9a7aa1 into main Oct 6, 2026
32 checks passed
@kvlonge
kvlonge deleted the feat/cli-ceremony branch October 6, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant