Skip to content

Ask AI

Ask anything about Destesi — setup, products, APIs.

Powered by Claude. Answers may be wrong — always verify against the docs.

Snap

Snap gives you git branch for your database. Point it at a Postgres database or an S3 bucket, and it hands back an isolated branch with its own connection string. Your apps and agents read and write freely — the source is never touched.

Branches are copy-on-write: nothing is copied when you create one, so a branch is ready in seconds regardless of how big the source is. Data is only duplicated the first time you read or write it, and writes are fully isolated — they never leak back to the source or to another branch.

The fastest path from a Postgres URL to a working branch is a single command. You will need the dst CLI and a Destesi account.

  1. Install the CLI and sign in.

    Terminal window
    curl -fsSL https://get.destesi.io/install.sh | sh
    dst login # opens your browser to authenticate
    dst whoami # confirm you are signed in

    dst ships for Linux and macOS (amd64 / arm64).

  2. Select a workspace.

    Every branch lives in a workspace. Switch to the one you want to work in:

    Terminal window
    dst workspace switch my-team
  3. Branch a database in one shot.

    dst snap try registers the source, creates a branch, waits for it to provision, and prints the connection string:

    Terminal window
    dst snap try postgresql://user:pass@db.example.com:5432/app
    # Registering remote…
    # → registered as conn_a1b2c3d4
    # Creating branch…
    # → branch snap_e5f6g7h8
    # Waiting for branch to provision…
    #
    # Branch ready.
    # branch: snap_e5f6g7h8 (try-20260531-101500)
    # dsn: postgresql://…snap.destesi.io:5432/app
    #
    # Try it:
    # psql "postgresql://…snap.destesi.io:5432/app"
  4. Connect and use it like any Postgres.

    The branch is a real endpoint. Point psql, your ORM, or an AI agent at the DSN:

    Terminal window
    psql "postgresql://…snap.destesi.io:5432/app"
    # db=> INSERT INTO users (name) VALUES ('test'); -- the source is never touched
    # db=> SNAP STATUS; -- summary of your changes

dst snap try is a wrapper over the standard flow. Use the steps directly when you want to reuse a remote, branch from a fixture, or apply masking rules.

  1. Register the source as a remote.

    Terminal window
    # Postgres
    dst snap remote postgres postgresql://user:pass@db.example.com:5432/app
    # Remote added: conn_a1b2c3d4 status=healthy
    # S3-compatible bucket
    dst snap remote s3 my-bucket --region us-east-1
    # Remote added: conn_s3aabbcc status=healthy

    For a database behind a bastion, add --tunnel-mode ssh — see the reference for the full set of tunnel flags.

  2. Create a branch from the remote.

    5432/app
    dst snap create main --connector-id conn_a1b2c3d4
    # Provisioning…
  3. Fork a branch from another branch.

    Forking is git checkout -b for data — both branches stay fully isolated afterward.

    5432/app
    dst snap create agent/migration-test --from-snap snap_e5f6g7h8
  4. Clean up when you are done.

    Terminal window
    dst snap delete snap_e5f6g7h8
    # Branch snap_e5f6g7h8 deleted.

When you branch production data for testing or for an agent, you rarely want the real values. Override rules rewrite specific columns while the branch materializes — redirect every email to your own inbox, flip admin flags off, or filter to a single tenant. Overridden tables are always hydrated synchronously, so a client never sees raw source data before the masks apply.

Terminal window
dst snap create agent/safe-sandbox \
--connector-id conn_a1b2c3d4 \
--override "users.email='me@example.com'" \
--override "users.is_admin=false"

See Concepts for the mental model and the reference for the full rule shape.

Snap is one product in the Destesi suite — one login, one workspace, and a single sign-on session that follows you across every product. The connection strings Snap hands out are short-lived, workspace-scoped endpoints; nothing you create is shared outside your workspace.