Cleanup#6
Merged
Merged
Conversation
We already have one in supabase/.github
- set up husky, prettier, jest - remove tslint (it's deprecated) - set up tsconfig.json
- for `dev`, run the CLI directly with `ts-node` - for `prod`, compile to `dist` and run `node dist/cli.js`
- `types.ts` (currently empty) - `extensions` (unused)
- clean up code - use spinners for `init`/`start`/`stop` - spruce up `--help` (following vercel's style mostly)
Need tokens: `GITHUB_TOKEN` & `NPM_TOKEN`
Fits better with the logo.
dumko2001
pushed a commit
to dumko2001/cli
that referenced
this pull request
Mar 15, 2026
kallebysantos
pushed a commit
to kallebysantos/supabase-cli
that referenced
this pull request
May 6, 2026
…ase#6) ## Summary This PR introduces a new generated `@supabase/api` package for the Supabase Management API and rewires the CLI `platform` command surface to build dynamically from that SDK + exported OpenAPI metadata instead of relying on a checked-in generated command tree. On the CLI side, this keeps `@supabase/api` focused on typed SDK concerns while letting `@supabase/cli` own command naming, UX, schema/dry-run behavior, and output formatting. ## What changed ### `@supabase/api` - adds a new generated Management API SDK package - generates and exports: - typed contracts / schemas - `operationDefinitions` - generated Effect operations - runtime-specific clients for `bun` and `node` - raw `openapi.json` - `openApiOperationIdMap` for joining raw OpenAPI operations back to SDK operation ids - replaces the previous large handwritten `v1.d.ts`-style surface with generated SDK artifacts and runtime clients - adds tests around public entrypoints and client behavior ### CLI `platform` commands - replaces the old CLI-side OpenAPI/codegen pipeline with a dynamic runtime-generated `platform` tree - builds platform command metadata from: - `@supabase/api/openapi.json` - `openApiOperationIdMap` - SDK operation definitions / execution - removes the need for a checked-in generated forest of platform command files - adds CLI-owned command path normalization and conflict detection - covers all supported platform operations, including previously missing bulk endpoints ### Request/input/schema UX - supports richer request body handling: - JSON object bodies via `--json` - non-object JSON / multipart / binary / urlencoded bodies via `--body` - path/query/header input via `--params` - improves schema inspection and dry-run flows - fixes string-only OpenAPI unions so fields like `branch_id_or_ref` prompt as plain text instead of JSON - improves platform input errors so suggestions point to the exact command and `--schema` usage - fixes misleading `--json` guidance for params-only commands ### Text output / interaction polish - removes noisy generic success banners where they don’t add value - adds a task/spinner-style output abstraction in the CLI output layer - improves multiline task completion rendering so continuation lines keep the left guide rail - makes text-mode dry-run output neutral by rendering the preview directly without a success banner ### Docs and test coverage - adds documentation for how dynamic platform command generation works - adds metadata, tree, input, schema, body-shape, integration, and e2e coverage for the new platform flow ## Why - keep `@supabase/api` as the single typed Management API SDK - avoid duplicating OpenAPI parsing / generation logic inside the CLI - make platform command ownership clearer in `@supabase/cli` - improve maintainability by replacing hundreds of generated command files with a smaller runtime metadata pipeline - improve command UX around prompting, dry-run, schema inspection, and output formatting ## Testing Validated with workspace checks and targeted tests across `packages/api` and `apps/cli`, including: - typecheck / lint / format / knip - `packages/api` tests - CLI core tests for platform metadata, input handling, schema output, tree construction, and body handling - targeted platform e2e coverage for normalized commands and dry-run behavior ## Notes - `@supabase/api` stays SDK-focused; CLI-specific metadata generation was intentionally not added there - the CLI continues to own public command naming and UX decisions for `platform`
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Chore.
What is the new behavior?
Sorry about the big PR! A bit difficult to split this up 😅
Changes are split into multiple commits for ease of review:
chore: remove CONTRIBUTING.md
We already have one in supabase/.github
chore: update misc. project stuff
refactor: remove
bin/supabasedev, run the CLI directly withts-nodeprod, compile todistwithnpm run buildand runnpm run startchore: remove some unused stuff
types.ts(currently empty)extensions(unused)refactor: rename
dev->startrefactor: spruce up the CLI a bit
init/start/stop--help(following vercel's style mostly)test: update test
chore(build): set up GitHub Actions
Need secrets:
GITHUB_TOKEN&NPM_TOKEN