Skip to main content

Scripts & Commands Cheatsheet

Fast-reference commands for the id86.net pipeline. Everything here is explained in depth in the rest of the guide; this page is for recall and copy-paste.

Deploy

TaskCommand
Deploy child theme to productioncd /home/rezriz/github/Wordpress/wp-dev/themes/develop-internally/id86/id86-child-theme && ./deploy.sh
Validate PHP before deployphp -l functions.php
Check whitespacegit diff --check

Content Sync (Markdown → WordPress)

TaskCommand
Full sync (wrapper)tools/sync-docs.sh
Validate without changestools/sync-docs.sh --dry-run
Update every doc (force)tools/sync-docs.sh --force
Full cache purge (structural)tools/sync-docs.sh --purge-all
Skip cache purgetools/sync-docs.sh --skip-cache-purge
Classic HTML instead of blockstools/sync-docs.sh --legacy-html
Sync a single documenttools/sync-docs.sh --only demo/DEM-000002-tmux-cheatsheet.md
Cron mode (git pull + quiet log)tools/sync-docs.sh --cron
Direct Python invocationpython sync.py [flags]
Alias shortcutid86sync --dry-run / id86sync --force / id86sync --cron / id86sync --purge-all

Sync purges targeted by default (changed post URLs + homepage). Use --purge-all for theme/plugin/config changes.

Content Scaffolding (CSV + Markdown)

scripts/new-doc.py (in the register mirror seo-content/web-project/id86.net/scripts/) creates a new document: the Markdown file named PID-title.md with full frontmatter, the matching content-inventory.csv row (PID pre-filled), and an automatic assign-pids.py + validate-inventory.py verification pass.

TaskCommand
Create a draft documentpython3 scripts/new-doc.py --title "..." --category devops --type cheatsheet
Create with full metadatapython3 scripts/new-doc.py --title "..." --category security --type reference --status scheduled --publish-date 2026-09-01 --description "..." --tags "ssh, security" --keyword "ssh hardening"
Preview without writingpython3 scripts/new-doc.py --title "..." --category code --type glossary --dry-run
Interactive promptspython3 scripts/new-doc.py (asks for each missing field)

Research Workflow (PID-owned)

TaskCommand
Create an idea and research directorypython3 scripts/new-idea.py --title "..." --category devops --keyword "..." --researcher human
Create and link an idea to a keywordpython3 scripts/new-idea.py --title "..." --category devops --keyword "..." --keyword-id KW-###### --type reference --researcher ai
Preview idea creationpython3 scripts/new-idea.py --title "..." --category devops --keyword "..." --dry-run
Reconcile research directoriespython3 scripts/ensure-research-folders.py
Preview reconciliationpython3 scripts/ensure-research-folders.py --dry-run
Import any compatible keyword exportpython3 scripts/import-keywords.py /path/to/source.csv --topic "..." --category devops
Preview keyword importpython3 scripts/import-keywords.py /path/to/source.csv --topic "..." --category devops --dry-run
Assign content PIDspython3 scripts/assign-pids.py
Assign keyword IDspython3 scripts/assign-keyword-ids.py
Validate keyword registerpython3 scripts/validate-keyword-research.py
Create PID-identified schemapython3 scripts/new-schema.py --pid SEO-000001 --type HowTo
Validate schema filespython3 scripts/validate-schema.py
Check indexing during developmentpython3 scripts/check-indexing.py --sitemap --robots --development --report reports/indexing-development.json

