# Tools

> High-level Taskbox SDK — createTaskbox + the tool catalog.

Source: https://taskbox.n.yatsyk.com/docs/tools

# @taskbox/tools

The high-level SDK. `createTaskbox({ runtime })` returns a small façade with
named methods per tool. Each method validates its tool-specific input via
`@taskbox/schemas`, fills in network/runtime/resource defaults, then hands
off to `@taskbox/core`'s `runTask`. Today the catalog is small —
`media.downloadSubtitles` — but the same pattern applies to anything wired
into the kitchen-sink image.

* **Stability:** beta
* **Platforms:** node

## Install

```bash
npm i @taskbox/tools @taskbox/podman
```

## Create a taskbox

```ts
import { createTaskbox } from "@taskbox/tools";
import { podman } from "@taskbox/podman";

const tbx = createTaskbox({
  runtime: podman({ pullPolicy: "if-missing" }),
  defaults: { timeoutMs: 60_000, networkMode: "direct" },
});

const health = await tbx.prepare();
console.log(health.runtime, health.image.ref);
```

## Download subtitles

```ts
const result = await tbx.media.downloadSubtitles(
  {
    url: "https://youtu.be/jNQXAC9IVRw",
    languages: ["en"],
    format: "vtt",
    auto: true,
    outputDir: "/tmp/subs",
  },
  { onEvent: (e) => console.log(e.type) },
);

if (result.ok) {
  for (const a of result.artifacts) console.log(a.kind, a.path);
}
```

See [API](./api.mdx) for the full export list.
