DrDroid
Resource Cheatsheet

Supabase Edge Functions

Quick reference guide and commands for Supabase Edge Functions.

Download PDF

Installation

npm install -g supabase
Install Supabase CLI globally

brew install supabase/tap/supabase
Install Supabase CLI with Homebrew (macOS)

Authentication

supabase login
Authenticate CLI with Supabase account

supabase link --project-ref
Link local project to remote Supabase project

Function Management

supabase functions new
Create a new Edge Function

supabase functions deploy
Deploy an Edge Function

supabase functions delete
Delete an Edge Function

supabase functions list
List all deployed Edge Functions

Local Development

supabase start
Start local Supabase development environment

supabase functions serve
Serve Edge Functions locally for development

supabase functions serve --no-verify-jwt
Serve functions without JWT verification

supabase stop
Stop local Supabase development environment

Testing and Debugging

curl -X POST 'http://localhost:54321/functions/v1/'
Test function locally with curl

curl -X POST 'https://.supabase.co/functions/v1/'
Test deployed function with curl

supabase functions logs --fn-name
View logs for a specific function

Environment Variables

supabase secrets set NAME=VALUE
Set environment variable for Edge Functions

supabase secrets list
List all environment variables