Skip to main content
The Subframe CLI normally prompts for anything it’s missing. When stdin is not a TTY — in CI, a Docker build, or an AI coding agent — it switches to non-interactive mode automatically: instead of hanging on a prompt it uses the value from a flag, falls back to a safe default, or exits non-zero with a message telling you exactly which flag to pass. You can also force this mode in an interactive terminal with --yes.

Authentication

Provide a token without the interactive login. Generate one from the CLI auth page ↗. The --auth-token flag takes precedence over SUBFRAME_AUTH_TOKEN if both are set. Either is verified and cached on first use, so later commands in the same environment reuse it without re-supplying or re-verifying it.

Global flags

Every command exits non-zero on failure (and, with --json, prints an { "ok": false, "error": ... } envelope to stdout), so you can rely on either the exit code or the JSON in a pipeline.

Examples

Sync components in CI

The most common case. After init has been run once and committed .subframe/sync.json, syncing only needs a token:

Initialize an existing project non-interactively

Pass the values the CLI would otherwise prompt for:
init flags worth knowing:
  • --projectId <id> — required when your account has more than one project (otherwise the CLI can’t choose for you and will list the available ids).
  • --css-type <tailwind|tailwind-v4> — required if the CLI can’t detect your Tailwind version.
  • --dir <path> — where components sync to.
  • --alias <alias> — the import alias to use. Must end with /* (e.g. @/ui/*) so it matches every file in the directory; the CLI rejects an alias without it.
  • --no-install, --no-sync, --no-tailwind — skip a step that would otherwise prompt. The matching --install / --sync / --tailwind force it on.
  • --no-update-import-alias — don’t change the import alias stored in your Subframe project.

Scaffold a brand new project

Creating a project from scratch can’t guess your framework or name, so pass them:

Parse the result

With --json, stdout carries only the result object:
Last modified on June 24, 2026