| name | apify-local-dev-loop |
| description | Set up local Apify Actor development with the Apify CLI and Crawlee.
Use when creating Actors locally, testing with the apify run command,
inspecting local storage, or establishing a fast develop-test-deploy cycle
before pushing to the platform.
Trigger with "apify dev setup", "apify local development", "develop actor
locally", "apify run local".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(npx:*), Bash(apify:*) |
| version | 1.5.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","scraping","automation","apify"] |
| compatibility | Designed for Claude Code |
Apify Local Dev Loop
Overview
Build and test Apify Actors on your local machine before deploying to the platform. The Apify CLI (apify run) emulates the platform environment locally โ creating storage directories for datasets, key-value stores, and request queues โ giving you a tight edit โ run โ inspect loop with no cloud round-trip.
Prerequisites
npm install -g apify-cli (global CLI)
apify login completed with valid token
- Node.js 18+
Authentication
The CLI authenticates with your Apify API token. Run apify login once (it stores
the token under ~/.apify/), or export APIFY_TOKEN in the shell for
non-interactive use. Local runs (apify run) do not require auth โ only
apify push / apify call reach the platform. Never commit the token or a
plaintext .env containing it.
Actor Project Structure
my-actor/
โโโ .actor/
โ โโโ actor.json # Actor metadata and config
โ โโโ INPUT_SCHEMA.json # Input schema (auto-generates UI on platform)
โโโ src/
โ โโโ main.ts # Entry point
โโโ storage/ # Created by apify run (git-ignored)
โ โโโ datasets/default/
โ โโโ key_value_stores/default/
โ โโโ request_queues/default/
โโโ package.json
โโโ tsconfig.json
Instructions
Full config files and Actor source live in
implementation.md; the high-level loop is:
Step 1: Create a New Actor Project
apify create my-actor
apify create my-actor --template project_cheerio_crawler_ts
Step 2: Configure and code
Read and Edit the scaffolded .actor/actor.json (metadata + optional dataset
view), define .actor/INPUT_SCHEMA.json (validates input and auto-generates the
platform UI), and write your crawler in src/main.ts. See
implementation.md for the complete actor.json,
input schema, and a Cheerio-based main.ts that reads validated input and pushes
structured rows via .