Apify CLI
$ apify Official Med RiskApify CLI (apify) scaffolds web-scraping and automation Actor projects (create, init), tests them locally (apify run), deploys to Apify Cloud (apify push), and queries REST endpoints directly (apify api). Headless APIFY_TOKEN authentication works well, though output formatting varies and --json is not uniform across all commands.
brew install apify-cli Use apify CLI for Actor scaffolding, local apify run, and apify push; use Apify MCP or apify api when reading remote datasets.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports APIFY_TOKEN headless auth and raw JSON via apify api, though lifecycle commands emit human text and lack a global --json or --dry-run flag.
APIFY_TOKENandapify apiJSON responses- No global
--jsonacrossrun/push/call
Local apify run --purge isolates tests from cloud billing, while apify call and push mutate cloud state and incur compute charges without --dry-run.
- Local
apify runisolation apify calltriggers billed cloud runs
Installable via npm (apify-cli), npx, and Homebrew (apify-cli) across macOS, Linux, and Windows.
- npm
apify-cliand Homebrew formula
Covers local Actor testing, monorepo push, remote call, and raw REST apify api requests.
- Includes
create,run,push,pull,call, andapi
Official Apify repository (apify/apify-cli) actively maintained under Apache-2.0.
- Official
apify/apify-clirepository
Official docs at docs.apify.com/cli and apify help, though subcommand flag docs vary.
- Official docs at docs.apify.com/cli
Security, Auth & Guardrails
Authenticates via APIFY_TOKEN environment variable or stores credentials locally under ~/.apify/ via apify login.
Apache-2.0 open-source CLI; Apify Cloud includes a free monthly credit tier with usage-based compute billing.
# Apify CLI Agent Rules - Authenticate with `APIFY_TOKEN` and prefer `apify run --purge` locally before `apify push` or `apify call`. - Remember `apify call` incurs Apify Cloud compute units; verify Actor input payloads first.
Agent-Ready Command Recipes
Safe Read-Only Queries
apify api -X GET /v2/acts
Fetches your account's Apify Actors via the authenticated REST API in JSON.
apify api --list-endpoints
Lists available REST endpoints supported by apify api without mutating cloud state.
Controlled Writes & Previews
apify run --purge
Executes the current Actor project locally after resetting local dataset/KV storage.
Strengths for Agents
- + Local
apify run --purgelets agents verify Actor behavior before cloud deployment. - + Includes
apify api --list-endpointsfor direct authenticated JSON REST queries.
Caveats & Pitfalls
- ! No global
--jsonor--dry-runflag oncreate,push, orcall. - !
apify callexecutes remote Actors and consumes Apify Cloud compute units.