Create Repository (init)

Use init once to bootstrap a new worker repository skeleton.

Command

npx worker-cli init

What it creates

init copies base templates into the current directory and creates workers/.

Typical generated top-level files:

  • .env
  • .gitignore
  • .gitattributes
  • README.md
  • README.repo-guidelines.md
  • AGENTS/
  • workers/

[INFO!folder/SAFE BEHAVIOR] Existing files are not overwritten during init; they are skipped.

Recommended flow

mkdir my-workers && cd my-workers
npx worker-cli init
npx worker-cli doctor

Re-sync policy docs later

When you need updated guideline templates:

npx worker-cli update-repo-guidelines

This refreshes README.repo-guidelines.md and AGENTS/* from the current CLI templates.

Common mistakes

  • Running init in the wrong directory.
  • Assuming init force-updates existing files (it does not).

References

  • sdk/worker/repo-management/src/commands/init-command.ts
  • sdk/worker/repo-management/src/commands/update-repo-guidelines.ts
  • sdk/worker/repo-management/templates/init/