ghkit is a CLI tool for installing GitHub repository templates such as issue templates, pull request templates, and meta files like CODEOWNERS and CONTRIBUTING.md.
You can install ghkit via go install or Homebrew.
go install github.com/optiflowic/ghkit@latestbrew install optiflowic/tap/ghkitAdd all templates:
ghkit add all --path ./your-repoAdd a specific issue template (e.g., bug):
ghkit add issue bug --path ./your-repoAdd a pull request template:
ghkit add pr --path ./your-repoAdd meta templates like CODEOWNERS, CONTRIBUTING.md, etc.:
ghkit add meta codeowners --path ./your-repobugfeaturequestiontaskdocsfeedbackconfig
Most subcommands support the following flags:
--format,-f: Format of the issue template. Options:yml,md. Default:yml--lang,-l: Language for the templates. Options:en,ja. Default:en--path: Root path of your repository (e.g.,./your-repo). Default:.--force: Overwrite existing files.--verbose: Outputs log information.--debug: Outputs debug logs.
Add a Japanese markdown template for feature requests:
ghkit add issue feature --format md --lang ja --path ./your-repoAdd all templates to a repository root and overwrite if needed:
ghkit add all --format yml --lang en --path ./your-repo --forceFiles are generated under .github/ in the specified repository path:
your-repo/
βββ .github/
βββ ISSUE_TEMPLATE/
β βββ bug.yml
β βββ feature.yml
β βββ ...
βββ PULL_REQUEST_TEMPLATE.md
βββ CODEOWNERS
βββ CONTRIBUTING.md
βββ ...This project is licensed under the MIT License.