Skip to content

Commit 1d7f96c

Browse files
docs: Add GitHub CLI authentication option to README
Add recommended Option 3 using `gh auth token` to simplify npm authentication for GitHub Packages. This eliminates the need for manual token management when GitHub CLI is already configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 5bd6d4a commit 1d7f96c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ npm config set //npm.pkg.github.com/:_authToken YOUR_GITHUB_TOKEN
3535

3636
Replace `YOUR_GITHUB_TOKEN` with your GitHub personal access token that has `read:packages` permission.
3737

38+
**Option 3: Using GitHub CLI (Recommended)**
39+
40+
If you have the [GitHub CLI](https://cli.github.com/) installed and authenticated, you can automatically configure npm:
41+
42+
```sh
43+
npm config set @cloudbeds:registry https://npm.pkg.github.com
44+
npm config set //npm.pkg.github.com/:_authToken $(gh auth token)
45+
```
46+
47+
This uses your existing GitHub CLI authentication, eliminating the need to manually manage tokens.
48+
3849
### Install the package
3950

4051
```sh

0 commit comments

Comments
 (0)