Feature Request: Final Hook for Statamic CLI
Summary
Add a final hook to the Statamic CLI that executes after all setup steps, including git init.
Current Limitation
Currently, there is only one hook available: StarterKitPostInstall.php. However, this hook runs before git init, which limits its usefulness for actions that require a fully initialized repository.
Proposed Solution
Introduce a final hook that runs after all installation steps are completed, including git init.
Use Cases
1. Push to a Git Repository (GitLab, GitHub, etc.)
Automatically add a remote Git repository and push the initialized project.
Example:
git remote add origin [email protected]:username/repository.git
git push -u origin main
2. Run Additional Setup Scripts
Execute project-specific scripts after installation (e.g., CI/CD setup, permissions adjustments).
3. Notify External Services
Send a webhook or notification to an external service to confirm that project creation is complete.
4. Initialize Additional Tools
Set up tools like Laravel Envoyer, Forge, or deploy keys after Git setup.
Implementation Suggestion
- Introduce a new hook, e.g.,
StarterKitFinalInstall.php, that runs at the very end of the process. - Ensure that it executes after
git initand any other finalization steps.