CLI Overview
The threeu CLI ships inside the threeu-sdk npm package — one command, publish.
Installation
There is no separate CLI package. The threeu binary is installed together with the SDK, so any project that depends on threeu-sdk can run it with npx:
npm install threeu-sdk
npx threeu --version
npx threeu helpCommands
| Command | Description |
|---|---|
npx threeu publish | Bundle the current theme or plugin project and submit it for review |
npx threeu publish --dry-run | Detect, validate and bundle — but do not upload (run this first) |
npx threeu help | Show usage |
npx threeu version | Print the SDK/CLI version |
There is no `create` and no `dev` command today. Scaffold with your normal toolchain (Vite is what published themes use) and run the theme locally with npm run dev in preview mode — see [Dev & Publish](/docs/cli-dev). Scaffolding commands are on the roadmap.
Older docs mentioned @threeu/cli
That package was never published. Use the binary that ships with threeu-sdk.
Publish Options
| Flag | Env var | Default | Meaning |
|---|---|---|---|
--dir <path> | — | current directory | Project directory to bundle |
--token <token> | THREEU_DEVELOPER_TOKEN | — | Developer personal access token |
--api <url> | THREEU_API_URL | https://api.threeu.app | API base URL |
--dry-run | — | off | Validate + bundle without uploading; leaves the tar.gz in your temp dir |
The token is a credential. Keep it in a git-ignored file named .env.threeu (the bundler excludes .env*), never in the theme source.
Quick Example
Build, validate, publish:
# in the theme project (has threeu.json)
npm run build # produces preview-dist/
npx threeu publish --dry-run # validate + bundle only
THREEU_DEVELOPER_TOKEN="$TOKEN" npx threeu publish