Install the Krexel CLI
The CLI ships an already-built website folder to Krexel and includes the Krexel MCP server used by AI clients.
Install
npm install -g krexel
Krexel requires Node.js 20 or newer. Check with node --version.
Log in
Create or copy a key at krexel.com/keys, then run:
krexel login
# Non-interactive alternative:
krexel login --api-key krx_your_key_here
Krexel validates the key against the production API. If KREXEL_API_KEY is set in your shell, the CLI uses it and skips writing any file — your shell is the safest place for a secret. Otherwise it falls back to ~/.krexel/auth.json (mode 600, owner-only).
Ship a site
Build your project first, then pass its output folder and the domain you want to use:
krexel ship ./dist example.com
krexel ship ./out example.com --framework nextjs
Supported framework hints are auto, nextjs, astro, vite, and static. The default is auto.
Wire every AI client in one command
krexel init detects every AI client installed on your machine (Claude Code, Codex, Cursor, Windsurf, Continue, Claude Desktop) and writes the right MCP config to each. It also runs krexel login for you, so a typical install looks like:
krexel init
Idempotent and safe to re-run. See Install the MCP server for the full reference.
Inspect and roll back
krexel whoami
krexel logs dep_a1b2c3d4
krexel rollback example.com dep_a1b2c3d4
Run krexel --help for the complete command list.
Configuration
| Variable | Purpose |
|---|---|
KREXEL_API_KEY | Your krx_… API key. If set in the shell, krexel init skips the prompt and the auth.json file write — your shell is the safest place for a secret. |
KREXEL_API_URL | API endpoint override. Defaults to https://krexel.com (proxied via Vercel). Use https://api.krexel.com only for direct-to-worker debugging. |
KREXEL_HOME | State directory override. Defaults to ~/.krexel. |
KREXEL_MCP_BIN | Advanced override for the MCP-server executable. |
Troubleshooting
krexel: command not found — make sure your npm global binary directory is on PATH.
The API key is rejected — create a new key at krexel.com/keys, then run krexel login again.
The MCP server cannot be found — update the CLI with npm install -g krexel@latest; current releases install the MCP server as a dependency.
Next steps
- Install the MCP server — connect your AI to Krexel with
krexel init - Connect a custom domain — use your own domain
- Billing & plans — compare plan limits