Expose Preview Branch anon key via CLI
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start by locating the CLI implementation for supabase branches get and the code that retrieves preview branch details. Trace how branch API keys are exposed by the dashboard or service, then add a command or option that returns the preview branch anon key. Done means the command can retrieve the key non-interactively for a specified branch ID.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
We're creating preview branches for development through a script on the command line. I am able to retrieve all the preview branch details, like the jwt secret, but I am not able to retrieve the anon key via the CLI. We need the anon key to spin up a development server
Describe the solution you'd like
Ideally I would like to use a command like supabase branches get-api-keys <branch_id> that returns the api keys that we can use to spin up a development server.
Describe alternatives you've considered
I tried using the jwt secret returned by supabase branches get <branch_id> to create an anon key, but I wasn't able to create a working anon key even though I followed the directions here and was able to create a similar anon key than the one that is exposed on the dashboard:
https://stackoverflow.com/questions/74587078/any-way-to-generate-supabase-anon-key-and-jwt-secret-locally
Additional context
We need this to be automated and can't copy the anon key manually from the preview branch dashboard.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 526
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 321
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/cli
-
🐛 Bug supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
config diff reports api.enabled = true after config push disables the Data API (pg_pgrst_no_exposed_schemas)Possibly taken @7ttp claimed this 1 day ago. Open🐛 Bug supabase/cli
supabase/cli#6932 · 1 assignee ·
Maintainers usually reply within 1 day
-
supabase db reset intermittently fails: temporary Realtime init job races with the running Realtime service on "schema_migrations_pkey"Possibly taken @7ttp claimed this 2 days ago. Open🐛 Bug supabase/cli
supabase/cli#6915 · 1 assignee ·
Maintainers usually reply within 1 day
-
🐛 Bug supabase/cli
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
🐛 Bug supabase/cli
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aiko-chan-ai/DiscordBotClient#380 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vercel/ai-elements#507 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 Half a day Newbie friendliness 84/100
anaclumos/qa-interns#148 · 1 comment ·
Maintainers usually reply within 1 day