{"id":26086731,"url":"https://github.com/mattsterp/wp-plugin-env-gen","last_synced_at":"2026-04-22T13:33:37.869Z","repository":{"id":281366722,"uuid":"941742822","full_name":"mattsterp/wp-plugin-env-gen","owner":"mattsterp","description":"A command-line interface (CLI) tool for scaffolding WordPress plugin development environments.","archived":false,"fork":false,"pushed_at":"2025-03-08T15:17:01.000Z","size":2290,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T16:23:59.536Z","etag":null,"topics":["cli","wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mattsterp.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}},"created_at":"2025-03-03T01:07:04.000Z","updated_at":"2025-03-08T15:24:08.000Z","dependencies_parsed_at":"2025-03-08T16:24:06.436Z","dependency_job_id":"e783feed-87f1-4f2b-b77e-623217a74338","html_url":"https://github.com/mattsterp/wp-plugin-env-gen","commit_stats":null,"previous_names":["mattsterp/wp-plugin-env-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattsterp/wp-plugin-env-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsterp%2Fwp-plugin-env-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsterp%2Fwp-plugin-env-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsterp%2Fwp-plugin-env-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsterp%2Fwp-plugin-env-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattsterp","download_url":"https://codeload.github.com/mattsterp/wp-plugin-env-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattsterp%2Fwp-plugin-env-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32139417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T13:27:12.868Z","status":"ssl_error","status_checked_at":"2026-04-22T13:26:44.791Z","response_time":58,"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","wordpress","wordpress-development","wordpress-plugin"],"created_at":"2025-03-09T07:18:09.481Z","updated_at":"2026-04-22T13:33:37.854Z","avatar_url":"https://github.com/mattsterp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wp-plugin-env-gen\n\nA command-line interface (CLI) tool for scaffolding WordPress plugin development environments.\n\n## Features\n\n- Generate different types of WordPress plugins:\n  - Classic Plugin (PHP-only)\n  - Block Plugin (single block with modern JavaScript tooling)\n  - Block Library (multiple blocks bundled together)\n  - Official WordPress Block Plugin using @wordpress/create-block\n- Optional components:\n  - Admin Page\n  - Settings Page\n- Environment setup:\n  - wp-env integration for local development\n  - wp-now integration for serverless previews\n  - npm scripts for build tasks\n\n## Installation\n\n### Global Installation\n\n```bash\nnpm install -g wp-plugin-env-gen\n```\n\n### Local Installation\n\n```bash\nnpm install wp-plugin-env-gen\n```\n\n## Usage\n\n### Creating a new plugin\n\n```bash\nwp-plugin-env-gen create\n```\n\nThis will start an interactive prompt that will ask you for:\n\n1. Plugin Name\n2. Plugin Slug (auto-generated from name)\n3. Plugin Description\n4. Plugin Type (Classic, Block, Block Library, or WordPress create-block)\n5. For create-block: Block Variant (Static or Dynamic)\n6. For create-block: Block Namespace\n7. Whether to include an Admin Page (not applicable for create-block)\n8. Whether to include a Settings Page (not applicable for create-block)\n9. Whether to include wp-env configuration\n10. Whether to include wp-now integration\n11. Whether to initialize a Git repository\n\n### Generated Plugin Structure\n\n#### Classic Plugin\n\n```\nplugin-name/\n├── includes/\n│   ├── admin/\n│   │   └── admin-page.php (if selected)\n│   └── settings/\n│       └── settings-page.php (if selected)\n├── languages/\n├── .wp-env.json (if selected)\n├── .wp-now.json (if selected)\n├── wp-now-setup.sh (if selected)\n├── README.md\n└── plugin-name.php\n```\n\n#### Block Plugin\n\n```\nplugin-name/\n├── build/\n├── includes/\n│   ├── admin/\n│   │   └── admin-page.php (if selected)\n│   └── settings/\n│       └── settings-page.php (if selected)\n├── src/\n│   ├── block/\n│   │   ├── block.json\n│   │   ├── editor.css\n│   │   ├── index.js\n│   │   └── style.css\n│   └── index.js\n├── .gitignore\n├── .wp-env.json (if selected)\n├── .wp-now.json (if selected)\n├── wp-now-setup.sh (if selected)\n├── package.json\n├── README.md\n└── plugin-name.php\n```\n\n#### Block Library\n\n```\nplugin-name/\n├── build/\n├── includes/\n│   ├── admin/\n│   │   └── admin-page.php (if selected)\n│   ├── blocks/\n│   │   └── example-dynamic.php\n│   └── settings/\n│       └── settings-page.php (if selected)\n├── src/\n│   ├── blocks/\n│   │   ├── example-static/\n│   │   │   ├── block.json\n│   │   │   ├── editor.css\n│   │   │   ├── index.js\n│   │   │   └── style.css\n│   │   ├── example-dynamic/\n│   │   │   ├── block.json\n│   │   │   ├── editor.css\n│   │   │   ├── index.js\n│   │   │   └── style.css\n│   │   └── example-editable/\n│   │       ├── block.json\n│   │       ├── editor.css\n│   │       ├── index.js\n│   │       └── style.css\n│   └── index.js\n├── .gitignore\n├── .wp-env.json (if selected)\n├── .wp-now.json (if selected)\n├── wp-now-setup.sh (if selected)\n├── package.json\n├── README.md\n└── plugin-name.php\n```\n\n#### WordPress Official create-block Plugin\n\nThe structure follows the official WordPress block plugin template with optional additions:\n\n```\nplugin-name/\n├── build/\n├── src/\n│   ├── blocks/\n│   │   └── (varies based on block type)\n│   ├── edit.js\n│   ├── editor.scss\n│   ├── index.js\n│   ├── save.js (for static blocks)\n│   └── style.scss\n├── block.json\n├── .wp-env.json (if selected)\n├── .wp-now.json (if selected)\n├── wp-now-setup.sh (if selected)\n├── package.json\n├── README.md\n└── plugin-name.php\n```\n\n## WordPress create-block Integration\n\nThis tool includes integration with the official [@wordpress/create-block](https://www.npmjs.com/package/@wordpress/create-block) package, which is the WordPress-recommended way to scaffold block plugins.\n\nWhen selecting the \"Official WordPress Block (@wordpress/create-block)\" option, the tool will:\n\n1. Use npx to run @wordpress/create-block with your specified options\n2. Allow you to choose between static and dynamic block variants\n3. Let you specify a custom namespace for your block\n4. Optionally add wp-env and wp-now configuration\n5. Optionally initialize a Git repository\n\nThis gives you the best of both worlds: the officially supported WordPress block scaffolding tool with the additional environment setup features of wp-plugin-env-gen.\n\n## Development\n\n### Prerequisites\n\n- Node.js (v14 or later)\n- npm (v6 or later)\n\n### Setup\n\n1. Clone this repository\n2. Run `npm install` to install dependencies\n3. Run `npm link` to create a symlink to the global npm modules\n\n### Available Scripts\n\n- `npm start`: Run the CLI tool\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattsterp%2Fwp-plugin-env-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattsterp%2Fwp-plugin-env-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattsterp%2Fwp-plugin-env-gen/lists"}