Skip to content
StitchDB Docs
Get startedDatabaseAuthenticationREST APIRealtimeStorageEdge FunctionsCLISDKsPlatformPlatformsAI agentsAI tools & MCP
/
Sign in
CLIAll products
  • Overview
Get started
  • Install and log in
Guides
  • Local development
  • Migrations
  • TypeScript types
  • Edge Functions
  • CI and GitHub Actions
Reference
  • Command reference
  1. Docs
  2. CLI

CLI

The stitchdb command line tool: local development, migrations, TypeScript types, Edge Functions, secrets and preview branches.

The stitchdb CLI runs your whole project on your machine, keeps your schema in migration files next to your code, and deploys migrations and functions to StitchDB from your terminal or CI.

Terminal
npm install -g stitchdb-cli
stitchdb login
stitchdb init
stitchdb link --project-ref <project-ref>

Install and log in

Install the CLI and connect it to your account with an access token.

Local development

Postgres, Auth, REST, Realtime, Storage, Edge Functions and a local Studio on your machine.

Migrations

Write schema changes as SQL files and push them to your project.

TypeScript types

Generate a Database type for stitchdb-js from your schema.

Edge Functions

Create, serve locally and deploy functions; manage secrets.

CI and GitHub Actions

A preview branch for every pull request, production deploys on merge.

Import from Postgres

stitchdb import: copy another Postgres database into a project, live or once.

Was this helpful?
Previous product: Edge FunctionsEdge Function limitsNextInstall and log in
StitchDB

The complete backend for your app. Database, auth, APIs, storage, realtime and functions, plus push, purchases, analytics and crash reports, in one project.

Products

  • Database
  • Authentication
  • REST API
  • Realtime
  • Storage
  • Edge Functions
  • Studio

Developers

  • Documentation
  • Quickstart
  • SDKs
  • REST API reference
  • AI agents
  • Plans and limits

Platform

  • Pricing
  • Why StitchDB
  • Security
  • Status
  • Dashboard

Account

  • Sign in
  • Sign up
  • Account settings
  • Support

Legal

  • Terms
  • Privacy
  • Acceptable use
  • DPA
  • Subprocessors
  • Cookies
  • Contact
© 2026 StitchDB