> For the complete documentation index, see [llms.txt](https://docs.sail.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sail.money/sailor/packages.md).

# npm package

Sailor ships as a single published package — [`@sail.money/sailor`](https://www.npmjs.com/package/@sail.money/sailor) (latest **1.3.0**, 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.

## Install & scaffold

{% tabs %}
{% tab title="bash / zsh (macOS, Linux)" %}

```bash
npx @sail.money/sailor init my-agent && cd my-agent && npm install
```

{% endtab %}

{% tab title="PowerShell (Windows)" %}

```powershell
npx @sail.money/sailor init my-agent ; cd my-agent ; npm install
```

{% endtab %}
{% endtabs %}

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](/sailor/skills.md)). Then open the folder in your coding agent and say **start**.

## Running the CLI

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

```bash
npx sailor <command>      # e.g. npx sailor status, npx sailor run --once
```

Prefer a global command instead:

```bash
npm install -g @sail.money/sailor
sailor <command>
```

The full command surface is in the [CLI reference](/sailor/cli.md).

## Using the SDK

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`:

```ts
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:

```bash
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](/sailor/sdk.md).

{% hint style="info" %}
**One package, no standalone SDK.** Always import the SDK from `@sail.money/sailor/sdk`. A standalone `@sail.money/sdk` distribution with granular subpaths is planned but **not yet published to npm** — do not depend on it; install `@sail.money/sailor`.
{% endhint %}

## No Node.js?

Run the same CLI from the pre-built container instead — see [Docker](/sailor/docker.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sail.money/sailor/packages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
