• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 38243705153
67%
develop: 46%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/develop/pr-7380-74d4774766936b6e6141a58d061c3396a01c85c9
DEFAULT BRANCH: develop
Ran 12 Oct 2026 11:37AM UTC
Jobs 1
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Oct 2026 11:35AM UTC coverage: 66.737%. Remained the same
38243705153

push

github

web-flow
chore(cli): add command permission model and completeness test (#6993)

## Summary

Scoped personal access tokens let a user pick exactly which permissions
a token gets. For that to be useful, a user needs to know what a given
CLI command actually needs before creating a token — today the CLI can't
answer that at all. This work builds the mapping from every command (and
its flags) to the Management API permissions it needs, plus tests that
keep that mapping from drifting as the code changes. See
[CLI-2474](https://linear.app/supabase/issue/CLI-2474).

This is the first of several PRs. This one is pure foundation — no
command is mapped yet.

## What's in this PR

- The data model for a command's permission mapping (plain, serializable
data), and a `withPermissions` combinator that attaches a command's
declaration to the `Command` itself. The command tree is the single
registry, so a declaration sits next to the command it describes and any
future docs or help feature reads it straight off the command.
- A spec-backed operation matcher (FGA permissions and OAuth scope) and
a drift-assertion test helper that later PRs will use to check a
command's declared mapping against its real API calls.
- A completeness test that walks the real CLI command tree for both
stack backends and fails if any command or flag isn't accounted for.
- A central list of commands still pending a declaration, so the
completeness test passes until each batch lands. Follow-up PRs shrink
it, and the last one deletes it.

Nothing in the shipped CLI imports these modules yet, so this PR doesn't
change the bundle.

Follow-up PRs will map the shared logic several commands reuse, then the
remaining commands in batches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

4097 of 6139 relevant lines covered (66.74%)

7.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38243705153.1 12 Oct 2026 11:37AM UTC 79
66.74
GitHub Action Run
Source Files on build 38243705153
  • Tree
  • List 79
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38243705153
  • b7c8b85f on github
  • Prev Build on gh-readonly-queue/develop/pr-7091-7d2d47b2929b64a1a7b9b510ce77eba7ca5e204c (#38241257856)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc