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
| Task | Command |
|---|
| Deploy child theme to production | cd /home/rezriz/github/Wordpress/wp-dev/themes/develop-internally/id86/id86-child-theme && ./deploy.sh |
| Validate PHP before deploy | php -l functions.php |
| Check whitespace | git diff --check |
Content Sync (Markdown → WordPress)
| Task | Command |
|---|
| Full sync (wrapper) | tools/sync-docs.sh |
| Validate without changes | tools/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 purge | tools/sync-docs.sh --skip-cache-purge |
| Classic HTML instead of blocks | tools/sync-docs.sh --legacy-html |
| Sync a single document | tools/sync-docs.sh --only demo/DEM-000002-tmux-cheatsheet.md |
| Cron mode (git pull + quiet log) | tools/sync-docs.sh --cron |
| Direct Python invocation | python sync.py [flags] |
| Alias shortcut | id86sync --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.
| Task | Command |
|---|
| Create a draft document | python3 scripts/new-doc.py --title "..." --category devops --type cheatsheet |
| Create with full metadata | python3 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 writing | python3 scripts/new-doc.py --title "..." --category code --type glossary --dry-run |
| Interactive prompts | python3 scripts/new-doc.py (asks for each missing field) |
Research Workflow (PID-owned)
| Task | Command |
|---|
| Create an idea and research directory | python3 scripts/new-idea.py --title "..." --category devops --keyword "..." --researcher human |
| Create and link an idea to a keyword | python3 scripts/new-idea.py --title "..." --category devops --keyword "..." --keyword-id KW-###### --type reference --researcher ai |
| Preview idea creation | python3 scripts/new-idea.py --title "..." --category devops --keyword "..." --dry-run |
| Reconcile research directories | python3 scripts/ensure-research-folders.py |
| Preview reconciliation | python3 scripts/ensure-research-folders.py --dry-run |
| Import any compatible keyword export | python3 scripts/import-keywords.py /path/to/source.csv --topic "..." --category devops |
| Preview keyword import | python3 scripts/import-keywords.py /path/to/source.csv --topic "..." --category devops --dry-run |
| Assign content PIDs | python3 scripts/assign-pids.py |
| Assign keyword IDs | python3 scripts/assign-keyword-ids.py |
| Validate keyword register | python3 scripts/validate-keyword-research.py |
| Create PID-identified schema | python3 scripts/new-schema.py --pid SEO-000001 --type HowTo |
| Validate schema files | python3 scripts/validate-schema.py |
| Check indexing during development | python3 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)
| Task | Command |
|---|
| Publish scheduled docs to WordPress | id86-publish-scheduled.sh |
| Validate scheduled (no changes) | id86-publish-scheduled.sh --dry-run |
| Custom register | id86-publish-scheduled.sh --csv /path/to/content-inventory.csv |
| Force update | id86-publish-scheduled.sh --force |
| Push published docs to GitHub repo | id86-push-published.sh |
Cache Control
| Layer | Command |
|---|
| 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 plugin | wp plugin activate litespeed-cache |
| PHP OPcache | wp flush-opcache flush |
| Cloudflare targeted purge | 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 '{"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)
curl -ksS --resolve id86.net:443:127.0.0.1 https://id86.net/
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
| Task | Command |
|---|
| Rebuild Fuse.js search index | wp fusejs generate-index |
| SEOPress settings export | wp seopress settings export --destination='.../uploads/seopress' |
| SEOPress settings import | wp seopress settings import --from='.../uploads/seopress' |
| Post SEO title | wp post meta update <id> _seopress_titles_title "..." |
| Post SEO description | wp post meta update <id> _seopress_titles_desc "..." |
| Generate AI metadata | wp 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
| Shortcode | Purpose | Docs |
|---|
[id86_subscribe] | Email subscription form | Subscription |
[id86_contact_form] | Contact form | Contact Form |
[id86_recommendations] | Recommendations page | Monetization |
[id86_latest_sheets limit="6"] | Latest reference sheets | Cards |
[id86_modified_date] | "updated M j, Y · N min read" meta line | Templates |
[id86_archive_card] | Archive reference card | Templates |
Automation Timers
| Timer | Purpose |
|---|
id86-inventory-refresh (hourly, systemd user) | Runs validate-inventory.py --fix to refresh CSV Updated column |
GitHub Actions on main | Syncs pushed markdown to WordPress (hash-checked) |
sync-docs.sh --cron | Polling 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.