Guidance for Claude Code working in this repository. Humans should read README.md and CONTRIBUTING.md first.
apifyCLI —src/entrypoints/apify.tsactorCLI —src/entrypoints/actor.ts
Run yarn lint && yarn format && yarn build && yarn test:local before pushing. Run yarn test:api too if you changed anything that touches the Apify API.
If you modified a command's flags, args, description, or added/removed a command, also run yarn update-docs and commit the regenerated docs/ output.
- Package manager: Yarn 4 (via Corepack). Do not use npm.
- Use
.jsimport specifiers for local files (e.g.import { foo } from './foo.js'). The.tssource resolves at build time. - Commands extend
ApifyCommandfromsrc/lib/command-framework/apify-command.ts. Follow the pattern of existing commands:static override name,static override description,static override flags/args, and anasync run()method. - New commands must be registered in
src/commands/_register.ts(or the parent_index.tsfor subcommands). - Do not add docstrings, comments, or type annotations to code you did not change. Keep diffs tight.
- Tests use Vitest. See CONTRIBUTING.md for
useAuthSetupanduseTempPathhook usage. - API tests must include
[api]in the test name and live intest/api/. - Always
import process from 'node:process'in command/lib code — never useglobalThis.process. This is required for test cwd mocks to work.
- Do not use
--no-verifyto skip git hooks. Fix the underlying issue. - Do not edit
docs/by hand — it is generated byyarn update-docs.