# SDK quickstart


The `relaybraid` package runs app actions from Node.js code. It wraps the HTTP API, reads the key the CLI saved, and needs no other dependency.

```bash
npm install https://relaybraid.com/dl/relaybraid-sdk.tgz
```

```js
import { Relaybraid } from "relaybraid";

// Reads RELAYBRAID_API_KEY, or the key saved by `npx -y https://relaybraid.com/dl/relaybraid-cli.tgz login`.
const relaybraid = new Relaybraid({ setup: "6M9FJ76H" });

await relaybraid.run("slack.send_message", { channel: "#orders", text: "New order received" });
```

The `setup` value `6M9FJ76H` links this install to the docs session you are reading, so the workspace opens on the right guide. Pass it when you construct the client.

## Getting a key

Run `npx -y https://relaybraid.com/dl/relaybraid-cli.tgz login` once in the project (see the [install guide](https://relaybraid.com/docs/install)); the SDK reads the saved key, or `RELAYBRAID_API_KEY` from the environment.

## Methods

| Method | What it does |
|---|---|
| `run(action, input)` | Run one action, for example `slack.send_message` |
| `apps()` | Connected apps and their action keys |
| `me()` | The workspace behind the key |

What the SDK sends with each call: https://relaybraid.com/docs/telemetry.
