Docs

@buildfyio/sdk

Typed TypeScript client for the Buildfyio API.

Install

npm i @buildfyio/sdk

10-line quickstart

import { Buildfyio } from '@buildfyio/sdk';

const client = new Buildfyio({
  token: process.env.BUILDFYIO_TOKEN!,
  orgId: 'org_xxx',
});

const dep = await client.deployments.trigger('org_xxx', 'prj_yyy', {
  env: 'production',
  branch: 'main',
});
for await (const line of client.logs.stream('org_xxx', dep.id, 'build')) {
  process.stdout.write(line + '\n');
}

Resources

  • projects — list / get / create
  • deployments — trigger / get / rollback
  • envVars — list / create / delete
  • logs.stream — async iterator over SSE

Types come from the live spec at /v1/openapi.json — regenerate with pnpm codegen.