The @sypnia/run package
One npm package with subpaths for config, functions, jobs, queues and the API client.
npm install @sypnia/run| Import | For |
|---|---|
@sypnia/run/function | handler() for functions |
@sypnia/run/job | job() for scheduled jobs |
@sypnia/run/queue | queue(name).send() and consumer() for queues |
@sypnia/run/client | the typed API client, for scripts and your own tools |
npx @sypnia/run | the CLI |
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.