@crawlee-cloud/cli
v0.9.1
Published
CLI for Crawlee Cloud - run and deploy Actors
Readme
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/cliOr 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
crc push my-actor
# Run the Actor
crc call my-actorConfiguration
Connect to your self-hosted Crawlee Cloud server:
# Login to your server
crc login --url https://your-server.comYou'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 healthchecksFor 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` neededcrc 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 pushEnvironment 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 |
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