content-inventory.csv owns content PIDs (PREFIX-######). keyword-research.csv owns keyword IDs (KW-######) and links to content later through Target Post PID. Use --keyword-id KW-###### with new-idea.py to create and link an idea atomically. Each idea gets research/<PID>/research.md, serp-analysis.md, brief.md, and sources/. See Content Research Workflow.

The generated file is content/<category>/<PID>-<slug>.md — e.g. content/devops/DEV-000003-tmux-split-panes-cheat-sheet.md. The frontmatter includes an explicit slug: so WordPress URLs stay clean (/devops/tmux-split-panes-cheat-sheet/, not /devops/DEV-000003-.../). The body is a skeleton — author the content yourself after scaffolding. See Content Register — New Document Workflow.

Publish Lifecycle (CSV-driven)

TaskCommand
Publish scheduled docs to WordPressid86-publish-scheduled.sh
Validate scheduled (no changes)id86-publish-scheduled.sh --dry-run
Custom registerid86-publish-scheduled.sh --csv /path/to/content-inventory.csv
Force updateid86-publish-scheduled.sh --force
Push published docs to GitHub repoid86-push-published.sh

Cache Control

LayerCommand
LiteSpeed targeted purge (one URL)curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/<slug>/?LSCWP_CTRL=PURGESINGLE"
LiteSpeed full purge (structural)curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/?LSCWP_CTRL=purge_all"
LiteSpeed targeted (by post ID)curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/?LSCWP_CTRL=purge&pid=<POST_ID>"
Activate LiteSpeed pluginwp plugin activate litespeed-cache
PHP OPcachewp flush-opcache flush
Cloudflare targeted purgesource ~/.ssh/cloudflare/.env && curl -sS -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" -H "Authorization: Bearer $CF_FULL_CONTROL_TOKEN" -H "Content-Type: application/json" --data '{"files":["https://id86.net/<slug>/","https://id86.net/"]}'
Cloudflare full purge (structural)source ~/.ssh/cloudflare/.env && curl -sS -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" -H "Authorization: Bearer $CF_FULL_CONTROL_TOKEN" -H "Content-Type: application/json" --data '{"purge_everything":true}'

LiteSpeed note: wp litespeed-purge all is intercepted by Cloudflare Access and does nothing. Use the origin-direct forms above. Default is targeted per URL; full purge is for structural changes. Full CLI reference: LiteSpeed Cache CLI.

Origin Verification (bypass Cloudflare Access)

# Plain origin check
curl -ksS --resolve id86.net:443:127.0.0.1 https://id86.net/

# Cache-busting check for markup/visual review
curl -ksS --resolve id86.net:443:127.0.0.1 "https://id86.net/?$(date +%s)"

A 302 to *.cloudflareaccess.com on the public URL is expected (Zero Trust). Only 000 / timeout means failure.

WP-CLI: Search Index & SEO

TaskCommand
Rebuild Fuse.js search indexwp fusejs generate-index
SEOPress settings exportwp seopress settings export --destination='.../uploads/seopress'
SEOPress settings importwp seopress settings import --from='.../uploads/seopress'
Post SEO titlewp post meta update <id> _seopress_titles_title "..."
Post SEO descriptionwp post meta update <id> _seopress_titles_desc "..."
Generate AI metadatawp seopress ai metadata --id=1,2,3 --meta=desc --language=en_US

SEO titles/descriptions are written automatically by the sync pipeline from Markdown frontmatter (_seopress_titles_title / _seopress_titles_desc on every create/update). See SEO Metadata Automation.

Shortcodes

ShortcodePurposeDocs
[id86_subscribe]Email subscription formSubscription
[id86_contact_form]Contact formContact Form
[id86_recommendations]Recommendations pageMonetization
[id86_latest_sheets limit="6"]Latest reference sheetsCards
[id86_modified_date]"updated M j, Y · N min read" meta lineTemplates
[id86_archive_card]Archive reference cardTemplates

Automation Timers

TimerPurpose
id86-inventory-refresh (hourly, systemd user)Runs validate-inventory.py --fix to refresh CSV Updated column
GitHub Actions on mainSyncs pushed markdown to WordPress (hash-checked)
sync-docs.sh --cronPolling fallback when Actions minutes are exhausted

Maintainer Rules

  • Never commit SMTP passwords, Reoon keys, Cloudflare tokens, or private SSH keys.
  • Credentials live in ~/.ssh/<service>/.env (mode 600), never in docs or Git.
  • Frontmatter date is date-only (YYYY-MM-DD); a future date schedules the post.