Install the Krexel CLI
The CLI is the fastest way to deploy from your terminal. It's the same engine that powers the MCP server, just without the AI in the loop.
Install
npm install -g krexel
Requires Node.js 18 or newer. Check with node --version — if you see v18.x.x or higher, you're good.
Platform-specific notes
macOS / Linux — works out of the box. If npm install -g fails with a permissions error, see the npm docs on fixing permissions.
Windows — use WSL (Windows Subsystem for Linux). Native Windows support is on the roadmap but not shipped yet.
Docker — a minimal image is available at krexel/cli:latest:
docker run --rm -v $(pwd):/site -e KREXEL_API_KEY=krx_… krexel/cli:latest deploy
Log in
krexel login
This prompts for your API key. Get one at krexel.com/keys if you don't have one.
The key is stored in ~/.config/krexel/credentials with mode 600. Never committed to git.
Commands
krexel deploy
Deploys the current folder to Krexel.
krexel deploy # deploy current folder
krexel deploy ./dist # deploy a specific folder
krexel deploy --message "fix login bug" # attach a deploy message
Output:
✓ Built 14 files (98 KB)
→ Uploading to Krexel…
✓ Live at https://my-site.krexel.app in 8 seconds
Commit: dep_a1b2c3d4
krexel patch <file>
Patches a single file in the live site. Use this when your AI tells you "change line 3 of the about page."
krexel patch about.html
krexel patch src/components/Hero.tsx
Patches cost 0.1 deploy against your monthly quota. Full deploys cost 1.0.
krexel rollback <deploy-id>
Rolls the live site back to a previous deploy.
krexel rollback dep_a1b2c3d4
krexel rollback dep_a1b2c3d4 --to dep_x9y8z7w6 # roll back to a specific older deploy
Rollback is non-destructive — it creates a new deploy that ships the file tree of the target deploy. You can roll forward again.
krexel status
Shows the current state of your live site:
✓ Live: https://my-site.krexel.app
Last deploy: dep_a1b2c3d4 (12 minutes ago)
Status: ready
Plan: Builder
Deploys this month: 23 / 100
krexel logs [deploy-id]
Streams the build logs for a deploy. Use this when a deploy is stuck or failed.
krexel logs
krexel logs dep_a1b2c3d4
krexel domains
Lists your custom domains and shows their DNS verification status.
krexel keys
Lists your API keys. Use --rotate to generate a new one and revoke the old.
Configuration
Environment variables
| Variable | Purpose |
|---|---|
KREXEL_API_KEY | Your API key. Alternative to krexel login. |
KREXEL_API_URL | Override the API endpoint. Defaults to https://api.krexel.com. |
KREXEL_NO_COLOR | Disable color output (for CI logs). |
Config file
~/.config/krexel/config.json:
{
"default_subdomain": "my-site",
"watch": false,
"verbose": false
}
default_subdomain controls what subdomain your site deploys to. Defaults to the folder name.
Updating
The CLI checks for updates on every run. If a new version is available, you'll see:
↑ Update available: 0.3.0 → 0.3.1
Run `npm install -g krexel@latest` to update.
To update:
npm install -g krexel@latest
Uninstalling
npm uninstall -g krexel
rm -rf ~/.config/krexel
Troubleshooting
krexel: command not found — your npm global bin isn't on your PATH. Run npm config get prefix, then add <prefix>/bin to your PATH.
Error: EACCES: permission denied — npm doesn't have write access to your global modules. Fix with this guide, or use a node version manager like nvm or fnm.
Error: Not authenticated — your API key expired or was revoked. Run krexel login again.
Deploy succeeds locally but the URL shows old content — clear your browser cache. The CDN caches aggressively for 5 minutes by default; force-refresh with Cmd+Shift+R.
Next steps
- Install the MCP server — connect your AI to Krexel
- Connect a custom domain — replace the .krexel.app subdomain
- Billing & plans — what each tier includes