# Installation

Install the CLI for headless renders, the Rust crates, and the browser player.

Motion SDK is pre-alpha. Everything installs from the [repository](https://github.com/brainfish-ai/motion) for now.

## CLI

The `motion-sdk` CLI validates scenes and renders them headless. It needs Rust (install it with [rustup](https://rustup.rs)) and a GPU. Any Vulkan, Metal or DX12 GPU works, and so does a software driver like Mesa lavapipe on a server.

```bash
git clone https://github.com/brainfish-ai/motion && cd motion
cargo install --locked --path crates/motion-sdk-cli
motion-sdk --version
```

On Debian or Ubuntu without a GPU, install lavapipe and pick Vulkan:

```bash
sudo apt-get install -y mesa-vulkan-drivers
export WGPU_BACKEND=vulkan
```

MP4 export compiles [OpenH264](https://github.com/cisco/openh264) from source, so the build needs a C++ compiler, plus `nasm` (optional) for its assembly. See [Export](/docs/features/export#licensing) for the licensing notes.

## Rust Crates

```toml
[dependencies]
motion-sdk-spec = { git = "https://github.com/brainfish-ai/motion" }
motion-sdk-render = { git = "https://github.com/brainfish-ai/motion" }
motion-sdk-export = { git = "https://github.com/brainfish-ai/motion" }
```

`motion-sdk-spec` alone gives you the types, the JSON Schema, validation and patch streaming, with no GPU dependency.

## Browser

`@motion-sdk/core` isn't on npm yet. Build it from the repo (Node 24 and the `wasm32-unknown-unknown` Rust target):

```bash
npm install
npm run build:wasm   # wasm-bindgen + wasm-opt; fetches pinned tools on first run
npm run dev          # playground at http://localhost:5173
```

```ts
import { createPlayer } from "@motion-sdk/core"

const player = await createPlayer(canvas, scene)
```

See the [Player API](/docs/reference/player).

## TypeScript

`@motion-sdk/scene` has the scene types (generated from the Rust spec) and typed helpers, so scenes written in TypeScript are checked by the compiler. It's a workspace package with no runtime dependencies.

```ts
import { defineScene, mesh } from "@motion-sdk/scene"

export default defineScene({ nodes: { orb: { mesh: mesh({ sphere: {} }, { material: "preset:chrome" }) } } })
```

See [TypeScript SDK](/docs/concepts/typescript).

## Agent Skills

```bash
npx skills@latest add brainfish-ai/motion
```

This installs every skill in [`skills/`](https://github.com/brainfish-ai/motion/tree/main/skills). See [Skills](/docs/agents/skills).
