{"repo":"oikon48/gh-setup-hooks","free":true,"listed":false,"github":"https://github.com/oikon48/gh-setup-hooks","clone":"git clone https://github.com/oikon48/gh-setup-hooks.git","description":"Enable `gh` command in Claude Code on the Web environment, just adding SessionStartHooks","language":"JavaScript","stars":48,"topics":["claude","claude-code","claude-code-hooks"],"license":"MIT","category":"cli-tools","readme_excerpt":"gh-setup-hooks Auto-install GitHub CLI on Claude Code on the Web. Just add one line to settings.json. Setup 1. Add hook to settings.json Add to .claude/settings.json : npx -y gh-setup-hooks is also ok. 2. Set up Claude Code on the Web To use gh commands (e.g., gh pr create ), you need to set GH TOKEN or GITHUB TOKEN : 1. Go to Claude Code on the Web 2. Open Settings → Custom Environment 3. Add environment variable: - Name: GH TOKEN or GITHUB TOKEN - Value: Your GitHub Personal Access Token Note : The token needs repo scope for most operations. Claude Code on the Web network should be Full or Custom . If using Custom , you need to allow release-assets.githubusercontent.com . How It Works 1. Start a session on Claude Code on the Web 2. SessionStart hook runs npx gh-setup-hooks 3. Installs gh only in remote environment ( CLAUDE CODE REMOTE=true ) 4. Installs to /.local/bin and persists PATH 5. Auto-detects GH REPO from git remote for gh CLI compatibility 6. Does nothing in local environment Configuration Environment Variable Description Default --------------------- ------------- --------- GH SETUP VERSION gh version to install 2.88.1 License MIT References - npm package - GitHub CLI - Claude Code Hooks - GitHub Personal Access Tokens","default_branch":null,"files":null,"tree":[],"storefront":"/r/oikon48","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oikon48/gh-setup-hooks/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}