Docs
Tutorials
How-to guides
Reference
Explanation
Login
Free Sign Up
Docs
/
SDK and CLI
SDK and CLI
Work with Ligantic from code and the command line.
Tutorials
Your First Integration with the Ligantic SDK
This tutorial walks you through your first end-to-end integration with the Ligantic SDK: install the package, authenticate with an API key, list a Space, read a Record, and run a Flow.
How-to guides
How to Build Schemas, Flows, and Experiences Incrementally with the CLI
This guide shows you how to change one Schema field, Flow node or edge, or Experience block at a time, instead of sending a whole configuration.
How to Handle Pagination
List endpoints in the Ligantic API are paginated. You control limit, offset, and cursor directly.
How to Run a Flow from CI
This guide shows you how to trigger a Flow from a non-interactive job (a CI pipeline, a cron job, a serverless function) and wait for it to finish, using either the SDK or the CLI.
How to Sync Records with the CLI
This guide shows you how to create and inspect Records from the command line. A Record is an instance of a Schema — the business data a Space holds.
How to Use the CLI in a Script
This guide shows you how to drive ligantic from a non-interactive script or CI job: provide the API key without a prompt, select a Space, and consume JSON output.
Reference
SDK and CLI Reference Overview
The official TypeScript SDK (@ligantic/sdk) and command-line interface (@ligantic/cli) give external developers one coherent way to authenticate, manage Spaces and Resources, work with Records, and invoke and inspect Flows against the Ligantic API.
CLI Command Reference
@ligantic/cli provides the ligantic binary. It is a thin layer over @ligantic/sdk: the same result-based operations, rendered as JSON when stdout is not a terminal (scripts, agents, CI) and as tables on a terminal. See Output and Errors.
Generated CLI commands
These commands are generated from the Ligantic OpenAPI spec, so the CLI covers every public API operation. The hand-written commands in the CLI command reference take precedence where both exist: for example records list is hand-written, and records json-patch is generated. Find a command with ligantic cli search "<what you want to do>".
SDK API Reference
@ligantic/sdk is a thin, result-based, versioned mirror of the Ligantic OpenAPI v1 surface. Every operation returns Promise<LiganticResult<T>> and request methods return failures as the Err side (no thrown API/transport errors).
Explanation
Authentication and Key Storage
This explains how the SDK and CLI authenticate, where the CLI keeps your API key, and how the CLI decides which Space, key, and base URL to use.
The Result-Based Error Model
This explains why the SDK never throws, what a Result is, and how to read a LiganticError.
The SDK as an API Mirror
This explains the compatibility model: how the SDK relates to the Ligantic OpenAPI contract, what it mirrors, and how versions move.