@bi/stattic-cli
v0.1.0
Published
Command-line publisher for Stattic static sites.
Readme
@bi/stattic-cli
Publish static projects to Stattic — a global edge network. Designed for humans and agents.
Usage
npx @bi/stattic-cli publish ./distdeploy is an alias for publish:
npx @bi/stattic-cli deploy ./distThe CLI targets https://api.stattic.net by default. For local development,
override it explicitly:
npx @bi/stattic-cli publish ./dist --api-url http://localhost:3000Update an existing project:
npx @bi/stattic-cli publish ./dist --project marketing-demo--project accepts a project id, a live domain/URL, or a project slug. Bare
slugs require --organization.
Choose between promoting to the live URL (the default) and creating a deployment without promoting:
npx @bi/stattic-cli publish ./dist --target deploymentAuth
The CLI checks, in order:
--access-token$STATTIC_ACCESS_TOKEN~/.stattic/auth.json.stattic/state.jsonfor a saved anonymous claim token
Anonymous publishes save claimToken, claimUrl, and expiresAt into
.stattic/state.json. The saved claimToken works for follow-up publishes
to the anonymous project until claim succeeds, and is invalidated immediately
after.
Claiming an anonymous project
npx @bi/stattic-cli claim --project marketing-demo --access-token <token>If your account has exactly one organization, the CLI uses it automatically.
Otherwise pass --organization.
The claim command sends claimToken and, when needed, targetOrganizationId
to POST /v1/projects/claim.
You can also sign in interactively:
npx @bi/stattic-cli login