Documentation
Command reference
Everything you do with Heddle by hand is one command, heddle followed by its name, run from your site's repository. Run heddle on its own to list them. The 48 commands below are grouped by when you need them, from setting up and research to building and checking the site, running agents, publishing and operations. Each has its flags, an example and the accounts it needs.
Set up
heddle onboard
The guided start for a new property. It asks for every value the company's heddle/ files need, group by group, each with why it is asked and a default (read from git, gh and cf where they know it), validates each answer against the schemas, and writes heddle/. It never asks for a secret.
It names each credential, where to get it and the command that stores it.
Answers are kept in heddle/.onboard.json (gitignored), so running it again carries on where it stopped and lists what is missing. --from-url drafts answers from the company's own site, and nothing drafted is written until a person confirms it; a claim about a client, award or partner also needs who approved it and when.
With --continue it then runs install, the Cloudflare sign-in, the zone and repository checks, gh secret set for credentials already in your environment, and launch --apply, and stops (exit 3) at the first step only a person can do, saying what it is.
heddle onboard <site-repo> [--from-url u] [--answers f.json] [--non-interactive] [--continue] [--questions [--json]] [--review]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds (or will hold) heddle/. Use . when you are in it. |
--from-url url |
Draft answers from the company's existing website (home, sitemap, about, services, pricing, contact). With the AI Gateway variables set, a model drafts the descriptions, offerings and readers from the pages; otherwise plain extraction. |
--answers file.json |
Answers by question id (heddle onboard . --questions --json lists them). A claim item needs approvedBy and approvedOn. |
--non-interactive |
Ask nothing: use the answers file, the saved answers and the defaults, and fail listing what is missing. |
--continue |
After writing heddle/, run the steps to a running site through heddle, cf and gh, stopping at the first that needs a person (exit 3). |
--questions |
Print every question with its id, reason, default and current answer, and exit. |
--json |
With --questions: as JSON, for a coding agent running the interview on a person's behalf. |
--review |
Ask every question again, with the saved answers as defaults. |
Examples:
# Start from what the site already says, confirm or correct each draft.
heddle onboard ../my-site --from-url https://www.acme.test
# Carry on: finish the questions, write heddle/, then install and launch until a step needs you.
heddle onboard . --continue
# For an agent or CI: fail with the list of missing answers.
heddle onboard . --answers answers.json --non-interactive
# The questions, for an agent that asks them itself.
heddle onboard . --questions --json
Needs: git, GitHub CLI (gh), Cloudflare's cf CLI (npm package cf, pinned at 1.0.0-beta.14).
heddle setup
The five-step setup that the hosted setup screens run. Your business, your buyers and competitors, your voice, your first month and your first draft. --from-url reads the site once and drafts every step.
Each fact shows the sentence and page it came from, a price only where a page states it, and a customer's testimonial labelled as theirs, never restated as the company's result. Confirming a step approves the claims kept in it, as the person confirming, on that day. --apply writes heddle/ from confirmed steps only.
Company and readers, the company's voice section in heddle/editorial/voice.md, and heddle/calendar.json, whose first slot the content agent files for the writer on its next run.
heddle setup <site-repo> --from-url <url> [--report <sitecheck.json>] [--json]
heddle setup <site-repo> [--step <id>] [--json]
heddle setup <site-repo> --confirm <step> --as "<name> <email>" [--edits <file.json>] [--remove <id[#n]>,..]
heddle setup <site-repo> --apply --as "<name> <email>" [--repo <owner/name>] [--account <id>]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds (or will hold) heddle/. Use . when you are in it. |
--from-url url |
Read the company's site and draft every step. With the AI Gateway variables set, a model drafts descriptions, readers and the voice from the pages; with DataForSEO, competitors and search volume are measured. |
--report file.json |
The free site check's report for the same site (heddle sitecheck <url> --json): its buyer questions and near-miss searches seed the first month. |
--step id |
Show one step: business, buyers, voice, month or draft. |
--confirm step |
Confirm a step as it stands, or with --edits and --remove. |
--as "name email" |
Who is confirming. They approve the claims they keep, and become the owner on --apply. |
--edits file.json |
Replacement values by answer id, or for the month { remove: [slot], swap: [[slot, bench]] }. |
--remove ids |
Answers or items to drop, comma-separated: company.partners, company.claims.allowed#0. |
--apply |
Write heddle/ from the confirmed steps. |
--repo owner/name |
With --apply: the site's GitHub repository, when provisioning has made it. |
--account id |
With --apply: the Cloudflare account id (CLOUDFLARE_ACCOUNT_ID otherwise). |
--json |
The step, or every step, as JSON. |
Examples:
# Draft all five steps from the site.
heddle setup ../acme-site --from-url https://www.acme.test
# Confirm the business step without one claim.
heddle setup ../acme-site --confirm business --as "Pat Example pat@acme.test" --remove company.claims.allowed#2
# Write heddle/ from what was confirmed.
heddle setup ../acme-site --apply --as "Pat Example pat@acme.test" --repo acme/site
heddle init
Starts a new install. It copies the company template into the site's heddle/ folder and installs Heddle's skill for coding agents, and it refuses to overwrite a heddle/ folder that already exists. Then replace every value marked REPLACE and run heddle validate. heddle onboard does the same with questions instead of placeholders.
heddle init <site-repo>
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
Examples:
# Create my-site/heddle/ from the template.
heddle init ../my-site
heddle install
Puts Heddle into a site in one command. It writes heddle/ from the company template, with the basics you pass as flags, the managed Worker, workflow and script templates for the features you choose, package.json scripts and packages, the IndexNow key, the skill for coding agents, and heddle/install.json, the record update and doctor read.
Then it runs the launch checklist. Nothing is prompted for; a value you leave out stays REPLACE and heddle validate names it.
heddle install <site-repo> [--name n --url u --contact e | --config dir] [--with f,..] [--without f,..] [--app next] [--dry-run] [--no-launch] [--apply]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--name n |
The company's name. |
--url u |
The live site's address. |
--contact e |
The public contact address. |
--one-line text |
The one-sentence description. |
--short text |
The short description. |
--config dir |
A prepared heddle/ folder, copied over the template instead of the basics. |
--with f,.. |
Features to add: worker, next, agents, deploy, config-check, ideas, approvals, smoke. |
--without f,.. |
Features to leave out. |
--app next |
Also write a starter Next.js site that reads every fact from heddle/. |
--worker name |
The Worker's name. |
--account id |
The Cloudflare account id (CLOUDFLARE_ACCOUNT_ID otherwise). |
--contact-to e |
Where the contact form's mail goes. |
--mail-from e |
The address the site sends from. |
--preview url |
Passed to the launch checklist: check the preview host too. |
--force |
Replace managed files even where they were edited in the site. |
--dry-run |
Print the plan and write nothing. |
--no-launch |
Skip the launch checklist at the end. |
--apply |
Let the launch checklist do the Cloudflare and GitHub steps it can. |
Examples:
# See the plan first.
heddle install ../my-site --name "Acme" --url https://www.acme.test --contact hello@acme.test --dry-run
# A new site with the starter app.
heddle install ../my-site --name "Acme" --url https://www.acme.test --contact hello@acme.test --app next
Needs: git, GitHub CLI (gh), Cloudflare's cf CLI (npm package cf, pinned at 1.0.0-beta.14), CLOUDFLARE_ACCOUNT_ID.
heddle validate
Checks a site's heddle/ folder. It reads every file against its schema and looks for placeholders left in, agents above report with no approver, shared kill switches, the budget, the ledger and the family datasets, and exits 1 on any error. Run it after every edit to heddle/.
heddle validate <site-repo>
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
Examples:
# Is the install's configuration complete and consistent?
heddle validate .
heddle skill
Heddle's method as an Agent Skill for coding agents. install copies it into a site's .claude/skills/heddle/ and points the site's AGENTS.md and CLAUDE.md at it; public writes the publishable variant with public lessons only. With no argument it regenerates the skill inside the Heddle repository.
heddle skill
heddle skill check
heddle skill install <site-repo> [--check]
heddle skill public <dir> [--zip file]
| Argument or flag | What it does |
|---|---|
check|install|public |
What to do; nothing regenerates skills/heddle/ in Heddle itself. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--check |
install: exit 1 when the site's copy or pointer is stale. |
--zip file |
public: also write the skill as a zip. |
Examples:
# Give the site's coding agents the current skill.
heddle skill install .
# In CI: fail on a stale copy.
heddle skill install . --check
heddle launch
The go-live checklist for a site, covering the Cloudflare zone, Worker, domain and KV, email in and out, DMARC, Turnstile, Search Console, GitHub secrets and workflows, the opt-in analytics (Web Analytics site, beacon, CTA counter), and the live site. Prints PASS, TODO with the exact next step, FAIL or SKIP for each.
Read-only, unless --apply, which does only the safe Cloudflare steps it found missing.
heddle launch <site-repo> [--apply] [--preview url] [--json]
heddle launch <site-repo> --agent-app [--code c | --conversion file] [--no-listen] [--app-name n]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--apply |
Create what is missing, through cf and gh: KV namespaces (the runner's HEDDLE_STATE among them), Email Routing, the DMARC record, Turnstile hostnames, this property's tokens, the secrets the Worker and the agents share (the runner's HEDDLE_RUNNER_SECRET among them), the HEDDLE_RUNNER_URL variable, and, with site.json analytics on, the Web Analytics site (its public token written into site.json) and the CTA_CLICKS namespace. Needs a cf sign-in or the launch token; never edits or deletes. |
--preview url |
Also check the preview host before the domain is attached. |
--agent-app |
Create the site's "<Site> Site Agents" GitHub App with GitHub's App Manifest flow, so the agents open, push and merge as it and their pull requests run the real checks. Heddle serves the manifest on 127.0.0.1; a person clicks Create GitHub App, then Install on the site's repository. Heddle stores HEDDLE_AGENT_APP_ID and HEDDLE_AGENT_APP_PRIVATE_KEY with gh secret set (never printed) and writes heddle/agent-app.json. |
--code code |
With --agent-app: the code= value from the address bar GitHub redirected to, when the browser could not reach the listener (--no-listen). |
--conversion file |
With --agent-app: finish from the conversion answer a failed launch saved (it names the file, mode 0600): stores the secrets and waits for the install without a new code. Delete the file afterwards. |
--no-listen |
With --agent-app: write the manifest page to .heddle-cache/agent-app.html instead of serving it, for a remote shell; then paste the code with --code. |
--app-name name |
With --agent-app: the app's name, when "<Site> Site Agents" is over GitHub's 34 characters or taken. |
--json |
The checklist as JSON. |
Examples:
# Where the launch stands.
heddle launch .
# Do the safe Cloudflare steps, then rerun without --apply.
heddle launch . --apply
# Create the Site Agents GitHub App (two clicks: Create, then Install).
heddle launch . --agent-app
Needs: GitHub CLI (gh), CLOUDFLARE_LAUNCH_TOKEN, CLOUDFLARE_API_TOKEN, GSC_KEY_FILE, PLUNK_API_KEY.
heddle app
Creates the one public "Heddle Agents" GitHub App with GitHub's App Manifest flow, on the organisation that runs Heddle. Client repositories install it, and their agent jobs trade their GitHub Actions ID token at the broker site's Worker for a token scoped to their own repository, so no client's CI ever holds the app's key.
A person clicks Create GitHub App; Heddle converts the key to PKCS#8, sets it as the broker Worker's HEDDLE_GITHUB_APP_KEY secret (never printed) and writes site.json worker.githubBroker. Run it once, from the broker site's repository.
heddle app connect <site-repo>
heddle app create-public <site-repo> --org <owner> [--code c | --conversion file] [--no-listen] [--app-name n] [--keep-local file]
heddle app grant <site-repo> <owner> [--revoke]
| Argument or flag | What it does |
|---|---|
connect |
From a client site's repository: set the repository variable HEDDLE_AGENT_BROKER from site.json identity.broker with gh (no Cloudflare access needed), and ask the broker whether the Heddle Agents app is installed on the repository. |
create-public |
From the broker site's repository: create the app and store its key on the Worker. |
grant |
From the broker site's repository: let a client's GitHub account (its numeric id, read with gh) download Heddle's releases from the broker's /heddle/release, or with --revoke stop it. The app is public, so installing it alone gets no Heddle. |
<site-repo> |
The site's repository: the folder that holds heddle/. |
--org owner |
The GitHub organisation that owns the app. |
--code code |
The code= value from the address bar GitHub redirected to, when the browser could not reach the listener (--no-listen). |
--conversion file |
Finish from the answer a failed run saved (it names the file, mode 0600) without a new code. Delete the file afterwards. |
--no-listen |
Write the manifest page to .heddle-cache/public-app.html instead of serving it, for a remote shell; then paste the code with --code. |
--app-name name |
The app's name, when "Heddle Agents" is taken. |
--keep-local file |
Also append the key, base64, to this env file (mode 0600). Off by default: the Worker holds the only copy. |
--revoke |
With grant: take the account's releases away. |
Examples:
# Create the public app (one click: Create GitHub App) and wire the broker.
heddle app create-public . --org Example-Org
# On a client site: point the agents at the broker and check the app is installed.
heddle app connect .
# On the broker site: give that client's GitHub account Heddle's releases.
heddle app grant . Example-Client
Needs: GitHub CLI (gh), CLOUDFLARE_LAUNCH_TOKEN.
heddle update
Brings an install's managed files, package.json scripts and record up to the Heddle you have checked out. A managed file that was edited in the site is refused, because the change belongs in Heddle's template, unless you pass --force. It never touches the facts in heddle/. It keeps the agents' Workflow runner configured.
The first time it switches it on (autonomy.json runtime.runner, agents.json, and the Workflow binding and crons in wrangler.jsonc), and after that it keeps the schedules and crons in step, unless runtime.runner.enabled is false. It does not run the launch checklist; heddle launch --apply provisions what the runner needs outside the repository.
heddle update <site-repo> [--with f,..] [--without f,..] [--force] [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--with f,.. |
Add these features. |
--without f,.. |
Remove these features. |
--force |
Replace managed files even where they were edited in the site. |
--dry-run |
Print the plan and write nothing. |
Examples:
# What a pull of Heddle would change in this site.
heddle update . --dry-run
heddle review
Sets up the review gate and the required gates status in the site's GitHub repository with gh. labels creates the labels the review gate and the helpful record read (content-reviewed, positioning-approved, video-watched, clef-omni-passed, helpful-held, helpful-recalibration, or the names site.json gives them) in the site's GitHub repository with gh, or updates their colour and description.
The gate itself runs inside heddle check in strict mode, against the pull request's base; see playbook/quality-gates.md, Review labels. protect adds a repository ruleset that requires the gates status from the GitHub Actions app on the default branch, so an agent's pull request (which sets gates itself) and a person's (heddle-check.yml) both need it.
It refuses while heddle-agents.yml, heddle-smoke.yml or heddle-forms.yml push the agents' record straight to the default branch, or heddle-ideas.yml merges approved drafts with no gates status: GitHub does not let the Actions app bypass a ruleset, so those would stop.
heddle review labels <site-repo> [--apply]
heddle review protect <site-repo> [--apply]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. gh acts on its GitHub remote. |
--apply |
labels: create or update the labels; protect: create or update the ruleset. Without it, say what would be done. |
Examples:
# Require the gates status on the default branch, once heddle-check.yml is installed.
heddle review protect . --apply
# The labels this install's review settings name.
heddle review labels .
# Create them (gh label create --force).
heddle review labels . --apply
Needs: GitHub CLI (gh).
Research
heddle research
Demand, results pages, positions and Search Console for your site. check says which credentials are set. keywords reads volume and cost per click, serp reads a live results page, track reads positions for heddle/targets.json, and gsc reads Search Console (low click-through, striking distance, compare, inspect, prune, weekly). hn and reddit find buyers' own words.
heddle research <site-repo> check
heddle research <site-repo> balance
heddle research <site-repo> keywords "<term>" ["<term>" ...]
heddle research <site-repo> serp "<query>" [depth] [--location "City,State,Country"]
heddle research <site-repo> track [--save] [--force] [--slice]
heddle research <site-repo> gsc check|low-ctr [days] [min]|query "<term>" [days]|striking [days] [min]
heddle research <site-repo> gsc compare "<path regex>" <YYYY-MM-DD> [days]|page "<path>" <YYYY-MM-DD> [days]
heddle research <site-repo> gsc inspect <path> [...] | --sitemap "<path regex>"
heddle research <site-repo> gsc weekly
heddle research <site-repo> gsc prune <path> [...] [--days 90]
heddle research <site-repo> hn|reddit "<query>" [limit]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
check|balance|keywords|serp|track|gsc|hn|reddit |
What to read. |
--json |
Raw rows as JSON. |
--location "City,State,Country" |
serp: read the page as seen from this place. City searches must be read from the city. |
--save |
track: record this reading as the new baseline (refused within 21 days of the last). |
--force |
track: read every target even if read recently. |
--slice |
track: only the targets due today, each once every 21 days. |
--sitemap "<path regex>" |
gsc inspect: inspect the sitemap URLs matching this. |
--days n |
gsc prune: the window (default 90). |
--all-countries |
gsc: read beyond the market country in company.json. |
Examples:
# Which data sources are configured.
heddle research . check
# DataForSEO's prepaid balance, before blaming the key.
heddle research . balance
# Volume and cost per click.
heddle research . keywords "ai seo agent" "seo automation"
# A local results page, read from the city.
heddle research . serp "plumber phoenix" --location "Phoenix,Arizona,United States"
# Searches at positions 4 to 20 worth a push.
heddle research . gsc striking 90 20
Needs: DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD, GSC_KEY_FILE, GSC_SERVICE_ACCOUNT_JSON, REDDIT_CLIENT_ID.
heddle propose
Measured candidate searches for one page pattern. It crosses the pattern with your values (cities, roles, products), reads search volume for each, and prints a shortlist with three judgement columns left blank for a person. With --competitors it lists what your competitors rank on page one for that you do not track.
heddle propose <site-repo> --family <id> [--values file] [--places file] [--limit n] [--serp n] [--json]
heddle propose <site-repo> --competitors [--limit n] [--json]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--family id |
The page pattern (heddle families lists them). |
--values file |
The changing part of the pattern, one per line. |
--places file |
The same, for a place pattern. |
--limit n |
How many to list (default 30; 40 for --competitors). |
--serp n |
Also read the live results page for the top n. |
--competitors |
What company.json's competitors rank for instead. |
--json |
Results as JSON. |
Examples:
# City pages, with three results pages read.
heddle propose . --family locations --places metros.txt --serp 3
# Demand your competitors have proved.
heddle propose . --competitors
Needs: DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD.
heddle families
Lists Heddle's catalog of page patterns (families), with the search each one answers, its doorway risk, and where it has been proven. Read it before choosing what kind of pages to build.
heddle families [--kind service|product]
| Argument or flag | What it does |
|---|---|
--kind service|product |
Only the patterns that suit a service company or a product. |
Examples:
# The patterns that suit a product.
heddle families --kind product
heddle audit
Crawls the live site, up to a page limit, four pages at a time, and writes a technical audit as Markdown and JSON, covering status codes, titles, canonicals, noindex, sitemap coverage and the problems found. Works on any URL, so you can audit a site before it has a heddle/ folder.
heddle audit <site-repo|url> [--max 500] [--out dir] [--quiet]
| Argument or flag | What it does |
|---|---|
<site-repo|url> |
A site repository (the URL comes from company.json) or any https:// address. |
--max n |
The most pages to fetch (default 500). |
--out dir |
Where to write audit-<date>.md and .json (default heddle/, or the current folder for a URL). |
--quiet |
No progress lines. |
Examples:
# Audit a site you have not set up yet.
heddle audit https://example.com --max 200
# Audit your own live site into heddle/.
heddle audit .
heddle collect
Runs the site's collectors (heddle/collectors/). Each measures or reads the figures for one statistics row, from an AI-assistant answer panel, a public JSON source that robots.txt allows, or the company's own exported CSV or JSON.
It records the reading in heddle/data/<id>/, applies the figures that moved within their bounds to the row with a changelog entry, and regenerates heddle/generated. A failed reading keeps the last good figures; a move past maxChangePct is held for you.
heddle collect <site-repo> [--only <id>] [--accept <key=value,...>] [--write-record] [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--only <id> |
Run this collector only, whether or not it is due. |
--accept <key=value,...> |
With --only: apply the values held for these figures, exactly as the report showed them, without measuring again. Each key names the value you checked; a different held value is refused. Never writes heddle/collect-record.json. |
--write-record |
Also write heddle/collect-record.json from this run. Off by default: the agent's workflow pushes that file daily, and a local copy conflicts with it. |
--dry-run |
Measure and print the report and the files it would change. Writes nothing (an assistants panel still spends). |
Examples:
# What every due collector would change.
heddle collect . --dry-run
# Read one collector now.
heddle collect . --only ai-answer-citations
# Apply a held value after checking it against its source.
heddle collect . --only ai-answer-citations --accept reddit-share=41%
Needs: DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD.
heddle legacy
Run it before an overhaul. It writes heddle/legacy-urls.txt from the live sitemap and, with Search Console credentials, every page that has had impressions. The URL check then makes sure each old address still resolves on the new site. Run it before building the new site and again before cutover.
heddle legacy <site-repo> [--from url] [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--from url |
The live site to read, when it is not company.json url. |
--dry-run |
Print what it found and write nothing. |
Examples:
# Inventory the old site before replacing it.
heddle legacy . --from https://www.example.com
Needs: GSC_KEY_FILE.
heddle data
The search data providers a site declares in site.json and what each answers. status shows which provider answers each capability and which credential is missing, get reads one capability by hand, and tools and mcp offer the same data to a model or a coding agent.
Paid capabilities are refused there unless --paid, and every paid call is held to the provider's per-run cap.
heddle data <site-repo> status
heddle data <site-repo> get <capability> [json]
heddle data <site-repo> tools [--paid]
heddle data <site-repo> mcp [--paid]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
status|get|tools|mcp |
What to do. |
<capability> |
get: a capability status lists, such as keywordVolume. |
--paid |
tools and mcp: offer the capabilities that spend credit. |
Examples:
# Which provider answers what, and what is missing.
heddle data . status
# One reading by hand.
heddle data . get keywordVolume '{"terms":["seo agent"]}'
Needs: DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD, GSC_KEY_FILE, PAGESPEED_API_KEY.
heddle sitecheck
Reads a public site the way search and AI crawlers do and reports, in plain words, whether Google ranks it, whether ChatGPT and Perplexity name it for the questions its buyers ask, what blocks crawlers, and the five fixes that matter most.
Every technical finding says what was seen; a page that could not be read is reported as unread, never as missing something. Without DataForSEO the Google and AI sections say they are unavailable, and without the model the AI questions are not drafted.
heddle sitecheck <url> [--json]
| Argument or flag | What it does |
|---|---|
<url> |
The site to check, such as example.com. |
--json |
The report as JSON. |
Examples:
# Check a site and print the report.
heddle sitecheck example.com
Needs: DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD, CF_AIG_TOKEN.
Build and check
heddle generate
Writes heddle/generated/ from the family datasets, one JSON file per family with every publishable row and the sibling links each page must carry. It also writes the public playbook and the documentation when site.json asks for them. The site's build runs it first.
heddle generate <site-repo> [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
List what would change. |
Examples:
# Regenerate after editing a dataset.
heddle generate .
heddle check
Runs the quality gates on the built site, from titles, structured data and links to uniqueness, prose, claims and the model-judged gates. Run it after every build and before every pull request; the deploy script runs it and stops on a failure.
Without the model token the model gates report SKIPPED, which is not a pass, and in CI they fail.
heddle check <site-repo> [--only a,b] [--skip a,b] [--out dir] [--content dir] [--offline] [--require-model] [--strict] [--base ref] [--update] [--json]
heddle check <site-repo> --record-only [--base ref]
heddle check <site-repo> --rekey-gaps [--out dir] [--content dir]
heddle check <site-repo> --only helpful [--routes /a,/b] [--record-readings file]
heddle check <site-repo> --prune --routes /a,/b
heddle check fact-gate <site-repo> [--ledger file] [--base ref]
heddle check verdict <site-repo> --base <ref> [--author login] [--head-ref branch]
heddle check platform <site-repo> [--base origin/main] [--only a,b] [--json]
heddle check record-readings <checkout> --from <site> --push <branch>
heddle check
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
platform |
Lint the Worker config, workflows and tests against the platform constraints instead. |
record-readings |
Commit the model's answers for the default branch onto it after a deploy, so the next pull request's strict gate trusts them and reads only what it changed. Writes only the .heddle-cache files the branch tracks. |
verdict |
Whether an agent's draft pull request merges on its recorded verdict (heddle/verdicts/): exactly one post or page changed, at the bytes that passed every publish gate before it was proposed. Writes fast=true|false to $GITHUB_OUTPUT; CI then runs the build only. Publish is final (lib/publish/gates.mjs). |
fact-gate |
Hold every changed post and landing page (working tree, index and, with --base, the branch's commits) to the writer's fact ledger: each must be the exact bytes a clean fact-check reading passed. |
--only a,b |
Run only these checks (heddle check with no site lists them). |
--skip a,b |
Run every check but these: the deploy runs the code checks with --offline --skip a11y, then a11y alone with --strict. |
--out dir |
The build folder, when it is not site.json outDir. |
--content dir |
The Markdown content folder, when it is not site.json contentDirs. |
--offline |
Skip the checks that need the model or the network, on purpose. They show as SKIPPED. |
--require-model |
Fail when a model check could not run, as CI does. |
--update |
Let a check that keeps a record rewrite it (the search surface, the helpful baseline, which only tightens). With HEDDLE_GAP_REASON set, quality, buyer and the helpful near-copy findings failing now are recorded in heddle/known-gaps.json with that reason; without it nothing is added. Either way an entry whose copy changed is dropped, and one whose copy is as recorded is kept even when the page passes that run. To move the record onto new hashes, use --rekey-gaps. |
--json |
Results as JSON. |
--strict |
Fail closed, as CI does without --offline: a model check that cannot run fails, a page the helpful gate cannot read fails, a reading the branch committed is read again, and the helpful floors and baseline are compared with --base (playbook/quality-gates.md). |
--record-only |
Only compare the helpful record (site.json helpful and the baseline) and the known-gaps record (heddle/known-gaps.json) with --base, with no build and no model: the model-free check a fork's pull request gets. |
--rekey-gaps |
Move every entry of heddle/known-gaps.json onto the hash this Heddle gives its copy, read from the build and sources with no model, and run nothing else. No entry is dropped and no page is judged: an entry whose copy changed, or whose page is gone, is reported and left as it is. Run it after building, in the pull request that brings a Heddle whose release notes say its hashes changed; the record it writes is trusted there. |
--base ref |
The git ref to compare against: for check platform, for the helpful record in strict mode (default origin/$GITHUB_BASE_REF, else site.json helpful.base, else origin/<site.json defaultBranch>, else origin/main), and for check fact-gate (also every page the branch changes against it). |
--routes /a,/b |
The helpful check reads only these routes. |
--record-readings file |
Write the helpful readings this pass used, for the prune and the check after it (HEDDLE_HELPFUL_READINGS). |
--allow-new-route /route |
The agent gate's allowance, never set by hand or in a pull request's CI: in strict mode the helpful record accepts this one new route, whole, when the branch changes its source and the route may be held. Refused in a pull request's run; never excuses a new question on an existing route, a lowered score or another route. |
--prune |
Cut the named routes' helpful baseline entries to what their recorded readings still miss. Reads nothing; needs --routes. |
--compact-cache |
Keep only the model answers this run used in each check's .heddle-cache file, for a run that judges every page (the deploy's readings job). Not with --routes. |
--from site |
check record-readings: the site whose .heddle-cache holds the readings. |
--push branch |
check record-readings: the branch to commit them to, retried from a fresh copy of it. |
--author login |
check verdict: the pull request's author; only a bot account's draft merges on its verdict. |
--head-ref branch |
check verdict: the pull request's head branch; only an agent's heddle/<agent>- branch merges on its verdict. |
--ledger file |
check fact-gate: the fact ledger (default heddle/reports/writer-fact-ledger.json). |
Examples:
# Every gate, with the model.
heddle check .
# The code gates only, with no token and no network.
heddle check . --offline
# Two gates while you edit copy.
heddle check . --only humanizer,claims
# What CI runs on a pull request (templates/github/heddle-check.yml).
heddle check . --strict --base origin/main
# The platform lint on what changed.
heddle check platform . --base origin/main
Needs: Chromium or Google Chrome, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN.
heddle aeo
Writes the answer-engine files into the built site after the export and before the deploy. Those are a Markdown twin of every page, llms.txt, llms-full.txt and, when site.json asks, _headers. It writes nothing if any twin would come out thin or disagree with its page.
It names each page a template manifest claims in <meta name="heddle-template">, so the site's page files never carry it. On a site with the launch ramp on, it also takes the programmatic pages not yet admitted out of the built sitemap and lists them in heddle-ramp.json.
With site.json mcp.enabled, it writes the index the site's MCP server reads and, with mcp.registry, its registry entry; a bad value there stops the build.
heddle aeo <site-repo> [--out dir] [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--out dir |
The build folder, when it is not site.json outDir. |
--dry-run |
Print llms.txt and write nothing. |
Examples:
# Run after next build; the site's build script does it for you.
heddle aeo .
heddle templates
Manages heddle/templates/, which the pseo check holds every programmatic page to. init scaffolds a manifest for each generated family (its pages, entities and any searches the rows carry; REPLACE where only a person knows) and a hand-written.json entry for each route family with no template. measure writes dated evidence and each template's day-1 baseline, read-only from Search Console and, for --volumes, DataForSEO within a cost cap. known records today's findings in known.json, the list that only shrinks.
heddle templates init <site-repo> [--dry-run]
heddle templates measure <site-repo> [--evidence] [--volumes] [--baseline [id...]] [--backfill] [--max-cost 0.5] [--dry-run]
heddle templates known <site-repo> [--dry-run]
heddle templates intent <site-repo> [--max n] [--dry-run]
| Argument or flag | What it does |
|---|---|
init |
Scaffold manifests for generated families that have none, add undeclared pages to existing ones, and list uncovered route families in hand-written.json. Never overwrites. |
measure |
Write evidence/gsc-<date>.json (--evidence), evidence/dataforseo-<date>.json (--volumes) and baseline.json (--baseline). |
intent |
Read the top ten results for each family row's search (the manifest's first declared search, else its tracked target) with DataForSEO, and keep the reading in heddle/intent.json. A row is generated only once page one is its family's kind of page. Rows with a reading under 90 days old for the same search are not read again. |
known |
Write known.json from today's findings, keeping each existing entry's date and recommendation. Run once when adopting; in CI the list only shrinks. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--evidence |
Search Console, 90 days: every template page's impressions, clicks, position and top searches. |
--import file |
Volume readings from another tool, with --source <name> listed in site.json pseo.volumeSources: a CSV of query,volume (a header row is skipped) or JSON [{ q, volume }]. Written to evidence/<source>-<date>.json; an empty volume is null (unknown), never 0. |
--source name |
With --import: the tool the volumes came from. |
--volumes |
DataForSEO exact-match volume for declared searches with no reading yet; a search it has no number for is recorded as null (unknown), never 0. |
--baseline [id...] |
The day-1 baseline for templates that have none, or those named: pages, indexable, in the sitemap, indexed (URL Inspection), impressions, clicks, position (28 days), leads, and the tracked searches (how many, their median position, the share on another page of ours, place searches answered by another place's page). |
--backfill |
Fill only the tracked measures an existing baseline holds as unknown, from readings dated on or before its own date (heddle/history.json, targets.json as committed that day, Search Console for its window). A recorded value is never changed; what that day cannot answer stays unknown. |
--max-cost usd |
The most --volumes may spend (default 0.50). |
--max n |
intent: at most n results pages read in this run (default 50). Each is a paid DataForSEO call. |
--dry-run |
Print what would be written, and write nothing. |
Examples:
# Adopt the pseo check: scaffold a manifest per generated family.
heddle templates init .
# Read demand and take every template's day-1 baseline.
heddle templates measure . --evidence --volumes --baseline
# Read page one for up to ten family rows that have no reading yet.
heddle templates intent . --max 10
# Record what the check finds today, so it passes and the list can only shrink.
heddle templates known .
Needs: GSC_KEY_FILE, DATAFORSEO_LOGIN, HEDDLE_LEADS_TOKEN.
heddle diagrams
Renders every mermaid block in the site's posts and datasets to an SVG in the brand's colours and font, so the page inlines a captioned figure instead of running a script. Commit what it writes; the build fails on a diagram with no render.
heddle diagrams <site-repo> [--check] [--force] [--prune]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--check |
Render nothing. Exit 1 if a diagram is uncaptioned, does not parse, is unrendered or is rendered in an older theme. |
--force |
Render everything again, after a brand colour or font changes. |
--prune |
Delete rendered SVGs no diagram uses any more. |
Examples:
# Render what is new.
heddle diagrams .
# In CI: fail on a stale or missing render.
heddle diagrams . --check
Needs: Chromium or Google Chrome.
heddle images
Measures every image the site's content references into heddle/image-dimensions.json, so each image on a page gets its width and height and the page does not jump while it loads. Only new images are read. Commit what it writes.
heddle images <site-repo> [--remote]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--remote |
Fetch an image from the live site when there is no local copy (media kept in object storage). |
Examples:
# Measure images that live only in R2.
heddle images . --remote
heddle brand
Checks heddle/brand.json against its schema and against company.json, then builds the downloadable brand kit the /brand page links to, with logos in each format, the colours and type, and one zip. Commit what it writes.
heddle brand <site-repo> [--out dir] [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--out dir |
Write the kit somewhere other than site.json brand.kitDir (default public/brand/kit). |
--dry-run |
List the files it would write. |
--date YYYY-MM-DD |
The date stamped in the kit's manifest, for a reproducible build. |
Examples:
# Rebuild the kit after a logo or colour change.
heddle brand .
Needs: ImageMagick, librsvg and zip.
heddle covers
Draws a cover for every published post that has none, checks it against the cover rules and the judging model, and writes the SVG and a 1200x630 share image into the site's covers folder. With --fallback it writes the plain, model-free cover instead. Commit what it writes.
heddle covers <site-repo> [--only a,b] [--max n] [--dry-run] [--fallback]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--only slug,slug |
Only these posts. |
--max n |
At most this many covers (default 20). |
--dry-run |
List the posts it would draw. |
--fallback |
Write the deterministic fallback cover for every post without a drawn one. No model. |
Examples:
# Draw three covers.
heddle covers . --max 3
# Make sure no listing shows a hole.
heddle covers . --fallback
Needs: CF_AIG_TOKEN, CF_AIG_GATEWAY, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN.
heddle playbook
Writes the public playbook for a site whose site.json has a playbook block. The pages' data goes to heddle/generated/playbook.json, and the public Agent Skill and its zip go under the route. heddle generate does the same; this runs it alone.
heddle playbook <site-repo> [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
List what would change. |
Examples:
# Refresh the playbook pages' data.
heddle playbook .
heddle docs
Writes the documentation pages' data for a site whose site.json has a docs block, covering getting started, installing, this command reference, agents and autonomy, configuration and troubleshooting, all generated from Heddle itself. heddle generate does the same at every build. With --check it reports any command, credential or setting the documentation cannot describe.
heddle docs <site-repo> [--dry-run]
heddle docs --check
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
Say whether the data would change, and write nothing. |
--check |
No site: exit 1 when a command has no reference entry or its flags drift, a credential the code reads is undescribed, or a configuration field has no description. |
Examples:
# Refresh heddle/generated/docs.json.
heddle docs .
# In Heddle: is every command, credential and setting documented?
heddle docs --check
heddle register
The register audit (lib/audit/register.mjs). Reads each post against its section's profile in heddle/registers.json with the judging model, after calibrating every question on a corpus of human and machine anchors, and writes a report ranking the pages whose voice is weakest. An audit, never a gate.
The report says which questions separate human from machine writing on this site's own anchors, and only those rank pages.
heddle register <site-repo> [--anchors dir] [--routes /a,/b] [--out file]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--anchors dir |
The anchor corpus: dir/human/.md (your people's own writing) and dir/machine/.md (plain model drafts and rejected copy). Default heddle/register-anchors. |
--routes /a,/b |
Only these routes. |
--out file |
Where to write the report (default heddle/reports/register-<date>.md). |
Examples:
# Audit two posts against the calibrated questions.
heddle register . --routes /blog/one,/blog/two
Needs: CLOUDFLARE_API_TOKEN.
heddle buyer
The buyer test on one route's first screen, without waiting for a build. With only a route it prints the first screen exactly as heddle check reads it (the result snippet, the H1, the first three paragraphs, bylines left out), from the last build.
With a draft file in the same shape it scores the draft as that route's reader, a post with the post question, three readings and a re-read on a miss, as the check does. Exit 0 pass, 1 miss, 2 when it cannot read (no reader for the route, no model, no build to print).
heddle buyer <site-repo> <route> [draft.txt] [--json]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
<route> |
The page's route, as the site serves it: /services/data, /blog/a-post. |
[draft.txt] |
The proposed first screen: "Search result: <title> — <description>", "Heading: <h1>", then up to three paragraphs, blank lines between. |
--json |
The scores and misses as JSON. |
Examples:
# The current first screen, to edit.
heddle buyer . /services/data > draft.txt
# Score the edit before building.
heddle buyer . /services/data draft.txt
Needs: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN.
heddle guidelines
The Google-guidelines panel the writer runs on every agent-sourced draft before a person is asked to approve it: Clef, Jev and Microsoft-Decision-1 read the draft against Google's own wording on AI content, effort, originality, accuracy, authorship and scaled content. status prints the install's thresholds and when they were measured.
read runs the panel on one Markdown file (exit 0 pass, 1 fail, 2 unread; an uncalibrated install exits 0 and gates nothing). calibrate reads heddle/guidelines.json sets (good: posts people wrote and approved; bad. Retellings, or "noindex" for every noindexed post) twice with every configured model and writes the thresholds back.
A question is gated for a model only where its threshold, set just past the edge of the good set, also catches at least 30% of the bad set.
heddle guidelines <status|read|calibrate> <site-repo> [file] [--json]
| Argument or flag | What it does |
|---|---|
<status|read|calibrate> |
What to do. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
[file] |
read: the Markdown draft or post to read. |
--json |
read: the verdict as JSON. |
Examples:
# Which questions gate, per model, and the calibration's result.
heddle guidelines status .
# One post's reading.
heddle guidelines read . content/blog/a-post.md
# Measure the thresholds on this site's own posts.
heddle guidelines calibrate .
Needs: OPENROUTER_API_KEY.
heddle score
Scores one page or draft from 0 to 100 on whether it will earn search and AI-answer visibility. Whether it sounds like a person, the search basics, whether an answer engine can quote its answer, whether its figures carry sources, and Google's helpful-content questions. Every finding names the sentence it is about and the repair.
It is made of the same rules heddle check gates on, so a draft that scores well here passes them there. Without the model, the helpful part and the model reads are SKIPPED and left out of the total, never guessed. Exit 0, or 1 under --min, or 2 when it cannot read the input.
heddle score <url|file.md|file.html> [--query "search"] [--kind article|page] [--json] [--offline] [--min n]
| Argument or flag | What it does |
|---|---|
<url|file> |
A live URL, a built .html file, or a Markdown/MDX draft (its frontmatter title, metaTitle and description are read). |
--query |
The search the page should answer. Default: its H1, else its title. |
--kind |
article or page. Default: a draft is an article; a page is one when its route is a post route or its markup says Article. An article may open on a story when its description answers the search. |
--json |
The parts, the total and every finding as JSON. |
--offline |
Only the parts that need no model. |
--min |
Exit 1 when the total is under this. |
Examples:
# Score a live page.
heddle score https://example.com/blog/a-post
# Score a draft against the search it targets.
heddle score draft.md --query "how long does seo take"
Needs: CLOUDFLARE_ACCOUNT_ID, HEDDLE_AI_TOKEN.
heddle voice
The company-voice and company-work gates on one post, before a build.
Prints whether the opening brings the company and its real work in early (and opens differently from the site's last ten posts), the evidence on record that the post may rest on, and the model's reading of whether it rests on real company work, is more than a retelling of vendor docs, invents nothing, and sounds like the site's own voice guide (site.json voiceGuide).
With --mode, prints the editor assistant's brief for brainstorm, draft or redline instead, with the guide. --fix proposes a new opening paragraph written only from that evidence and checked against both rules; --write saves it. With no evidence it changes nothing and says what a person must record.
Exit 0 pass, 1 a miss, 2 when it cannot read.
heddle voice <site-repo> <post> [--fix [--write]] [--json] | voice <site-repo> --mode brainstorm|draft|redline
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
<post> |
The post's file, relative to the site: content/blog/a-post.md. |
--fix |
Propose a new opening paragraph from the recorded work (needs the writer model, CF_AIG_TOKEN and CF_AIG_GATEWAY). |
--write |
With --fix: write the new opening into the file. |
--json |
The result as JSON. |
--mode mode |
brainstorm, draft or redline: print the editor assistant's brief for that mode with the site's voice guide (lib/voice/assistant.mjs), for an author's own agent. |
Examples:
# Does this post open in the company voice, and what does it rest on?
heddle voice . content/blog/retries.md
# Rewrite the opening from the recorded work.
heddle voice . content/blog/retries.md --fix --write
# The editor assistant's brief for restrained edits, with the voice guide.
heddle voice . --mode redline
Needs: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN.
Agents
heddle agent
One run of one agent against a site. The level comes from autonomy.json and can only be lowered here. A run that already succeeded inside the agent's schedule does nothing unless forced. The scheduled workflow calls this; you run it by hand to try an agent or to see what it would do.
heddle agent <id> <site-repo> [--dry-run] [--level l] [--force]
| Argument or flag | What it does |
|---|---|
<id> |
The agent: memory, research, strategy, content, families, writer, seo, refresh, collect, authority, site, followup, paid, covers, video, watchdog, canary or update. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
Read, decide and print the report and the pull requests it would open. Writes nothing. |
--level off|report|propose|merge |
Run below the configured level. A higher value is ignored. |
--force |
Run even though a clean run already happened inside the schedule. |
Examples:
# What the SEO agent would do today, without doing it.
heddle agent seo . --dry-run
# Run the watchdog, reporting only.
heddle agent watchdog . --level report
Needs: git, GitHub CLI (gh), CF_AIG_TOKEN, CF_AIG_GATEWAY, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, DATAFORSEO_LOGIN, GSC_KEY_FILE, PLUNK_API_KEY.
heddle recommendations
Prints the recommendations ledger, with every recommendation an agent made, what is still open, oldest first, and who it waits on. Anything open past the limit is marked overdue. Close an entry by editing heddle/recommendations.json and running heddle validate.
heddle recommendations <site-repo> [--all] [--json]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--all |
Every entry, closed ones included. |
--json |
The counts and open entries as JSON. |
Examples:
# What is waiting, and on whom.
heddle recommendations .
heddle ideas
One pass of blog ideas by email. It reads the ideas the site's Worker holds, then drafts, asks the author, publishes on the author's signed approval, or withdraws each one. The heddle-ideas workflow runs it when mail arrives and every hour.
ideas resolve records an agent's idea that a person published by hand, so the watchdog sees it resolved.
heddle ideas <site-repo> [--dry-run]
heddle ideas resolve <site-repo> <idea-id> --pr <url> --post <path> [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
resolve |
Record that the idea in heddle/ideas.json was published by hand. It refuses unless the pull request is this repository's, merged into the default branch, and the post's path exists there; publishedAt is the merge time. Commit heddle/ideas.json afterwards. |
<idea-id> |
With resolve: the idea's id in heddle/ideas.json (idea-<id> works too), or a slug only one idea has. |
--dry-run |
Decide and print. No state, no branch, no email. With resolve: check the evidence and write nothing. |
--pr url |
With resolve: the merged pull request that published the idea. |
--post path |
With resolve: the published file, relative to the repository (content/blog/<slug>.md). |
Examples:
# What the next pass would do.
heddle ideas . --dry-run
# Idea 12 went live in a pull request a person made: record it as published.
heddle ideas resolve . 12 --pr https://github.com/acme/site/pull/40 --post content/blog/pricing.md
Needs: git, GitHub CLI (gh), CF_AIG_TOKEN, CF_AIG_GATEWAY, HEDDLE_IDEAS_TOKEN, PLUNK_API_KEY.
heddle runner
Starts one slot of the agents' Workflow runner now, with the same instance id and parameters the Worker's cron would use, through Cloudflare's cf CLI. Use it to prove a new install's runner from end to end without waiting for a schedule, or to rerun a slot. status reads where an instance is.
heddle runner start <site-repo> <agent> [--wait minutes]
heddle runner status <site-repo> <instance>
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
<agent> |
An agent on the runner (autonomy.json runtime.runner.agents). |
<instance> |
An instance id, heddle-<agent>-<UTC date>-<hour>. |
--wait minutes |
Wait up to this long for the instance to finish, and say how it ended. |
Examples:
# Run the canary through the runner now and wait for it.
heddle runner start . canary --wait 30
# Where that slot is.
heddle runner status . heddle-canary-2026-10-12-14
Needs: Cloudflare's cf CLI (npm package cf, pinned at 1.0.0-beta.14).
heddle advise
Prints the parts of Heddle's playbook, lessons, tactics, checks, page patterns and agents that bear on a topic, as Markdown. A coding agent runs it before changing anything search-relevant. It searches local files by keyword, so it needs no model or network and spends nothing.
heddle advise <topic> [--limit n] [--kind lesson,check,...] [--json] [--full]
| Argument or flag | What it does |
|---|---|
<topic> |
A few plain words or a question. |
--limit n |
How many results (default 8). |
--kind lesson,check,... |
Only these kinds: playbook, lesson, tactic, check, family, agent. |
--json |
Results as JSON. |
--full |
Each result in full rather than its first lines. |
--public |
Only what the public playbook publishes (public lessons). |
Examples:
# What Heddle says about sitemap dates.
heddle advise "sitemap lastmod"
# The lessons and checks about canonicals, as JSON for a script.
heddle advise canonical --kind lesson,check --json
heddle mcp
A read-only MCP server, over stdio, that lets a coding agent search Heddle's playbook, lessons and checks while it works. With --site it also serves that site's search data tools, the free ones only unless --paid. Register it once with your agent.
heddle mcp [--site <site-repo> [--paid]]
| Argument or flag | What it does |
|---|---|
--site <site-repo> |
Also mount the site's search data tools (heddle data), and its voice guide for the voice_guide tool. |
--paid |
With --site, allow the tools that spend data credit. |
Examples:
# Started by the agent: claude mcp add heddle -- node <heddle>/bin/heddle.mjs mcp
heddle mcp
# The same, with this site's free search data tools.
heddle mcp --site .
heddle drafts
One pass of the jobs a site's MCP server has queued. The full check of a draft an author filed, reading a live post into its revision, and publishing a draft its author confirmed.
It runs every publish gate and the fact-check on exactly the saved text, on the site's own runner, and is the only thing that can record a result, so an author's agent never grades its own draft. Run by the heddle-mcp workflow.
heddle drafts <site-repo>
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
Examples:
# Run the queued checks and publishes once.
heddle drafts .
Needs: git, GitHub CLI (gh), CF_AIG_TOKEN, CF_AIG_GATEWAY, HEDDLE_MCP_TOKEN, HEDDLE_APPROVAL_SECRET.
Publish
heddle indexing
Getting new and changed pages crawled. key creates the IndexNow key and its file. submit sends the sitemap URLs that are new or changed since the last accepted submission to IndexNow (Bing and others) after every deploy; where the site deploys from GitHub Actions, CI does this and owns heddle/indexing.json.
list prints today's Search Console list for the indexing bot and, with --send, emails it. record is the deploy workflow's step that merges what a submit accepted.
heddle indexing key <site-repo>
heddle indexing submit <site-repo> [--all] [--dry-run] [paths...]
heddle indexing list <site-repo> [--send] [--dry-run]
heddle indexing record <dir> <delta.json> [--push branch]
| Argument or flag | What it does |
|---|---|
key|submit|list|record |
What to do. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
paths... |
submit: only these paths or URLs. |
--all |
submit: every sitemap URL, not only the changed ones. |
--send |
list: email the list to the indexing bot. |
--dry-run |
Print what would be submitted or sent. |
--local |
submit: submit from your machine even though the site deploys from CI (CI will not see the state until it is committed). |
--delta file |
submit, in CI: write what IndexNow accepted to this file for record. |
--push branch |
record: commit and push the merged state, retried from a fresh branch. |
Examples:
# Once: commit site.json and the key file, then deploy.
heddle indexing key .
# After every deploy.
heddle indexing submit .
# Today's indexing list, without sending it.
heddle indexing list . --dry-run
Needs: GSC_KEY_FILE, PLUNK_API_KEY.
heddle media
Keeps the site's images and video in an R2 bucket instead of the repository, with a committed content-hash manifest, so only what changed is uploaded. Also verifies the bucket against the manifest, lists files no page uses and reads the live headers.
heddle media <site-repo> [--dry-run] [--force] [--verify] [--orphans] [--headers]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
List what would be uploaded. |
--force |
Upload everything again. |
--verify |
Fetch every object and compare it with the manifest. |
--orphans |
List files no built page references. Never deletes. |
--headers |
Check each live URL answers 200, immutable, from the bucket. |
Examples:
# What a sync would upload.
heddle media . --dry-run
# Upload, then commit the manifest.
heddle media .
Needs: wrangler (Cloudflare's Workers CLI).
heddle video
One step of an explainer video by hand. check runs the word checks on the script (free). render makes the film. watch has the model watch it. publish uploads a merged, rendered film to the YouTube channel, private unless --public; only a person runs it. The video agent does check, render and watch itself.
heddle video check <site-repo> <slug>
heddle video render <site-repo> <slug> [--out dir] [--stills t,t] [--voice deepgram]
heddle video watch <site-repo> <slug> [--out dir]
heddle video publish <site-repo> <slug> [--out dir] [--public]
| Argument or flag | What it does |
|---|---|
check|render|watch|publish |
The step. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
<slug> |
The film's spec, video/specs/<slug>.json. |
--out dir |
Where the film is written or read (default $VIDEO_OUT or the temp folder). |
--stills 3,12.5 |
render: only frames at these seconds. |
--voice deepgram |
render: a free draft voice instead of the configured one. |
--public |
publish: upload as public (YouTube keeps it private until the API project is audited). |
Examples:
# The free checks on a script.
heddle video check . what-is-aeo
# A draft render.
heddle video render . what-is-aeo --voice deepgram
Needs: ffmpeg, ELEVENLABS_API_KEY, YOUTUBE_CLIENT_ID, YOUTUBE_CLIENT_SECRET, YOUTUBE_REFRESH_TOKEN.
heddle deploy
Deploys the site and proves it is live. run builds, validates, runs the code checks, copies the build into the Worker's assets, stamps it and runs wrangler deploy. verify waits until the live site serves that build's stamp, then runs the canary's probe of it, and exits 1 on any problem.
The deploy workflow runs both on every merge; from a laptop, run --local deploys the working tree.
heddle deploy run <site-repo> [--local] [--prepare-only] [--sha s]
heddle deploy verify <site-repo> [--sha s] [--origin url] [--sample n]
| Argument or flag | What it does |
|---|---|
run|verify |
Deploy, or prove the deploy is live. |
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--local |
run: deploy from your machine. CI still owns IndexNow and heddle/indexing.json. |
--prepare-only |
run: build, check, copy the build into the Worker's assets and stamp it, then stop before wrangler deploy. The preview and smoke workflows upload that folder as a preview version. |
--sha s |
The commit being deployed, for the stamp. |
--origin url |
verify: the live address, when it is not site.json baseUrl or company.json url. |
--sample n |
verify: how many sitemap pages to probe (default 20). |
Examples:
# Deploy the working tree from your machine.
heddle deploy run . --local
# Is the new build what the live site serves?
heddle deploy verify .
Needs: wrangler (Cloudflare's Workers CLI), Chromium or Google Chrome, CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID.
heddle release
The release queue. Merges the oldest open pull request labelled for the queue (autonomy.json pace.queue.label, default release-queue) whose checks are green and which is up to date with the base, at most pace.queue.perRun a run, and only when the shared publishing pace budget has room.
Run it on a schedule (three times a week is the pace that kept a rewritten site in the index) so finished rewrites go live steadily, never in a burst.
heddle release <site-repo> [--dry-run]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--dry-run |
Say what would merge and why each other pull request waits; merge nothing and reserve nothing. |
Examples:
# See the queue and the reason each pull request waits.
heddle release . --dry-run
# Merge the next ready pull request, if the pace budget has room.
heddle release .
Needs: GitHub CLI (gh).
Operate
heddle smoke
The post-deploy smoke test the deploy workflow runs. It finds the preview URL, checks the Worker's bindings and the pages a deploy must serve, records the result in heddle/deploys.json, and starts the canary. A deploy that did not pass it is not to be trusted.
heddle smoke <site-repo> [--upload-log file] [--preview-url url] [--dispatch-canary | --canary-after-record] [--canary-dry-run] [--record-into dir --sha s --ref r] [--print-config] [--print-account]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--upload-log file |
The wrangler upload log, to read the preview URL from. |
--preview-url url |
The preview URL, when it is known. |
--dispatch-canary |
Start the canary workflow afterwards. |
--canary-after-record |
Leave the canary to the workflow, once the record is pushed. |
--canary-dry-run |
Say what would start the canary, without starting it. |
--record-into dir |
A checkout of the default branch to write the deploy record into. |
--sha sha |
The deployed commit, for the record. |
--ref ref |
The deployed branch, for the record. |
--prep step=outcome;... |
The outcomes of the steps before it; anything but success fails the smoke. |
--print-config |
Print the Worker config the smoke reads, and stop. |
--print-account |
Print that config's account_id (the account the Worker deploys to), or nothing, and stop. The workflows upload with it, not the models' CLOUDFLARE_ACCOUNT_ID. |
Examples:
# Smoke a preview by hand.
heddle smoke . --preview-url https://my-site.example.workers.dev
Needs: GitHub CLI (gh).
heddle doctor
Fails when an installed template differs from Heddle's, when Heddle's machinery exists a second time in the site, or when config an installed feature needs is missing. Local and read-only; the config-check workflow runs it on every pull request.
heddle doctor <site-repo> [--json] [--github]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--json |
The findings as JSON. |
--github |
Also ask GitHub, through gh, about the agents' identity: both Site Agents app secrets set, the app's permissions covering what the workflows ask for, the app installed, and the latest agent pull request given check-runs. Read-only; needs a gh sign-in that administers the repository. |
Examples:
# Has the site drifted from Heddle?
heddle doctor .
# Do the agents run as the Site Agents app, and do their pull requests get their checks?
heddle doctor . --github
heddle forms
The form monitor. Opens the site's contact page in a real browser, fills in the form and submits it with a signed probe header, so the Worker proves every stage a real enquiry reaches (Turnstile's secret, the lead store, the email provider's key) without sending an email or storing a lead.
Records the result in heddle/forms.json, where the watchdog reads it. A broken form alerts as a problem, and a quiet inbox can be told apart from a broken form. heddle-forms.yml runs it every hour and after each deploy.
heddle forms <site-repo> [--url origin] [--trigger schedule|deploy|manual] [--no-record] [--status]
| Argument or flag | What it does |
|---|---|
<site-repo> |
The site's repository: the folder that holds heddle/. Use . when you are in it. |
--url origin |
Probe this origin instead of company.json url (a preview, say). |
--trigger why |
What started the probe, kept in the record: schedule, deploy or manual (the default). |
--no-record |
Probe and print, without writing heddle/forms.json. |
--status |
Print what the record says about the form now, and probe nothing. |
Examples:
# Probe the live form once (HEDDLE_FORM_PROBE_SECRET set) and record the result.
heddle forms .
# Say whether the form was last proven working, and when.
heddle forms . --status
Needs: HEDDLE_FORM_PROBE_SECRET.
Generated from the Heddle repository at 4ccdf8b.
Questions
What do the exit codes mean?
0 is success, 1 is a failure the command explains, and 2 means the arguments were wrong: heddle prints every command's usage line and exits with 2.
Do commands change my site?
Commands that write say so and take --dry-run, which prints what would change and writes nothing. heddle check, validate, launch without --apply, recommendations and research only read.