@eliware/knit
v1.1.2
Published
GitHub webhook handler and deployment automation tool. Listens for GitHub webhook events, validates signatures, updates repositories, runs deployment commands, and sends notifications.
Downloads
237
Maintainers
Readme
@eliware/knit 


A GitHub webhook handler and deployment automation tool. Knit listens for GitHub webhook events, validates signatures, updates local repositories, runs deployment commands, and sends notifications (e.g., to Discord). Use this as a foundation for automating deployments and notifications for your projects.
Table of Contents
Features
- GitHub webhook listener (Express server)
- Signature validation for security
- Automated repository updates and deployment commands
- Discord webhook notifications for deployments and errors
- Interactive CLI wizard for repository configuration
- Pre-configured for Node.js (ESM)
- Environment variable support via dotenv
- Logging and signal handling via
@eliware/common - Jest for testing
- MIT License
Getting Started
Clone this template:
git clone https://github.com/eliware/knit.git cd knit npm installUpdate project details:
- Edit
package.json(name, description, author, etc.) - Update this
README.mdas needed - Change the license if required
- Edit
Configure your repositories:
Run the interactive wizard:
./wizard.mjsThis will guide you through setting up deployment paths, commands, and notification URLs for each repository.
Set up your GitHub webhook:
- Point your repository’s webhook to your Knit server URL (e.g.,
https://yourdomain.com/) - Use content type
application/json - Set the webhook secret to match your
.envfile’sGITHUB_WEBHOOK_SECRET
- Point your repository’s webhook to your Knit server URL (e.g.,
Development
Main entry:
knit.mjsStart your app:
./knit.mjsAdd your code in new files and import as needed.
Testing
Run tests with:
npm testAdd your tests in the
testsfolder or alongside your code.
Customization
- Extend the logging, notification, or deployment logic as needed.
- Add dependencies and scripts to fit your project.
- Remove or modify template files and sections.
Support
For help, questions, or to chat with the author and community, visit:
License
MIT © 2025 Eli Sterling, eliware.org



