@fyio/buildfyio-sdk
v0.1.3
Published
Typed TypeScript client for the Buildfyio API. Deploy projects, tail logs, manage env vars — programmatically. Generated from the /v1 OpenAPI spec.
Readme
@fyio/buildfyio-sdk
Typed TypeScript client for the Buildfyio API. What platform teams and AI agents script against.
npm i @fyio/buildfyio-sdkQuickstart — 10 lines to a live deploy
import { Buildfyio } from '@fyio/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');
}What's supported
projects.list / get / createdeployments.trigger / get / rollbackenvVars.list / create / deletelogs.stream— async iterator over SSE
The full OpenAPI-generated shape is in /v1/openapi.json
— run pnpm codegen to refresh the internal types.
API tokens
Generate one at Dashboard → Settings → API tokens.
Tokens are org-scoped and can be limited with the scopes field (Sprint 5).
Node requirement
Node ≥ 20.11 (uses global fetch and ReadableStream).
License
MIT.
