create-hunter-module
v1.0.0
Published
CLI to scaffold Hunter modules from the official skeleton template
Maintainers
Readme
create-hunter-module
CLI to scaffold Hunter modules from the official skeleton template.
Usage
Interactive mode
npx create-hunter-moduleWith module name
npx create-hunter-module analyticsWith all options (non-interactive)
npx create-hunter-module analytics \
--vendor acme \
--namespace Acme \
--author "John Doe" \
--email "[email protected]" \
--description "Analytics module for Hunter" \
--yesOptions
| Option | Description |
| ------------------------- | ----------------------------- |
| --vendor <name> | Vendor name (e.g., Acme) |
| --namespace <namespace> | Vendor namespace (e.g., Acme) |
| --author <name> | Author name |
| --email <email> | Author email |
| --description <desc> | Package description |
| -y, --yes | Skip confirmation prompts |
| -V, --version | Output the version number |
| -h, --help | Display help |
What it does
- Downloads the hunter-module-skeleton from GitHub
- Replaces all placeholders with your values
- Renames files (ServiceProvider, Controller, config, etc.)
- Initializes a git repository with branch
1.x - Optionally installs composer and npm dependencies
Example output
$ npx create-hunter-module analytics
_ _ _
| | | |_ _ _ __ | |_ ___ _ __
| |_| | | | | '_ \| __/ _ \ '__|
| _ | |_| | | | | || __/ |
|_| |_|\__,_|_| |_|\__\___|_|
Create Hunter Module v1.0.0
? Author name: John Doe
? Author email: [email protected]
? Vendor name: Acme
? Vendor namespace: Acme
? Package description: Analytics module for Hunter
? Directory: ./hunter-analytics
Summary:
Package: acme/hunter-analytics
Namespace: Acme\Analytics
Directory: ./hunter-analytics
? Proceed? Yes
✔ Downloaded skeleton from GitHub
✔ Replaced placeholders
✔ Renamed files
✔ Cleaned up
✔ Initialized git repository (branch: 1.x)
? Install composer dependencies? Yes
✔ Installed composer dependencies
? Install npm dependencies? Yes
✔ Installed npm dependencies
✨ Success! Created hunter-analytics
Next steps:
cd ./hunter-analytics
composer test
────────────────────────────────────────
⭐ If you like Hunter, give us a star!
https://github.com/akira-foundation/hunter-module-skeleton
────────────────────────────────────────
Happy coding!Alternative installation methods
If you prefer not to use npx, you can also create a module using:
GitHub Template
- Go to hunter-module-skeleton
- Click "Use this template"
- Clone your new repository
- Run
php configure.php
Git clone
git clone https://github.com/akira-foundation/hunter-module-skeleton hunter-my-module
cd hunter-my-module
php configure.phpLicense
MIT
