staticx
v0.2.5
Published
Public CLI for STATICX using token-authenticated /api/v1 routes.
Downloads
614
Maintainers
Readme
STATICX CLI
staticx is the public CLI for STATICX. It uses the same token-authenticated /api/v1 contract as the dashboard, the agent instructions, and the MCP server.
Install
npm install -g staticxLogin
staticx login --base-url "https://staticx.site/api/v1" --token "STATICX_API_TOKEN"
staticx whoami
staticx guide
staticx mcpstaticx login stores the credentials locally, verifies them with GET /user, and prints the active user, token scope, access level, expiry, and next safe commands.
Use staticx guide or staticx commands when you want the full command map from the terminal.
Use staticx mcp when you want copy-safe MCP snippets for Claude, Cursor, Codex, Cline, Windsurf, Zed, and generic clients.
Core commands
staticx guide
staticx workspaces
staticx sites --workspace-id WORKSPACE_ID
staticx create --workspace-id WORKSPACE_ID --name "Marketing Site"
staticx create --name "Marketing Site" --versioning off
staticx create --name "Imported Site" --archive site.zip
staticx create --name "Imported Site" --source-url "https://example.com"
staticx deploy --site-id SITE_ID --dir dist
staticx deploy --site-id SITE_ID --dir dist --versioning off
staticx domain --site-id SITE_ID --domain app.example.com
staticx domain-status --site-id SITE_ID
staticx logs --site-id SITE_ID
staticx indexing balance
staticx mcpSpeedyIndex indexing
The indexing command group submits and checks pages with SpeedyIndex through the same /api/v1 contract. The connected SpeedyIndex key is account-wide, stored encrypted, and never printed by the CLI.
staticx indexing balance
staticx indexing pages --engine google --status unchecked
staticx indexing pages --engine google --status not_requested
staticx indexing pages --engine google --status all --site SITE_ID --page 2
staticx indexing submit SITE_ID # sitemap diff
staticx indexing submit SITE_ID https://site/a https://site/b # specific URLs
staticx indexing submit SITE_ID --engine yandex --type indexer
staticx indexing check SITE_ID # whole inventory
staticx indexing check SITE_ID https://site/a --engine bing
staticx indexing tasks SITE_ID
staticx indexing task SITE_ID TASK_IDEngine support: google and yandex support both submit (indexer) and check (checker). bing is check-only — submitting with --engine bing returns engine_unsupported.
submit and check accept optional positional URLs. Omit them to submit the sitemap diff or to check the whole inventory.
Indexing error codes
The CLI maps each SpeedyIndex error_code to a clear message and a distinct non-zero exit code, then prints the message to stderr. The API key is never shown.
| error_code | HTTP | Exit code | What to do |
| --- | ---: | ---: | --- |
| no_key | 401 | 3 | No SpeedyIndex key connected. Add one in Settings → Indexing (stored encrypted). |
| insufficient_balance | 402 | 4 | Not enough SpeedyIndex credits — top up your balance, then retry. |
| rate_limited | 429 | 5 | Rate limited by SpeedyIndex — wait a moment and retry. |
| engine_unsupported | 422 | 6 | Unsupported engine/task type (for example, Bing is check-only). |
| server | 502/404 | 7 | Upstream SpeedyIndex failure — wait and retry. |
Custom domains
Use the CLI when you want to start custom domain setup without opening the dashboard.
staticx domain --site-id SITE_ID --domain app.example.comThe command starts the manual DNS flow and prints the single DNS record to create. After the DNS record is added, StaticX detects it and activates SSL automatically.
If you want StaticX to create the DNS record inside an external DNS account, approve DNS Connect from the dashboard. The CLI cannot authorize an external provider silently because the domain owner must approve access in a browser.
Generated subdomain suffixes are configured from the dashboard. If an account has an active publishing domain, open Site → Settings → Domain to save a free subdomain on either the StaticX default domain or that publishing domain. The CLI custom-domain command is for exact hosts such as app.example.com.
Check progress any time:
staticx domain-status --site-id SITE_IDMachine-readable sources
Use these when you want the same contract that the dashboard, CLI, and agents share:
- https://staticx.site/llms.txt
- https://staticx.site/llms-full.txt
- https://staticx.site/api/v1/openapi.json
Plan limits
StaticX enforces the same limits through the dashboard, API, CLI, MCP, URL imports, and hosted forms runtime.
| Plan | Sites | Storage | Max upload | Form entries | Team seats | Rollback history | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | Free | 1 | 500 MB | 500 MB | 1,000 | 1 | Last 5 versions | | Plus | 15 | 10 GB | 50 GB | 20,000 | 5 | Last 10 versions | | Pro | 100 | 20 GB | 50 GB | 100,000 | 10 | Last 50 versions | | Agency | Custom | Custom | 50 GB | Custom | Custom | Custom |
If a command receives PLAN_QUOTA_EXCEEDED, stop and return the exact message. Clean up files/form entries or upgrade before retrying.
Token scopes
- Global token: account-wide access for internal operator tools.
- Site token: one-site deploys, logs, and release verification.
- Workspace token: several sites inside one workspace.
Generate those tokens from:
Settings → API tokensfor GlobalProject Settings → Agent deployfor SiteWorkspace → Agent deployfor Workspace
MCP for AI agents
StaticX MCP uses the separate public package staticx-mcp-server and the same scoped API tokens as the CLI.
{
"mcpServers": {
"staticx": {
"command": "npx",
"args": ["-y", "staticx-mcp-server"],
"env": {
"STATICX_API_TOKEN": "sx_replace_with_your_token",
"STATICX_API_BASE_URL": "https://staticx.site/api/v1"
}
}
}
}For local HTTP debugging:
STATICX_API_TOKEN=sx_replace_with_your_token npx staticx-mcp-server httpNotes
staticx loginstores the base URL and bearer token locally.staticx whoamiverifies the token withGET /user.staticx deployzips the contents of the given build directory, uploads the archive, waits for the queued ZIP import to finish, publishes a release, and waits for the deployment result. The directory must containindex.htmlorindex.htmplus404.htmlat its root.- ZIP uploads are asynchronous on the StaticX API. This keeps large archives from timing out in one long HTTP request; tune
STATICX_IMPORT_POLL_INTERVAL_MSorSTATICX_IMPORT_POLL_TIMEOUT_MSonly when your automation needs different wait behavior. - By default,
staticx createandstaticx deployuse rollback-ready release history. Add--versioning offwhen a site should keep one baseline release for analytics, forms, and the live URL without growing deployment history. staticx domaincallsPOST /projects/{project}/domainand returns the manual DNS record plus activation status.- Forms: a
data-staticx-formis keyed by explicitdata-staticx-form-id, else by itsdata-staticx-form-name(a readable slug), else by a hash of its fields — so the same form repeated across pages (a header/footer/floating widget) is ONE collection, not one per page, correct on the first deploy. Always give a multi-page form adata-staticx-form-nameor id.data-staticx-form-scope="page"forces a separate collection per page. Stale zero-submission collections are pruned on deploy; page labels never includeindex.html. - Golden deploy prompt: “Deploy
distto StaticX projectSITE_IDusingSTATICX_API_TOKEN. Build, validateindex.html+404.html, apply StaticX form rules if forms exist, zipdistroot, upload, wait for ZIP import completion, deploy, check logs, then return the live URL or the exact API error. Use--versioning offonly if I ask for one baseline release instead of rollback history. If you receivePLAN_QUOTA_EXCEEDED, stop and return the exact quota message. Never expose the token.”
