Introduction
Mantis is a hosted Postgres backend for AI coding agents — Claude Code, Codex, Cursor, Windsurf, Cline, and Antigravity. Your agent gets a backend it can't break.
You describe the app; your agent builds it. Mantis gives your agent a Postgres 17 database per
branch, a typed client, live queries, built-in auth, pgvector hybrid search, file and HLS video
storage, and declarative webhooks and crons — while making sure nothing it does to main is
permanent until a person says so.
How it keeps the backend safe
- Branches & snapshots. A branch is a full copy of
main, schema and data. Save named snapshots before risky scripts, restore them instantly, or reset any branch back to its parent. - Schema & mass-write guardrails. On
main, dropping a table or column, changing a type, loosening an access rule, or running an unfiltered or bulk update/delete (write guardrails) is held until someone on your team approves it in the dashboard. Safe steps apply at once. - Scoped agent keys & activity feed. Give coding agents an
agent(mk_agent_) orbranch_only(mk_branch_) key that can never write tomain. Every action is logged in the Agent Activity Feed with 1-click Rewind. - Rewind. Every write is recorded. Preview and rewind a branch, a table, or a single row back to any timestamp, or undo the latest migration with its dropped data brought back.
- GitHub PR previews.
npx shipmantis ci initprovisions an isolatedpr-<n>branch per pull request, posts a schema safety comment, and cleans up on close.
The pieces
| Piece | What it is |
|---|---|
npx shipmantis@latest init | Signs you in, picks a project, writes keys to .env.local, and configures Claude Code, Codex, Cursor, Windsurf, Cline, and Antigravity. |
@shipmantis/sdk | TypeScript schema DSL (tables, pgvector, rules, guardrails, webhooks, crons), typed client, live queries (useQuery), built-in auth (client.auth, useUser), and files. |
| Video | HLS packages made by your own ffmpeg, stored as one entry each and played from public or signed links. |
| The 19 MCP tools | What your agent uses to read schemas, plan and apply migrations, branch, snapshot, reset, rewind, inspect activity and webhooks, trigger crons, and query data. |
| The CLI | Every operation in a terminal: push, branch, snapshot, activity, ci init, pr-check, rewind, undo, connect, video. |
| The dashboard | Approve held schema changes and mass writes, browse tables and end-users, inspect activity, replay webhooks, run crons, manage snapshots, and rewind. |
Where things run
Your app talks to one URL, https://data.shipmantis.com, using one of four key kinds:
- Secret (
mk_secret_…) stays on your server. Full access to schema, branches, rewind, and rows. - Publishable (
mk_pub_…) is safe in a browser. Queries, built-in auth, and storage only, enforced by your access rules. - Agent (
mk_agent_…) is for coding agents. Attributed asagentin the activity feed; schema drops, mass writes, and rewinds onmainare held for human approval. - Branch-only (
mk_branch_…) is for sandboxed agents and CI. Full read/write on non-mainbranches; writes and schema changes onmainare refused.
Quickstart
From an empty folder to a typed query in five minutes.
Write guardrails
Hold unfiltered or bulk updates and deletes on main for approval.
Authentication
Built-in email/password & OTP auth, or Clerk, Auth.js, and Supabase.
Vector search
pgvector columns, HNSW indexes, and hybrid .similarTo() queries.