-
Notifications
You must be signed in to change notification settings - Fork 271
feat: add Gemini CLI extension for Supabase #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
6fb521d
c077357
3c8c1b3
e084300
f74e9dc
93d64a3
afcd6d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Supabase extension for Gemini CLI | ||
|
|
||
| ## Overview | ||
|
|
||
| This extension allows you to access your Supabase projects and perform tasks like managing tables, fetching config, and querying data. | ||
|
|
||
| **Key capabilities**: Execute SQL, manage migrations, deploy functions, generate TypeScript types, access logs, and search documentation. | ||
|
|
||
| ## Best Practices | ||
|
|
||
| **Security defaults** | ||
| - Use read-only mode (`?read_only=true`) to prevent accidental writes | ||
| - Scope to specific projects (`?project_ref=<project-ref>`) to limit access | ||
| - Limit tool access with feature groups (`?features=docs%2Caccount%2Cdatabase%2Cdebugging%2Cdevelopment`) | ||
| - Available groups: `account`, `docs`, `database`, `debugging`, `development`, `functions`, `storage`, `branching` | ||
| - Avoid connecting to production databases even in read-only mode | ||
|
||
|
|
||
| **Schema management** | ||
| - Use `apply_migration` for schema changes (CREATE/ALTER/DROP tables) - these are tracked | ||
| - Use `execute_sql` for queries and data operations (SELECT/INSERT/UPDATE/DELETE) - these are not tracked | ||
| - Always specify schemas explicitly: `public.users` instead of `users` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **Common errors** | ||
| - "permission denied": Remove `read_only=true` for write operations | ||
| - "relation does not exist": Use `list_tables` to verify table names and schemas | ||
| - "Not authenticated": Restart MCP connection and verify organization access | ||
| - Migration conflicts: Check `list_migrations` history before applying new migrations | ||
|
|
||
| **Using logs for debugging** | ||
| - Use `get_logs` to view service logs when certain action fails | ||
| - Available log types: `api`, `branch-action`, `postgres`, `edge-function`, `auth`, `storage`, `realtime` | ||
| - Check Postgres logs to see slow queries, errors, or connection issues | ||
| - Review API logs to debug PostgREST endpoint failures or RLS policy issues | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "name": "supabase", | ||
| "description": "Access your Supabase projects and perform tasks like managing tables, fetching config, and querying data.", | ||
| "version": "0.5.9", | ||
| "contextFileName": "SUPABASE.md", | ||
| "mcpServers": { | ||
| "supabase": { | ||
| "httpUrl": "https://mcp.supabase.com/mcp" | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.