{"id":49273806,"url":"https://github.com/soderlind/wp-cli-local","last_synced_at":"2026-04-25T15:04:46.430Z","repository":{"id":343822957,"uuid":"1179286129","full_name":"soderlind/wp-cli-local","owner":"soderlind","description":"An AI agent skill that runs WP-CLI commands against Local (by Flywheel) sites on macOS.","archived":false,"fork":false,"pushed_at":"2026-03-11T23:42:56.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-12T03:22:53.336Z","etag":null,"topics":["ai-skills","localwp","wordpress-cli"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soderlind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-11T22:01:36.000Z","updated_at":"2026-03-11T23:42:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/soderlind/wp-cli-local","commit_stats":null,"previous_names":["soderlind/wp-cli-local"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/soderlind/wp-cli-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fwp-cli-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fwp-cli-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fwp-cli-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fwp-cli-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soderlind","download_url":"https://codeload.github.com/soderlind/wp-cli-local/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soderlind%2Fwp-cli-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32266008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"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":["ai-skills","localwp","wordpress-cli"],"created_at":"2026-04-25T15:04:28.724Z","updated_at":"2026-04-25T15:04:46.417Z","avatar_url":"https://github.com/soderlind.png","language":"Shell","readme":"# wp-cli-local\n\nAn AI agent skill that runs [WP-CLI](https://wp-cli.org/) commands against [Local](https://localwp.com/) (by Flywheel) sites on macOS.\n\n- **Auto-detects** the Local site from your current directory\n- Falls back to `--site=\u003cname\u003e` when outside a site folder\n- Uses Local's own PHP and MySQL binaries with the correct `php.ini`\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg width=\"739\" height=\"656\" alt=\"Screenshot 2026-03-12 at 00 54 40\" src=\"https://github.com/user-attachments/assets/f975a023-9b17-421c-b88a-576f03b4513a\" /\u003e\n\u003cp\u003e\u003ci\u003eMore \u003ca href=\"#example-prompts\"\u003eexample prompts\u003c/a\u003e below\u003c/i\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n## Installation\n\n```bash\nnpx skills add https://github.com/soderlind/wp-cli-local --skill wp-cli-local -g\n```\n\nThe `--all` flag installs the skill for all detected AI agents (GitHub Copilot, Claude Code, Cursor, Cline, etc.) without prompting:\n\n```bash\nnpx skills add https://github.com/soderlind/wp-cli-local --skill wp-cli-local -g --all\n```\n\nWithout `--all`, you'll be prompted to select which agents to install for.\n\n## Prerequisites\n\n- **macOS** (Apple Silicon or Intel)\n- **[Local](https://localwp.com/)** installed with at least one site\n- **[WP-CLI](https://wp-cli.org/)** installed and in `PATH` (e.g. `brew install wp-cli`)\n- The target site must be **running** in Local\n\n## How It Works\n\nThe wrapper script at `scripts/wp`:\n\n1. Reads `~/Library/Application Support/Local/sites.json` to find all sites\n2. Matches the current working directory against site paths (longest prefix match)\n3. Resolves the correct PHP and MySQL binaries from Local's `lightning-services/`\n4. Loads the site-specific `php.ini` (which contains the MySQL socket path)\n5. Sets `MYSQL_UNIX_PORT` so `wp db` commands use the correct socket\n6. Executes WP-CLI with the correct environment\n\n## Usage\n\nOnce installed, just ask your AI agent to run WP-CLI commands in natural language. The skill is triggered automatically.\n\n### Example prompts\n\n- \"List all plugins on my Local site\"\n- \"Activate the woocommerce plugin\"\n- \"What version of WordPress is running?\"\n- \"Flush the cache\"\n- \"Export the database\"\n- \"Show all options matching `siteurl`\"\n- \"List scheduled cron events\"\n- \"Run `wp db query \\\"SELECT * FROM wp_options LIMIT 5;\\\"`\"\n\nIf your working directory is inside a Local site folder, the site is detected automatically. Otherwise the agent will ask which site to target, or you can specify it: \"List plugins on the **my-site** site\".\n\n### Manual / testing\n\nYou can also call the wrapper script directly in a terminal:\n\n```bash\n# Auto-detect site from CWD\nbash scripts/wp plugin list\n\n# Explicit site name\nbash scripts/wp --site=my-site core version\n\n# List all Local sites with running/halted status\nbash scripts/wp --list\n```\n\n### Example output of `--list`\n\n```\nLocal by Flywheel sites:\n\n  ● plugins              running    /Users/you/Sites/plugins\n  ○ my-site              halted     /Users/you/Sites/my-site\n```\n\n## Credit\n\nInspired by [local-wp-cli](https://github.com/aslamdoctor/local-wp-cli) skill, but rewritten from scratch with better site detection and MySQL socket support.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoderlind%2Fwp-cli-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoderlind%2Fwp-cli-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoderlind%2Fwp-cli-local/lists"}