Skip to content

feat(auth): add init GitHub token support across Node CLI#201

Merged
calchiwo merged 4 commits intomainfrom
feat/auth-init-github-token
Mar 29, 2026
Merged

feat(auth): add init GitHub token support across Node CLI#201
calchiwo merged 4 commits intomainfrom
feat/auth-init-github-token

Conversation

@calchiwo
Copy link
Copy Markdown
Owner

Implement init GitHub authentication across the CLI.

Users can now configure a GitHub token once via explainthisrepo init, enabling:

  • private repository access

  • higher API rate limits

  • consistent behavior across Python and Node

Changes

  • Auth model

  • Added GitHub token prompt to Node init

  • Token is stored in config under [github]

  • Removed need for CLI token flags

Runtime behavior

GitHub client now resolves token from:

  1. config ([github].token)

  2. environment (GITHUB_TOKEN, GH_TOKEN)

Repo reader

  • Fixed nullable file content handling

  • prevents runtime crashes when file fetch returns null

Result

  • Python and Node CLIs now share the same auth model

  • Single setup path (init) for all users

  • Cleaner CLI surface (no token flags)

  • More reliable repo parsing

Notes

  • Existing users without config will continue to work for public repos

  • Private repos require running explainthisrepo init or setting GITHUB_TOKEN

@calchiwo calchiwo added the node Pull requests that update the node code label Mar 29, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explainthisrepo Ready Ready Preview, Comment Mar 29, 2026 9:27pm

@calchiwo calchiwo merged commit 7007329 into main Mar 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node Pull requests that update the node code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant