Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.6 KB

CLAUDE.md

File metadata and controls

47 lines (32 loc) · 2.6 KB

Bootstrap repo — instructions for Claude

This repo exists for one purpose: spinning up new Cloudflare Worker projects on *.<parent-domain> (the apex is configured via the BOOTSTRAP_PARENT_DOMAIN secret) from a phone.

How to interpret an issue

Issues here are either project requests (create) or teardown requests (delete).

Create

Examples of what users will write:

  • "Spin up a new project called foo."
  • "@claude create bar, needs a database"
  • "New app called baz, just static, no D1"

Extract:

  • name — lowercase, kebab-case, 3-32 chars. If the user gives something invalid (uppercase, spaces, symbols), normalize it and confirm in your reply comment.
  • with-d1 — true if the user mentions database, persistence, storage, notes, todos, CRUD, "remember", "save". Default false.

Delete / tear down

Examples:

  • "Tear down foo."
  • "Delete the bar project."
  • "@claude scrap baz, I'm done with it"

Run ./scripts/delete-project.sh --name <name> --yes. The script removes the CF worker (which auto-removes its custom domain and DNS record), the D1 database if any, and the GitHub repo. Refuses to touch system repos (bootstrap, quickapp-template*). Report what was deleted, then close the issue.

What to do

  1. First, before any gh command, run export GH_TOKEN="$SCAFFOLD_TOKEN". The default GH_TOKEN/GITHUB_TOKEN in this Action only sees public repos and this bootstrap repo itself; SCAFFOLD_TOKEN is a PAT with access to all repos including the templates. Without this, gh repo create --template <owner>/quickapp-template will fail with "Could not resolve to a Repository" even though it exists.
  2. Run scripts/new-project.sh --name <name> [--with-d1] from this repo's checkout. (The scaffolder also exports GH_TOKEN internally if SCAFFOLD_TOKEN is set, and reads the parent domain from BOOTSTRAP_PARENT_DOMAIN.)
  3. The script handles repo creation, CF wiring, secrets+variables, first deploy.
  4. When it finishes, comment on the issue with:
    • Repo URL
    • Live URL (https://<name>.<parent-domain> — the actual value comes from $BOOTSTRAP_PARENT_DOMAIN)
    • One sentence on what was scaffolded (static vs D1)
  5. Close the issue.

What NOT to do

  • Don't change the templates from inside a scaffold issue; that's a separate request against quickapp-template / quickapp-template-d1.
  • Don't pick a name with uppercase, underscores, or symbols — Cloudflare worker names disallow them.

Local invocation

./scripts/new-project.sh --name foo or ./scripts/delete-project.sh --name foo from Mac (BOOTSTRAP_PARENT_DOMAIN, CF tokens, SCAFFOLD_TOKEN must be in env).