Install the SDK and CLI
npm install @flower-js/sdk
npx flower --help| API | Contract |
|---|---|
@flower-js/sdk | Everything for writing an application: declarations, contexts, JSON helpers, plus the client. Safe to bundle. |
@flower-js/sdk/client | The HTTP client for calling Flower from Node or a browser. |
@flower-js/sdk/temporal | Expiring records and worker leases. |
@flower-js/sdk/scheduler | Delayed callbacks with retries. |
@flower-js/sdk/crypto | NaCl and JWT, for use inside deployed application code only. |
@flower-js/sdk/http2 | Pooled HTTP/2 transport for the client. Node only; keep it out of application bundles. |
@flower-js/sdk/bundle | Build tools. Node only; keep them out of application bundles. |
@flower-js/sdk/package.json | Package metadata. Importing internal SDK files isn’t supported. |
- The SDK and CLI need Node 22.18+. The server is a separate Rust binary and doesn’t need Node.
npx floweris the SDK’s CLI, not the server. In a checkout, the server is./target/release/flower. Runnpm ciandnpm run buildfirst.- Source: sdk/ on GitHub.
All reference pages
Values & collectionsWhat a value can be, how collections and indexes work, and incremental totals.Contexts & definitionsWhat a method can do with
ctx, and how define builds the public method list.Client & transportsFlowerClient, live watches, and the HTTP/2 transport.Expiry, leases & timersRecords that expire, jobs leased to one worker, and callbacks that run later.NaCl & JWTSigning, encryption and tokens inside your methods.Managed keysDeclare a key in code; an operator provides it. Private key bytes never reach your code.Partitions & transactionsMove tenants between Raft groups, and commit changes across groups at once.Staged deploymentPrepare a new version in the background, switch to it, then clean up.Bundles & CLIBuild app bundles, and deploy, call and watch from the terminal.Authorization & retentionCheck every caller, and limit how long retry results are kept.Operational limitsThe limits and failure modes your code should plan for.