Appearance
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 initWhat it does
- Scaffold projects —
hailer-sdk initcreates a typed project, authenticates you, and optionally wires up a bot account and an MCP server for your TUI. - Configuration as code —
hailer-sdk ws-configpulls your workspace into editable.tsfiles and pushes changes back, with conflict detection so a push never silently clobbers a change someone made in the Hailer UI. - Type generation —
hailer-sdk generateemits 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 snapshotEvery 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
- Install & initialize a project
- Configuration reference — the editable files and every option in them
ws-configcommand & sync model- Generate TypeScript types