Skip to main content
The Supabase CLI is a powerful command-line tool that enables you to run the entire Supabase stack locally on your machine or in CI environments. It provides essential tools for local development, database migrations, type generation, and deployment workflows.

What is the Supabase CLI?

The Supabase CLI allows you to:
  • Run Supabase locally: Develop your project entirely on your local machine using Docker containers
  • Manage database migrations: Track and version your database schema changes with migration files
  • Generate TypeScript types: Automatically create type definitions from your database schema
  • Deploy to production: Push your local changes to the Supabase Platform
  • Set up CI/CD workflows: Integrate Supabase into your automated testing and deployment pipelines
The CLI uses Docker containers to manage the local development stack, so you’ll need Docker Desktop or a compatible container runtime installed.

Key Features

Local Development Stack

With just two commands, you can set up and start a complete local Supabase environment:
This gives you access to:
  • PostgreSQL database: Full Postgres instance with extensions
  • Studio: Web-based database management interface
  • API Gateway: Kong-based gateway for REST, Realtime, Storage, and Auth
  • PostgREST: Automatic REST API from your database schema
  • GoTrue: Authentication and user management
  • Realtime: WebSocket-based subscriptions
  • Storage: Object storage for files
  • Mailpit: Email testing interface for auth emails

Database Migration Management

The CLI provides a complete migration workflow:

Learn More

Explore database migration workflows and best practices

Type Generation

Automatically generate TypeScript types from your database schema:
This ensures type safety across your entire application and keeps your types in sync with your database.

Testing and Linting

The CLI includes tools for testing and linting your database:

Quick Start

Get started with the Supabase CLI in minutes:
1

Install the CLI

Install the Supabase CLI using your preferred package manager.
2

Initialize your project

Create a new Supabase project in your current directory.
3

Start local services

Launch the entire Supabase stack locally.

Installation Guide

View detailed installation instructions for all platforms

Available Services

When you run supabase start, you’ll see output with URLs and credentials for all services:

Studio

Access at http://localhost:54323 for visual database management

API Gateway

Access at http://localhost:54321 for REST, Realtime, Storage, and Auth

Database

Connect via postgresql://postgres:postgres@localhost:54322/postgres

Mailpit

Access at http://localhost:54324 to test authentication emails

Common Commands

Here are the most commonly used CLI commands:
Use supabase --help or supabase <command> --help to see all available commands and options.

Next Steps

Installation

Install the CLI on your platform

Local Development

Set up your local development environment

Migrations

Learn how to manage database migrations

Deployment

Deploy your project to production

Resources

CLI Reference

Complete CLI command reference

GitHub Repository

View the source code and contribute

GitHub Action

Integrate with GitHub Actions

Community Support

Get help from the community