Quickstart

Deploy your first app in 5 minutes. Install the CLI, sign in, and ship.

1

Install the CLI

The Leash CLI is a single binary. Install it with one command — works on macOS, Linux, and WSL.

Terminal

$ curl -fsSL https://leash.build/install.sh | sh

Learn more: CLI Installation
2

Sign in

Opens your browser to authenticate with Google. Once you sign in, a token is stored locally so you stay logged in.

Terminal

$ leash login

Learn more: Authentication
3

Initialize the project

Creates an app on Leash and writes .leash/config.json. Commit that file — your teammates run leash dev immediately on clone.

Terminal

$ leash init

Learn more: Command Reference
4

Run dev with secrets

leash dev runs your dev server with the org-configured secrets injected as env vars — no .env file to share, no copy-paste between teammates. Configure the secrets once at /dashboard/organization/secrets, then everyone gets them on demand.

Terminal

$ leash dev

Learn more: Environment Variables
5

Deploy your app

Leash auto-detects your framework — Next.js, Flask, Express, Go, Docker, or plain HTML. It runs preflight checks locally, syncs the latest secrets, then builds and deploys. Your app gets a URL like https://my-app.un.leash.build.

Terminal

$ leash deploy

Learn more: Deploy Overview
6

Add a database(optional)

Two ways to give your app a database.

Option A: Managed by Leash

If your app uses pg, prisma, psycopg, or pgx, Leash auto-detects it during deploy and offers to provision a managed Postgres database. The connection string is injected as DATABASE_URL.

Terminal

# During deploy, Leash detects database dependencies:

Detected database dependency: pg

Create a managed Postgres database? (Y/n) y

✓ Database provisioned. DATABASE_URL injected.

Option B: Bring your own

Already using Supabase, Neon, PlanetScale, or any other database? Just set the connection string as an environment variable.

Set DATABASE_URL in your app's Environment tab on the dashboard.

Learn more: Databases
5

Connect an integration(optional)

Integrations require two packages: the Leash SDK (base) and a typed integration package for the provider you want to use. Users connect their accounts on the dashboard — your code just calls the API.

1. Install the SDK + integration package

Terminal

$ npm install @leash/sdk @leash/integration-linear

2. Use it in your app

app.ts
import { LeashIntegrations } from '@leash/sdk'
import { createLinearClient } from '@leash/integration-linear'
const leash = new LeashIntegrations()
const linear = createLinearClient(leash)
const issues = await linear.listIssues({ teamId: 'ENG' })