Skip to content

Hailer SDK

@hailer/sdk is the command-line toolkit for developing against a Hailer workspace. It treats your workspace configuration as code: pull workflows, fields, phases, teams, groups, insights, apps, and document templates into local TypeScript files, edit them in your editor with full type safety, and push the changes back — version-controlled and reviewable like any other code.

bash
npx @hailer/sdk@latest init

What it does

  • Scaffold projectshailer-sdk init creates a typed project, authenticates you, and optionally wires up a bot account and an MCP server for your TUI.
  • Configuration as codehailer-sdk ws-config pulls your workspace into editable .ts files and pushes changes back, with conflict detection so a push never silently clobbers a change someone made in the Hailer UI.
  • Type generationhailer-sdk generate emits enums and types (hailer-types.ts) so your code references workflows, fields, and phases by name, not by hard-coded id.

When to reach for the SDK

Use the SDK for structure and configuration — creating workflows, editing fields and phases, managing teams/groups/insights/apps, and document templates. It batches changes, keeps them in git, and lets you review before applying.

For data operations — creating and querying activities — use the Hailer MCP server or API instead. The SDK is about the shape of the workspace, not the records inside it.

The pull → edit → push loop

bash
hailer-sdk ws-config pull          # fetch the workspace into workspace/*.ts
# edit the TypeScript files
hailer-sdk ws-config push          # apply your changes back to Hailer
hailer-sdk ws-config pull          # refresh local state + the sync snapshot

Every edit you make lives in a specific file under workspace/. What each file controls, and every property you can set in it, is documented in the Configuration reference.

Next steps

Hailer Developer Documentation