Note
Hookto is in early preview. Feel free to explore, test, and contribute, but expect frequent updates and changes.
Hookto is a self-hostable, all-in-one GitHub app built to automate the boring stuff in your org, account, or repo. You can install it org-wide, account-wide, or on a single repo, it fits anywhere. Since it's self-hosted, the bot's name and branding are entirely yours. All you need to do is fork and deploy.
The whole app is made of small, toggleable, and customizable pieces called hooks. Each hook has one job (like commenting "thanks for opening this PR!" or labeling an issue based on its title), and you can turn any hook on or off without touching any code. Think of it like a big toolbox where you only pull out the tools you actually need.
Hookto is one app with many hooks. You install it once, then pick and choose which features you want, all from a single config file (or none at all, if you're happy with the defaults).
- You fork and deploy Hookto (see "Getting started" below).
- In each repo, you add a file at
.github/hookto.yml(not.yaml) that says which hooks you want turned on, and how you want them to behave. Config is completely optional, you can skip it entirely if you're fine with the defaults. - If you manage many repos under one org or account, you can also set defaults once in a special
.githubrepo instead of repeating yourself in every single repo. See "Org-wide and account-wide defaults" below. - Whenever something happens on GitHub (a PR opens, an issue closes, someone comments), Hookto checks your config and runs the hooks that should respond to that event.
Go to github.com/settings/apps/new and create a new app. Give it any name, logo, and description you want, this is your bot now.
Set these permissions and events:
Permissions
- Repository permissions:
- Contents: Read and write
- Issues: Read and write
- Pull requests: Read and write
- Checks: Read and write
- Discussions: Read and write
- Metadata: Read
Events
- Issue comment
- Issues
- Pull request
- Push
- Discussion
- Discussion comment
Important
Permission and event settings might need to be updated as new hooks are added in future updates.
- Go to vercel.com and sign in
- Create a new project
- Select GitHub as your provider, choose your Hookto fork, and import it
- Set your GitHub App's webhook URL to
your-subdomain.vercel.app/api/github/webhooks
Note
If you're deploying to a serverless platform other than Vercel, make sure to add /api/github/webhooks to the end of your deployment URL.
- Pull down your fork of Hookto
- Add your environment variables in a
.envfile (see.env.examplefor the required fields) - Run
bun run startto start your Hookto instance
Tip
On self-hosted servers, we recommend using ngrok for your webhook URL. Smee.io is meant for local development only, not production use.
- Go to ngrok.com and sign in
- Follow their setup guide to expose your local server
- Use the ngrok URL as your GitHub App's webhook URL
If Hookto makes your workflow easier, drop a ⭐ on the repository and follow for future updates!
All configuration happens in a file named .github/hookto.yml, placed inside a repository you want Hookto to manage. Every hook has its own section in this file, and you can enable, disable, or customize each one independently.
# .github/hookto.yml
hooks:
acknowledge:
enabled: true
prOpen:
enabled: true
message: "Thanks for opening this PR! A maintainer will take a look soon."
prClose:
enabled: true
message: "Thanks for your contribution!"
issueClose:
enabled: false
unfurl:
enabled: true
prOpen:
enabled: falseYou only need to write the parts you want to change. Anything left out falls back to the default.
For the full list of hooks and what they do, see HOOKS.md.
If you manage a lot of repos under one org (or your personal account) and don't want to add .github/hookto.yml to every single one, you can set defaults once instead.
Create a special repo named .github under your org or account, and add a .github/hookto.yml file inside it. Every repo under that org or account will inherit those settings automatically, no per-repo config required.
your-org/
.github/ <- special repo, config here applies org-wide
.github/
hookto.yml
some-repo/ <- inherits the org-wide config automatically
another-repo/ <- same here
.github/
hookto.yml <- unless it sets its own overrides
Settings apply in this order, each one overriding the last:
- Hookto's built-in defaults
- Your org or account-wide
.github/hookto.yml - The individual repo's own
.github/hookto.yml, if it has one
So a repo only needs to specify what's actually different from your org-wide defaults, everything else is inherited automatically.
- Probot, the framework that handles GitHub webhooks and app authentication
- Bun, the JavaScript runtime, used for both development and production
- TypeScript, the whole app is written in it, no compiling to JavaScript needed thanks to Bun
- Zod, validates your config file so a typo doesn't break the whole app
- Upstash Redis (optional), caches config between requests so we don't hit GitHub's API too often
Want to add a new hook, fix a bug, or improve the docs? Check out CONTRIBUTING.md for a full walkthrough, including how the codebase is organized and how to add your own hook.
Hookto is open source under the MIT License.