CLI tool to manage GitHub Copilot instructions
npm install instruction-hubA CLI tool to manage GitHub Copilot instructions from multiple repositories, including GitHub Enterprise.
Tired of manually copying and pasting instructions from various GitHub repositories?
instruction-hub simplifies the process by allowing you to pull copilot instructions from any repo.
- 🏢 GitHub Enterprise Support: Works with private GitHub Enterprise repos as well as public GitHub (detects gh cli auth token)
- 🔐 Automatic Authentication: Uses GitHub CLI authentication when available
- 📦 Interactive Installation: Browse and install instructions with an interactive CLI interface
- 🚀 Direct URL Installation: Install instructions directly from a GitHub file URL with a single command
- 🗑️ Easy Uninstallation: Remove managed instructions with interactive selection
- 📋 Updates: Pull the latest versions of installed instructions from their source repositories
``bashQuick start: Install directly from a GitHub file URL
npx instruction-hub add https://github.com/owner/repo/blob/main/instructions/my-instruction.mdThis automatically adds the repo to config and installs the instruction!
$3
For convenience,
ih is available as a shorthand alias for instruction-hub:If installed globally (
npm i -g instruction-hub), you can use it directly:`bash
Direct install from URL
ih add https://github.com/owner/repo/blob/main/file.mdOr use the traditional way
ih config add owner/repo
ih i
ih rm
`Authentication
$3
For private repositories or GitHub Enterprise instances, you'll need to authenticate using the GitHub CLI:
`bash
Install GitHub CLI (if not already installed)
brew install ghAuthenticate with public GitHub
gh auth loginAuthenticate with GitHub Enterprise
gh auth login --hostname ghe.company.comVerify authentication
gh auth status
`The tool automatically detects your authentication and uses the appropriate tokens for API requests.
$3
- GitHub CLI: Automatically uses tokens from
gh auth (recommended)
- Public repositories: No authentication required
- Multiple instances: Supports both public GitHub and enterprise instances simultaneouslyConfiguration
Configuration is stored globally in
~/.instruction-hub/config.json` and includes:MIT
Issues and pull requests are welcome!