Crawlee Cloud CLI
The official CLI tool for Crawlee Cloud.
Manage your Crawlee Cloud resources, deploy Actors, and view logs directly from your terminal.
Installation
npm install -g @crawlee-cloud/cli
Or use directly with npx:
npx @crawlee-cloud/cli <command>
Usage
crawlee-cloud <command> [options]
# Alias
crc <command> [options]
Commands
login- Login to your Crawlee Cloud account (supports--profilefor multi-environment setups)info- Show the active profile, API URL, server status, and authenticated userprofile- Manage saved login profiles (list,use,rm)init- Scaffold a new Actor project from an Apify templatepush- Deploy an Actor to the cloudrun- Run an Actor locallycall- Run an Actor on the platform (with optional--wait)list- List actors and runslogs- Stream logs from a running Actorstatus- Check the status of a rundev- Run an Actor locally with hot reload
Example
# Login
crc login
# Push the current directory as an Actor (name comes from .actor/actor.json)
crc push
# Run the Actor
crc call my-actor
Configuration
Connect to your self-hosted Crawlee Cloud server:
# Login to your server
crc login --url https://your-server.com
You'll be prompted for your API token. Credentials are stored in ~/.crawlee-cloud/config.json.
Profiles (multi-environment)
Switch between local, staging, and production with named profiles. Each profile holds its own API URL + token.
# Save credentials under a named profile
crc login --profile local --url http://localhost:3000 --token <T>
crc login --profile staging --url https://crc.staging.com --token <T>
crc login --profile prod --url https://crc.prod.com --token <T>
# List all profiles (active marked with *)
crc profile list
# Switch the active profile
crc profile use staging
# Remove a profile
crc profile rm staging
# Check what's currently active and reachable
crc info
crc info --json # for scripts / CI healthchecks
For per-invocation overrides without changing the active profile, use the CRAWLEE_CLOUD_PROFILE env var:
CRAWLEE_CLOUD_PROFILE=prod crc push # one-off push to prod, no `profile use` needed
crc info exits non-zero if the server is unreachable or the token is invalid, which makes it suitable as a CI gate before crc push:
crc info --json >/dev/null && crc push
Environment Variables
| Variable | Description |
|---|---|
CRAWLEE_CLOUD_API_URL | Override the active profile's API base URL |
CRAWLEE_CLOUD_TOKEN | Override the active profile's API token |
CRAWLEE_CLOUD_PROFILE | Override the active profile name for this invocation |
CRAWLEE_CLOUD_REGISTRY_URL | Docker registry URL used by crc push for image push, optional |
GHCR_TOKEN | GitHub Container Registry token used by the crc push --ghcr path |
GHCR_USER | GHCR username for crc push --ghcr (default: github) |
Documentation
For full documentation, visit the Crawlee Cloud Documentation.
Publishing (maintainers)
The CLI publishes to npm as @crawlee-cloud/cli automatically when a v* tag is pushed to the repo, via .github/workflows/publish-cli.yml.
The release flow is:
- Open a
chore(release): vX.Y.ZPR that bumps all 5 workspacepackage.jsonfiles (root + api + cli + dashboard + runner) and the lockfile in lockstep. - Merge it.
- Tag the merge commit
vX.Y.Zand push the tag. - The publish workflow validates that the tag matches
packages/cli/package.json, builds, and publishes with provenance via npm trusted publishing (noNPM_TOKENsecret required).
Manual publish (escape hatch — only use if the workflow is broken):
cd packages/cli
npm login # interactive
npm publish --access public # `prepack` builds dist/ automatically