Typed artifacts, no code
Definitions, blueprints, and transactions are validated JSON. Rules use a closed expression language; no function, source text, or template syntax is ever serialized.
Separate packages for document structure, blueprints, server requests, and browser viewing. Install only what your code needs. Everything you send is typed JSON.
The API key stays on the server. The render request names a document version, a blueprint, and the data for that run. The response is a run you can inspect later.
import { createDokusClient } from "@dokus/client";
import { defineBlueprint, input, values } from "@dokus/blueprint";
const dokus = createDokusClient({
apiKey: process.env.DOKUS_API_KEY!
});
const blueprint = defineBlueprint({
inputSchema,
rules: [values({ "customer.name": input("customerName") })]
});
const started = await dokus.documents.render({
documentId,
versionId,
blueprint,
data: { customerName: "Northstar Logistics" },
generatePdf: true
}, { idempotencyKey });
const run = await dokus.runs.wait(started.runId);Choose the part your application needs.
Explore what each package does.
@dokus/dksdCreate documents, inspect exact snapshots, and build ordered document changes.
@dokus/blueprintDefine accepted input, bind values to fields, and add show and repeat rules that target blocks, tables, rows, and cells.
@dokus/clientImport documents, manage versions and blueprints, start renders, and inspect runs from your server.
@dokus/document-viewerRender exact document and font bytes in the browser and select text, fields, blocks, tables, rows, and cells. Read-only.
@dokus/clientKeep credentials and persistence on your server.
@dokus/document-viewerRender the document and select its content.
Every artifact is inert JSON. Nothing you send is executed.
Definitions, blueprints, and transactions are validated JSON. Rules use a closed expression language; no function, source text, or template syntax is ever serialized.
The server resolves a blueprint against one exact document version and rejects anything that does not match before it renders.
Every write and every render carries an idempotency key, so a retrying agent gets the same result instead of a duplicate.
Agents use the same typed packages as your application.
A published coding-agent skill.
A runtime surface for AI agents.
One document. One typed field.
See what you can build with dokus.