---
title: SDK overview
description: Treeship's SDKs — pick the language that matches your stack. Every SDK shells out to the same signed CLI binary.
---

import { Callout } from 'fumadocs-ui/components/callout';
import { Card, Cards } from 'fumadocs-ui/components/card';

Treeship ships an SDK for the languages most agent stacks are built in. **Every SDK is a thin wrapper over the same `treeship` CLI binary** — the binary does the signing, verification, and Hub I/O; the SDK just gives you idiomatic types and async ergonomics in your language. That keeps the trust surface (Ed25519 signing, canonical PAE, Merkle compose) in one place across every language and platform.

<Callout type="info">
**Install the CLI first.** Every SDK requires the `treeship` binary on PATH and a `treeship init` workspace. See [install + registry topology](/guides/install) for the full picture of which package goes on which registry, and what's intentionally not on each one.
</Callout>

## Pick your SDK

<Cards>
  <Card title="TypeScript / Node.js" href="/sdk/typescript" description="@treeship/sdk on npm. Full attest, verify, hub. The primary SDK for Node, Bun, Deno." />
  <Card title="Python" href="/sdk/python" description="treeship-sdk on PyPI. Full attest, verify, session reporting, hub." />
  <Card title="Browser / WASM verifier" href="/sdk/verify" description="@treeship/verify and @treeship/core-wasm. Verify receipts entirely in the browser; no CLI required." />
  <Card title="MCP / A2A bridges" href="/sdk/mcp" description="@treeship/mcp and @treeship/a2a — drop-in instrumenters for any MCP-speaking agent." />
</Cards>

## Common shape

Every SDK exposes the same three modules, with the same method names mapped to the language's conventions:

| Module | Methods | What it does |
|---|---|---|
| `attest` | `action`, `decision`, `approval`, `handoff`, `endorsement`, `receipt` | Sign one of the six attestation types |
| `verify` | `verify`, `verifyChain`, `verifyPackage` | Recompute Merkle, recheck signatures, walk parent chain |
| `hub` | `push`, `pull`, `share` | Upload to the Hub, get a shareable URL, pull a remote receipt |

The TypeScript SDK is the reference implementation; new methods land there first and propagate to Python and the bridges.

## Install topology

| Stack | Install |
|---|---|
| Node / TypeScript | `npm install @treeship/sdk` |
| Python | `pip install treeship-sdk` |
| Rust (library, not the CLI) | `cargo add treeship-core` |
| Browser verifier | `npm install @treeship/verify @treeship/core-wasm` |
| MCP bridge | `npm install @treeship/mcp` |
| A2A bridge | `npm install @treeship/a2a` |
| CLI binary (native) | `npm install -g treeship` *or* download a [GitHub Release](https://github.com/zerkerlabs/treeship/releases) binary |

The CLI is **not** on crates.io. `treeship-cli` is a binary distributed via npm + GitHub Releases; only the `treeship-core` library is on crates.io. See [install + registry topology](/guides/install) for the full rationale (Rust binaries with native deps don't ship cleanly on crates.io; native deps shell out from the SDK boundary anyway).

## Agent-mode shape

Every SDK supports a JSON output mode the underlying CLI inherits via `--format json`. AI agents calling the SDK can:

```ts
const result = await s.attest.action({ actor: 'agent://x', action: 'tool.call' });
//   ^? { artifactId: string, digest: string, signedAt: string }
```

```python
result = ts.attest_action(actor="agent://x", action="tool.call")
print(result.artifact_id, result.digest)
```

The shape is stable across SDKs — agents that orchestrate Treeship through one language can hand the same JSON to a verifier in another.

## See also

- [install + registry topology](/guides/install) — what's on each registry and why
- [Quickstart](/guides/quickstart) — the fastest path from `treeship init` to a verified receipt
- [CLI reference](/cli/overview) — every command the SDKs wrap
