Skip to content

pantoken / packages/cli/src / run

Function: run()

run(argv): Promise<void>

Beta

Run the CLI.

Parameters

argv

readonly string[]

Returns

Promise<void>

Examples

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"]);