For the complete documentation index, see llms.txt. Every page is also served as Markdown at its URL followed by .md.

standards
Quick startIntroduction

Quick start

Five minutes from an empty workspace to a typed record, with one API key, one object, one sync and one write.


You need a Standards workspace, Node 22 or newer, and a terminal. Everything below runs on a server or on your machine, never in a browser.

Create an API key

In the Standards app, open the API keys area and create one. Copy the secret when it appears; it is shown once. The key acts with your access (never more than its role, member by default); syncing a schema needs architect:update, so create it with a role that grants it.

export STANDARDS_API_KEY=stndrds_your_api_key

Keep the key in an environment variable. createStandards refuses an API key inside browser code.

Install the SDK

pnpm add @standards/client

One package: the builders, bundle, createStandards and the error classes are all exported from @standards/client.

Declare an object

src/standards/schema.ts
import { bundle, content, listView, object, query, select, text } from "@standards/client";

export const incident = object("incidents", "Incident")
  .attribute(text("title", "Title").required())
  .attribute(
    select("severity", "Severity").options([
      { value: "minor", label: "Minor" },
      { value: "major", label: "Major" },
    ]),
  )
  .labelExpression("{{ title }}");

export const incidentList = listView("incidents_list", "Incidents")
  .for("incidents")
  .default()
  .tab("all", "All", content.collection(query("incidents")).table().columns("title", "severity"))
  .build();

export const quickstart = bundle("quickstart", "Quickstart").add(incident, incidentList);

One file holds your schema. .labelExpression() is mandatory: it is how a record is displayed in lists and relations, and build() throws without it. The list view is what the app opens on: an object synced without one has no screen in the app until you declare it (see Views).

Sync it

src/standards/client.ts
import { createStandards } from "@standards/client";
import { quickstart } from "./schema";

export const standards = createStandards({
  baseUrl: "https://api.standards.new/v1",
  apiKey: process.env.STANDARDS_API_KEY!,
  bundles: [quickstart],
});

const result = await standards.bundles.sync(quickstart);
// first run:  { applied: true,  hash: "3f9c…" }
// no change:  { applied: false, hash: "3f9c…" }  one GET, nothing written

Open the app. incidents now has its table, with your two attributes as columns. Objects a bundle declares are system objects: your users can add attributes and views on top, but cannot delete or retype yours. Try it now: on the object, use Add attribute to add a resolvedAt date, then save the table filtered on it as a new view. Run the sync again: { applied: false }, and both are still there.

Write and read a record

const incidents = standards.incidents;

await incidents.create({ title: "API latency", severity: "major" });

const { records } = await incidents
  .eq("severity", "major")
  .orderBy("createdAt", "desc")
  .limit(10)
  .fetch();

Passing bundles to createStandards gives you one typed query per object, keyed by the camelCase of its name. severity only accepts "minor" or "major"; TypeScript tells you before the API does. Every record comes back with createdAt and updatedAt revived as Date.

Every release typechecks this quickstart against the packages it is about to publish, installed as tarballs outside the repository, before any of them reaches npm.

The same object, from the other doors

You did not build an API. It is already there, and the CLI and MCP see the object you just synced.

From the CLI, save the instance once, then list the records:

standards login --url https://api.standards.new/v1 --name prod --key stndrds_your_api_key
standards records list incidents --format table

From an agent, connect Claude Code to the workspace, then ask it to list the major incidents:

claude mcp add --transport http standards https://api.standards.new/v1/mcp

Next steps

  • Records: every filter, sort and pagination option on a typed query.
  • Bundles: what a sync changes, what it never touches, and how conflicts are reported.
  • Status page cookbook: the same three steps grown into a deployed app.
  • Book a demo