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>| Command | What it does |
|---|---|
init | Sets up Uniwind, the theme, components.json and the cn helper |
add | Adds items and the items they depend on |
list | Lists every item in the registry |
doctor | Checks your setup and prints a fix for each problem |
Options for every command
| Option | Effect |
|---|---|
--cwd <path> | Run in another folder |
-y, --yes | Don't ask before changing files |
--dry-run | Show what would change; write and install nothing |
--skip-install | Write files, and print the install command instead of running it |
--json | Print one JSON object, for scripts and agents |
-h, --help | Show help |
-v, --version | Show 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:
{
"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.