---
url: /api/packages/cli/src/functions/run.md
---
[pantoken-root](../../../../index.md) / [packages/cli/src](../index.md) / run

# Function: run()

> **run**(`argv`): `Promise`<`void`>

Beta

Run the CLI.

## Parameters

### argv

readonly `string`\[]

## Returns

`Promise`<`void`>

## Examples

**Add a component from the pantoken registry**

```ts
import { run } from "@pantoken/cli";

await run(["add", "button"]);
```

**Scaffold a starter project with pantoken**

```ts
import { run } from "@pantoken/cli";

await run(["create", "react", "--dir", "./my-app", "--no-install"]);
```

**Generate Swift tokens into a consumer repo**

```ts
import { run } from "@pantoken/cli";

// Writes Sources/PanTokens/Tokens.swift + Package.swift under ./ios/DesignTokens.
await run(["generate", "swift", "--out", "./ios/DesignTokens"]);
```

**Generate a themed swatch palette in a specific format**

```ts
import { run } from "@pantoken/cli";

await run(["generate", "swatches", "--format", "gpl", "--theme", "canvas", "--out", "./out"]);
```
