Skip to content

Install with your coding agent

One command connects your app and its coding agent to a project: keys, the MCP server, the agent's skills, a machine client for your backend and typed tables.

Applies to EngineCloud
View as Markdown
On this page
  1. Paste this into your agent
  2. What init does
  3. Which ORM
  4. Without init
  5. What to ask for next

Everything in Sypnia Data can be done without a screen, so your coding agent can set up and run your backend. One command connects the app in the current folder, and the agent working on it, to your project. The console shows the same steps, ready to copy, on every project’s home («Connect your agent»).

Paste this into your agent

Text
Connect this app to my Sypnia Data project (<ref>).
1. In the app's folder run: npx @sypnia/data init --project <ref>
   If the app has a backend, add --server. If we will work use case first (Sypnorm and Sypnia Cases), add --cases; otherwise it asks which ORM, if any.
   It shows a code: give it to me and I approve it in the browser. Never ask me for keys or passwords.
2. Use the MCP server https://mcp.data.sypnia.com (init added it to .mcp.json / .cursor/mcp.json).
3. Read .claude/skills/sypnia-data/SKILL.md (and sypnia-cases if it was installed) before touching the database. With Cases, create and link the Cases project with the Cases MCP tools.
4. Before writing code, propose the app's flows: who does what, which tables each one touches and how it can fail. Then create the tables with migrations and row-level security.

What init does

Terminal
npx @sypnia/data init --project <ref> [--server] [--cases | --no-cases | --orm none|sql|prisma|drizzle] [--agent claude,cursor,other|all] [--env-file .env.local] [--no-pull] [--no-install] [--yes]
  1. Signs the machine in with your Sypnia account through the device flow: it prints an address and a code, and you approve in the browser. The session is bound to a key that never leaves the machine (~/.config/sypnia/, mode 600), has data:read data:write offline_access, and lasts until you revoke it (Account → Agents and devices).
  2. Picks the project: --project <ref>, the only one you have, or it asks.
  3. Writes the app’s settings to .env.local (--env-file to choose another): SYPNIA_URL and SYPNIA_PUBLISHABLE_KEY. A key that already has a different value is kept, never overwritten.
  4. With --server, creates a machine client for your backend: private_key_jwt with DPoP. The private key is written to .sypnia/client-key.json (mode 600, added to .gitignore) and only SYPNIA_CLIENT_ID goes to the env file.
  5. Connects the agent’s MCP: .mcp.json for Claude Code and .cursor/mcp.json for Cursor, with the MCP server https://mcp.data.sypnia.com. The first call opens the browser to approve the client.
  6. Installs the agent’s skills into .claude/skills/: sypnia-data (the data layer: Data API, SQL, row-level security, transactions, machines, MCP, and notes for your ORM). It also adds a section to AGENTS.md for agents other than Claude.
  7. Asks whether the app will use Sypnorm and Sypnia Cases (--cases or --no-cases). With Cases it installs @sypnia/cases in the app with its own package manager (npm, pnpm, yarn or bun; --no-install skips it, and an app that already has it is left alone), installs the sypnia-cases skill and writes src/use-cases/, one file per use case for @sypnia/cases/sypnorm. Once there is code, npx @sypnia/cases map --upload --project <ref> sends the map to the project’s Use cases, and, once the project is linked to a Cases map, to that map as a draft proposal. To keep the map in a Cases project, your coding agent, signed in with the same Sypnia account, adds the Cases MCP server https://mcp.cases.sypnia.com and creates and links the project with the Cases MCP tools: create_project, link_data_project, then upload_map (Linking Data and Cases). Without Cases it asks which ORM, if any.
  8. Records the choices in sypnia.toml at the root of the repository, the project’s one configuration file for every Sypnia product: the project at the top, and the address, MCP, ORM and Cases in its [data] table. Nothing secret goes there, and init touches only project and [data]. pull and migrate read their defaults from it.
  9. Pulls the types into src/db/schema.gen.ts (not with Prisma or Drizzle, which generate their own).

Running it again changes only what is missing. With --yes it never asks: no Cases and no ORM unless you pass --cases or --orm.

Which ORM

Sypnia Data is only the data layer: use the ORM you want, or none.

ChoiceHow the app reaches the data
none (--orm none)the Sypnia client over the Data API, with row-level security, on every project
plain SQL (--orm sql)a driver with a direct URL, or the SQL endpoint from a server
Prisma, Drizzlea direct postgres:// URL: a project with your own Postgres or a dedicated database. Managed shared projects have no direct URL.
Sypnorm (--cases)Sypnia’s use-case ORM, part of Sypnia Cases (@sypnia/cases/sypnorm); it runs over the Data API, and a case other cases listen to runs in its area’s service

Without init

  • Only the session: npx @sypnia/data login. With it, pull and migrate work on your Cloud projects through the Cloud API, with your organization role.
  • Only the MCP server: claude mcp add --transport http sypnia https://mcp.data.sypnia.com, or the same address in .cursor/mcp.json.
  • The skills as a Claude Code plugin for every project on your machine: /plugin marketplace add sespinosav/sypnia-skills, then /plugin install sypnia@sypnia (the repository is private until launch).

What to ask for next

  • «Create a bookings table with row-level security so each customer sees only their bookings.»
  • «Add a server job that closes the month with the backend’s machine client.»
  • «Tell me which tables have no policy.»

The agent works through the same API you would, under the scopes you approved. Every change it makes is in the project’s audit log.

  1. Paste this into your agent
  2. What init does
  3. Which ORM
  4. Without init
  5. What to ask for next

    Search pages, sections and terms