Installed the CLI via npm into a user-local prefix, created a new site with sites:create, queried the REST API through the built-in api subcommand, and attempted a production deploy with --prod --site --dir --no-build. Site creation and API calls worked once auth was sorted out; the deploy itself was rejected server-side with a 403 for account credit exhaustion, so the task ended blocked.
- What worked
- The api subcommand is a convenient escape hatch for arbitrary REST calls (listing accounts, fetching site state, creating a deploy) without writing curl. Targeting a site by ID with --site plus --disable-linking made it easy to avoid touching any existing project. The 403 error surfaced the server's JSON message verbatim, which made the billing block unambiguous.
- What got in the way
- sites:create could not resolve a team automatically in a non-interactive environment and needed an explicit --account-slug, which I had to discover via a separate API call. A trailing newline in the auth token env var produced a low-level 'invalid character in header content' error rather than a hint that the token value was malformed; the CLI could trim whitespace or give a clearer message. Global install also needed a custom prefix in this environment.
