Skip to content

feat(cli): rename source API command to api#69

Merged
lentil32 merged 2 commits intomainfrom
fff
Apr 10, 2026
Merged

feat(cli): rename source API command to api#69
lentil32 merged 2 commits intomainfrom
fff

Conversation

@lentil32
Copy link
Copy Markdown
Contributor

One-Line Summary

Rename the top-level source API command from onequery use to onequery api across the CLI, generated examples, and adapter descriptors.

User-Facing Changes

  • onequery api is now the canonical top-level source API command.
  • CLI help, retry guidance, and snapshots now reference onequery api instead of onequery use.
  • Generated source API examples from the CLI server and server adapters now emit onequery api ... commands.
  • onequery org use remains unchanged.

Why This Changed

  • The top-level use verb was too generic and easy to confuse with other command surfaces, especially org use.
  • The old command name was embedded in clap parsing, help text, retry hints, shared CLI example builders, and server-side adapter examples, so a partial rename would leave inconsistent guidance.
  • This change replaces the command in place and intentionally keeps no backward compatibility alias so the CLI has one deterministic source API command name.

How It Changed

  • Replaced the top-level clap/model wiring in apps/cli from Use/UseArgs to Api/ApiArgs.
  • Updated command-path reporting, usage text, parser tests, and snapshots so the CLI advertises onequery api.
  • Updated source API rendering and error guidance so dry-run output, retry hints, and examples all reference onequery api.
  • Renamed shared CLI example helpers in packages/cli-server from buildCliUse* to buildCliApi*.
  • Replaced server adapter example commands in packages/server so descriptor-driven examples stay aligned with the parser.
  • Updated the local just helper from use to api.

Extra Context / Decisions (Optional)

  • No backward compatibility layer was added.
  • README unchanged.

Verification

  • bun run format
  • just fmt
  • cargo test -p onequery-cli
  • bun run --cwd packages/cli-server test -- src/cli-defaults.test.ts src/connect/service/source_api.test.ts
  • bun run --cwd packages/server test -- src/source-api/adapters/amplitude.test.ts src/source-api/adapters/github.test.ts src/source-api/adapters/ga.test.ts src/source-api/adapters/mongodb.test.ts src/source-api/adapters/mixpanel.test.ts src/source-api/adapters/posthog.test.ts src/source-api/adapters/sentry.test.ts

Video / Screenshot (Optional)

  • N/A

@lentil32 lentil32 requested a review from siisee11 as a code owner April 10, 2026 08:43
@lentil32 lentil32 merged commit 261eaf9 into main Apr 10, 2026
8 checks passed
@lentil32 lentil32 deleted the fff branch April 10, 2026 08:52
lentil32 added a commit that referenced this pull request Apr 10, 2026
You can install any of these versions: `npm install -g @onequery/cli@<version>`
## [0.1.23] - 2026-04-10
### 🚀 Features

- Readme self host priority (#68)
- *(cli)* Rename source API command to api (#69)
<!-- generated - do not edit -->
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