---
title: "Supabase CLI"
description: "Supabase announces its CLI as the first step toward running Supabase locally, managing database migrations, generating types and API or validation schemas from a database, managing projects, and eventually pushing local changes to production. The local stack runs through Docker Compose, using tools described as 100% compatible with every Supabase project, and a React setup can initialize it with supabase init before supabase start. For schema changes, the post favors database diffing over accumulating manual SQL migrations and adds a CLI mode and Docker image for pgAdmin Schema Diff, which tracks view-owner changes needed for Row Level Security and handles domains. The supabase eject command outputs Docker Compose, Kong, and Postgres configuration for self-hosting. An update dated 15 August 2022 states that CLI V1 is generally available and that a Management API is in beta."
---

# Supabase CLI

[Supabase](https://yomu.fyi/company/supabase) · Bobbie Soedirgo · Mar 31, 2021

**Type:** Announcement

## Summary

Supabase announces its CLI as the first step toward running Supabase locally, managing database migrations, generating types and API or validation schemas from a database, managing projects, and eventually pushing local changes to production. The local stack runs through Docker Compose, using tools described as 100% compatible with every Supabase project, and a React setup can initialize it with supabase init before supabase start. For schema changes, the post favors database diffing over accumulating manual SQL migrations and adds a CLI mode and Docker image for pgAdmin Schema Diff, which tracks view-owner changes needed for Row Level Security and handles domains. The supabase eject command outputs Docker Compose, Kong, and Postgres configuration for self-hosting. An update dated 15 August 2022 states that CLI V1 is generally available and that a Management API is in beta.

## Context

The CLI is intended to support local Supabase development, database schema changes, management of Supabase projects, future promotion of local changes to production, and self-hosting. The post identifies accumulating manual migration scripts and handling database-diff edge cases as challenges, including view-owner changes relevant to Row Level Security.

## Approach / What changed

The CLI runs Supabase locally with Docker Compose and provides commands such as supabase init, supabase start, and supabase eject. For schema changes, Supabase created a CLI mode for pgAdmin Schema Diff and released a Docker image, allowing databases to be compared through connection strings. The diff supports object and schema selection, while eject produces Docker Compose, Kong, and Postgres configuration for self-hosting.

## Takeaways

- Supabase’s local setup uses Docker Compose, and the post says its local-development tools are 100% compatible with every Supabase project.
- Supabase selected pgAdmin Schema Diff because it tracks view-owner changes required for Row Level Security on views; a CLI mode and Docker image were added because the original tool was GUI-only.
- The supabase eject command produces docker-compose.yml plus kong and postgres directories, allowing the stack to be started with docker compose up and adapted to an existing Postgres database.

**Tags:** [Developer Experience](https://yomu.fyi/topic/developer-experience), [Docker](https://yomu.fyi/topic/docker), [Migrations](https://yomu.fyi/topic/migration), [Open Source](https://yomu.fyi/topic/open-source), [Postgres](https://yomu.fyi/topic/postgres)

- Source: [Supabase](https://supabase.com/blog/supabase-cli)
- Source URL: https://supabase.com/blog/supabase-cli
- Ingested by Yomu: 2026-08-27T14:40:45.392Z

[Read original post](https://supabase.com/blog/supabase-cli)
