Skip to content

npm package

Sailor ships as a single published package — @sail.money/sailor (MIT). It contains both the sailor CLI and the SDK; the SDK is exposed as a subpath export. There is no separate @sail.money/sdk package@sail.money/sailor is the one package you install.

Terminal window
# scaffold in the current folder
npm i @sail.money/sailor ; npx sailor init
# or scaffold into a new folder
npx @sail.money/sailor init my-agent && cd my-agent && npm install

Requires Node.js ≥ 18. sailor init scaffolds the project from scaffold/ (agent code in src/, a Foundry workspace for custom permissions in contracts/, AGENTS.md, and the skills). Then open the folder in your coding agent and say start.

Inside a scaffolded project the sailor binary is available via npx:

Terminal window
npx sailor <command> # e.g. npx sailor status, npx sailor run --once

Prefer a global command instead:

Terminal window
npm install -g @sail.money/sailor
sailor <command>

The full command surface is in the CLI reference.

The SDK is imported from the @sail.money/sailor/sdk subpath — this is what scaffolded agent code uses, and it’s injected as a dependency by sailor init:

import {
SailorClient,
LocalKeyring,
getSailDeployment,
} from "@sail.money/sailor/sdk";
import type { Agent, AgentContext, Dispatch } from "@sail.money/sailor/sdk";

To add it to another project, install the package and its viem peer:

Terminal window
npm install @sail.money/sailor viem

Everything — SailorClient, the Agent interface, EIP-712 builders, template encoders, ABIs, and the deployment/chain registries — imports from that single @sail.money/sailor/sdk entry point. See the SDK reference.

Run the same CLI from the pre-built container instead — see Docker.