{"id":47620240,"url":"https://github.com/cadentdev/wpa","last_synced_at":"2026-04-01T22:00:46.675Z","repository":{"id":345806722,"uuid":"1165898858","full_name":"cadentdev/wpa","owner":"cadentdev","description":"Publish markdown files as WordPress pages via REST API","archived":false,"fork":false,"pushed_at":"2026-03-20T19:56:28.000Z","size":71,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-21T10:19:36.344Z","etag":null,"topics":["cli","markdown","python","rest-api","wordpress"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadentdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T17:01:28.000Z","updated_at":"2026-03-01T21:58:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cadentdev/wpa","commit_stats":null,"previous_names":["cadentdev/wpa"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cadentdev/wpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadentdev%2Fwpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadentdev%2Fwpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadentdev%2Fwpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadentdev%2Fwpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadentdev","download_url":"https://codeload.github.com/cadentdev/wpa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadentdev%2Fwpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","markdown","python","rest-api","wordpress"],"created_at":"2026-04-01T22:00:24.608Z","updated_at":"2026-04-01T22:00:46.587Z","avatar_url":"https://github.com/cadentdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WPA — WordPress Automation\n\n[![CI](https://github.com/cadentdev/wpa/actions/workflows/ci.yml/badge.svg)](https://github.com/cadentdev/wpa/actions/workflows/ci.yml)\n[![Coverage](https://img.shields.io/badge/coverage-75%25-yellow)](https://github.com/cadentdev/wpa)\n[![Python](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org)\n[![PyPI](https://img.shields.io/pypi/v/wpa)](https://pypi.org/project/wpa/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\nCLI tool for WordPress automation — manage posts, pages, and users via the REST API.\n\n## Install\n\n```bash\npip install wpa\n```\n\nOr install from source:\n\n```bash\ngit clone https://github.com/cadentdev/wpa.git\ncd wpa\npip install -e .\n```\n\n### Create a site config\n\n```bash\nwpa site add\n```\n\nThis prompts for your WordPress URL, username, application password (hidden), and optional admin path. Configs are stored at `~/.config/wpa/\u003csite-name\u003e/.env` with `600` permissions.\n\n### WordPress Application Password\n\n1. Log into wp-admin → Users → Your Profile\n2. Scroll to \"Application Passwords\"\n3. Enter name: \"WPA CLI\", click \"Add New Application Password\"\n4. Copy the generated password (use it during `--new-site` setup)\n\n## Usage\n\n### Manage posts\n\n```bash\n# List posts (with filtering)\nwpa post list --site mysite\nwpa post list --site mysite --status draft --author 1\nwpa post list --site mysite --category 5 --tag 12\nwpa post list --site mysite --search \"announcement\" --orderby date --order desc\n\n# Get a single post\nwpa post get 42 --site mysite\n\n# Create a post\nwpa post create --site mysite --title \"My Post\" --content \"\u003cp\u003eHello\u003c/p\u003e\" --status draft\n\n# Update a post\nwpa post update 42 --site mysite --title \"Updated Title\" --status publish\n\n# Delete a post (moves to trash; use --force to permanently delete)\nwpa post delete 42 --site mysite\nwpa post delete 42 --site mysite --force\n```\n\n### Manage pages\n\n```bash\n# List pages\nwpa page list --site mysite\nwpa page list --site mysite --status publish --parent 10\n\n# Get a single page\nwpa page get 42 --site mysite\n\n# Create a page from markdown file\nwpa page create --site mysite pages/about.md\n\n# Create a page from flags\nwpa page create --site mysite --title \"About\" --content \"\u003cp\u003eAbout us\u003c/p\u003e\"\n\n# Publish shortcut (equivalent to wpa page create with markdown)\nwpa publish pages/your-page.md --site mysite\n\n# Update a page\nwpa page update 42 --site mysite --title \"New Title\" --parent 10\n\n# Delete a page\nwpa page delete 42 --site mysite\n```\n\n### Manage users\n\n```bash\n# List all users\nwpa user list --site mysite\n\n# List users as JSON, specific fields only\nwpa user list --site mysite --format json --fields id,username,email,roles\n\n# Export users to TSV\nwpa user list --site mysite --format tsv \u003e users.tsv\n\n# Filter by role or search term\nwpa user list --site mysite --role editor\nwpa user list --site mysite --search \"jane\"\n\n# Create a user\nwpa user create --site mysite --username jdoe --email jdoe@example.com --role author\n\n# Update a user\nwpa user update 42 --site mysite --email newemail@example.com --role editor\n\n# Delete a user (reassign their posts to user 1)\nwpa user delete 42 --site mysite --reassign 1\n```\n\nOutput formats: `table` (default), `json`, `csv`, `tsv`. Use `--fields` to select columns (available: `id`, `username`, `email`, `first_name`, `last_name`, `display_name`, `roles`, `registered`, `url`).\n\n### Output options\n\nAll list commands support these output modifiers:\n\n```bash\n# Output only IDs\nwpa post list --site mysite --ids\n\n# Output only the count\nwpa post list --site mysite --count\n\n# Output a single field per result\nwpa post list --site mysite --field title\n\n# Select specific columns\nwpa user list --site mysite --fields id,username,email\n\n# Debug mode (print HTTP request/response details)\nwpa post list --site mysite --debug\n```\n\n### Site management\n\n```bash\nwpa site add\nwpa site list\nwpa --version\n```\n\n### Multi-site behavior\n\n| Configs | `--site` flag | Behavior |\n|---------|---------------|----------|\n| 0 | No | Prompts to create a new config |\n| 1 | No | Uses the single config automatically |\n| 2+ | No | Prompts to select from list |\n| Any | Yes | Uses the named config (error if not found) |\n\n### Markdown file format\n\n```yaml\n---\ntitle: \"Your Page Title\"\nslug: \"your-page-slug\"\nstatus: draft\n---\n\nPage content in markdown here...\n```\n\n- `title` (required): Page title\n- `slug` (optional): URL slug\n- `status` (optional): `draft` (default), `publish`, `pending`, or `private`\n\n### Site config format\n\nEach site config is stored at `~/.config/wpa/\u003cname\u003e/.env`:\n\n```\nWP_SITE_URL=https://example.com\nWP_USER=your-username\nWP_APP_PASSWORD=xxxx xxxx xxxx xxxx\nWP_ADMIN_PATH=wp-admin\n```\n\n- `WP_ADMIN_PATH` is optional (defaults to `wp-admin`). Override it if your site uses a custom admin URL.\n- The `XDG_CONFIG_HOME` environment variable is respected if set.\n\n### Migration from repo-root .env\n\nIf you have an existing `.env` in the repo root and no XDG configs, the tool will offer to migrate it on first run.\n\n## Safety and Security\n\n- **Default status is always `draft`** — never publishes unless frontmatter explicitly says otherwise\n- **HTTPS enforced for public addresses** — rejects `http://` for public URLs; allows HTTP for private/LAN addresses (RFC 1918, localhost, `.lan`/`.local`/`.test`/`.internal` TLDs) with a warning\n- **Credentials in XDG config** — stored outside the repo at `~/.config/wpa/` with 600 permissions\n- **Password input hidden** — uses `getpass` during interactive setup\n- **Status validation** — rejects typos and invalid values in frontmatter\n- **Site name validation** — only alphanumeric characters and hyphens allowed\n- **Connection error handling** — timeouts and network failures produce clear messages, not tracebacks\n\n## Development\n\n```bash\npip install -e '.[dev]'\npytest --cov=wpa --cov-report=term-missing\n```\n\n## Links\n\n- [Product Requirements Document](wpa-prd.md) — Vision, design principles, command structure, and implementation roadmap\n- [Getting Started](GETTING-STARTED.md) — REST API setup, Wordfence notes, staging guide\n- [Release Notes](RELEASE-NOTES.md)\n- [Contributing](CONTRIBUTING.md)\n- [WP-CLI Command Inventory](docs/wp-cli-command-inventory.md) — Complete catalog of WP-CLI 2.12.0 commands used as the template for WPA planning\n- [WP-CLI REST API Mapping Matrix](docs/wp-cli-rest-api-mapping-matrix.md) — Feasibility classification of every WP-CLI command against the REST API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadentdev%2Fwpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadentdev%2Fwpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadentdev%2Fwpa/lists"}