# SDK overview
Source: https://docs.treeship.dev/sdk/overview

> Treeship's SDKs — pick the language that matches your stack. Every SDK shells out to the same signed CLI binary.

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

The TypeScript SDK exposes three modules on the `Ship` client:

| Module   | Methods                                                       | What it does                                                                                                                                         |
| -------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `attest` | `action`, `decision`, `approval`, `handoff`                   | Sign an attestation (`endorsement` and typed `receipt` attestations are CLI-only for now: `treeship attest endorsement` / `treeship attest receipt`) |
| `verify` | `verify`, `verifyReceipt`, `verifyCertificate`, `crossVerify` | Verify a local artifact via the CLI; verify receipts/certificates in-process via `@treeship/verify`                                                  |
| `hub`    | `push`, `pull`, `status`                                      | Upload an artifact to the Hub, pull a remote one, check connection status                                                                            |

The Python SDK maps the same operations to flat snake\_case methods: `attest_action`, `attest_approval`, `attest_handoff`, `attest_decision`, `verify`, `hub_push`, `wrap`, `session_report`.

The TypeScript SDK is the reference implementation; new methods land there first and propagate to Python and the bridges. Anything the SDKs don't wrap yet is still reachable by shelling out to the CLI directly.

## 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 }
```

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

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