Hard to tell which remote supabase is linked

Open
#3,910 13 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
postgresql, typescript
Domain
cli, databases

Research direction

Start by tracing the CLI entry points for supabase db info --linked, supabase db reset --linked, and supabase db push --linked, then inspect how linked project metadata is obtained. Done means the linked instance's URL and name are clearly shown for the requested command or relevant confirmation prompt, with tests covering the displayed identity.

Written by the indexing model from the issue text.

Description

✨ Feature supabase/cli

Is your feature request related to a problem? Please describe.
When I run npx supabase db reset --linked I want to be sure I'm currently linked to my staging instance and not production. Otherwise I risk accidentally torching the wrong database.

Describe the solution you'd like
Add the command supabase db info --linked which prints the currently linked instance's URL and name.

Describe alternatives you've considered
I've used npx supabase link to relink the project (but for example I have 3 projects show up when I run that so just running that and aborting doesn't give me confidence in an answer).

I've also used npx supabase db push --linked to differentiate staging from production (when I expect a difference in which migrations have run on my instances).

Additional context
Maybe npx supabase db reset --linked should print the remote databases URL or name instead of just saying "Do you want to reset the remote database? [y/N]"

And ditto for npx supabase db push --linked

Dominant language
TypeScript
Stars
2.4k
Forks
523
Avg merge
21h 33m
Merged PRs (30d)
258

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/cli

All issues in supabase/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.