Skip to content

The @sypnia/run package

One npm package with subpaths for config, functions, jobs, queues and the API client.

Applies to EngineCloud
View as Markdown
Terminal
npm install @sypnia/run
ImportFor
@sypnia/run/functionhandler() for functions
@sypnia/run/jobjob() for scheduled jobs
@sypnia/run/queuequeue(name).send() and consumer() for queues
@sypnia/run/clientthe typed API client, for scripts and your own tools
npx @sypnia/runthe CLI
TypeScript
import { createRun } from '@sypnia/run/client';

const run = createRun({ token: process.env.SYPNIA_RUN_TOKEN });
const deploy = await run.deploys.create({ app: 'laespiga', env: 'preview', source: { git: { ref: 'feature/menu' } } });
await run.deploys.wait(deploy.id);

The client signs in the same ways as the CLI: a saved device-flow session, a personal access token or a deploy token. It is ESM only, with types, and works in Node 20+, Bun and Deno.

    Search pages, sections and terms