SwipeUI
DocsCLI

Overview

The SwipeUI CLI sets up your project and copies items into it.

Run it with npx; nothing needs installing first:

npx @swipeui/cli <command>
CommandWhat it does
initSets up Uniwind, the theme, components.json and the cn helper
addAdds items and the items they depend on
listLists every item in the registry
doctorChecks your setup and prints a fix for each problem

Options for every command

OptionEffect
--cwd <path>Run in another folder
-y, --yesDon't ask before changing files
--dry-runShow what would change; write and install nothing
--skip-installWrite files, and print the install command instead of running it
--jsonPrint one JSON object, for scripts and agents
-h, --helpShow help
-v, --versionShow the version

Prompts only appear in a terminal. In CI, or with --json, the CLI goes ahead as if you passed --yes.

For agents and scripts

With --json, stdout carries exactly one object:

Terminal
{
  "ok": true,
  "command": "add",
  "dryRun": false,
  "project": {
    "kind": "expo",
    "expoSdk": 58,
    "reactNative": "0.88.0",
    "packageManager": "pnpm",
    "importStyle": "alias",
    "componentsDir": "src/components/swipeui"
  },
  "files": [{ "path": "src/components/swipeui/ui/button.tsx", "action": "create" }],
  "dependencies": {
    "installed": ["class-variance-authority@^0.7.1"],
    "command": "npx expo install class-variance-authority@^0.7.1"
  },
  "notes": [],
  "nextSteps": []
}

File actions are create, update, skip and unchanged. Failures look like { "ok": false, "command": "add", "error": { "code": "not-found", "message": "…", "fix": "…" } }.

Exit codes: 0 for success, 1 for an error, 2 when doctor finds problems.

Privacy

The CLI sends no telemetry. It only talks to the registry and runs your package manager.

On this page