New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ghtk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghtk

One-click setup for GitHub Packages npm registry auth. No more 403 errors when installing private packages locally.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

ghtk(github packages token configurator)

One-click setup for GitHub Packages npm registry auth. No more annoying 403 errors when installing private packages during local development.

What it does

  • Auto-detects and installs gh CLI if not present (macOS/Linux/Windows)
  • Runs gh auth login with read:packages,repo scopes (interactive GitHub auth)
  • Prompts for org scopes — enter one or more (e.g. @theplant @my-org)
  • Writes ~/.npmrc with the correct registry and auth token, so npm install just works

Install

npm install -g ghtk

Or use directly with npx:

npx ghtk

Usage

ghtk

You'll see an interactive flow:

🔧 GitHub Packages npm registry configurator

✅ gh CLI is available.

Enter the GitHub org scopes to configure for npm.pkg.github.com.
You can enter one or more scopes separated by spaces.
Example: @theplant @my-org

Scopes: @theplant @another-org

After completing GitHub auth, your ~/.npmrc will be configured:

@theplant:registry=https://npm.pkg.github.com
@another-org:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=ghp_xxxxxxxxxxxx

Platform Compatibility

Auto-install gh CLI support:

  • macOS — via Homebrew (brew install gh)
  • Linux (Debian/Ubuntu) — via apt
  • Linux (Fedora/RHEL/CentOS) — via dnf
  • Windows — via winget

Test

npm test
  • npm: https://www.npmjs.com/package/ghtk
  • GitHub: https://github.com/danni-cool/github-packge-ght

License

MIT

Keywords

github

FAQs

Package last updated on 12 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts