feat(login): add github auth and plugin install for init#21
Merged
Conversation
feba61c to
538a8bd
Compare
Add `archgate login` command that authenticates users via GitHub's OAuth device flow (RFC 8628) and exchanges the GitHub token for an archgate plugin token via the plugins service. Tokens are stored locally in ~/.archgate/credentials. The `init` command now auto-detects stored credentials and: - For Claude Code: prints the marketplace URL with embedded token - For Cursor: downloads and extracts the cursor plugin bundle New files: - src/helpers/auth.ts — device flow, token claim, credential storage - src/helpers/plugin-install.ts — marketplace URL builder, cursor download - src/commands/login.ts — login/logout/status/refresh subcommands - tests/ — 19 new tests covering auth, login, and plugin-install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace shell commands (mkdir -p, rm -f) with mkdirSync/unlinkSync from node:fs in plugin-install.ts. Use static import for unlinkSync in auth.ts instead of dynamic import. tar is available on macOS, Linux, and Windows 10+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
538a8bd to
4bb527f
Compare
Use `claude plugin marketplace add` and `claude plugin install` to automatically install the archgate plugin when the claude CLI is on PATH. Falls back to printing manual commands when the CLI is not found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite quick start to include login step and editor flag. Add archgate login command docs. Replace old claude-code-plugin GitHub link with plugins.archgate.dev. Add dedicated Claude Code and Cursor plugin sections with install instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Emphasize that the CLI is free and fully functional without plugins or an account. Move login out of quick start since it is only needed for the optional paid editor plugins. Add callouts throughout the README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
rhuanbarreto
added a commit
that referenced
this pull request
Feb 28, 2026
* feat(login): add GitHub device flow auth and plugin install for init Add `archgate login` command that authenticates users via GitHub's OAuth device flow (RFC 8628) and exchanges the GitHub token for an archgate plugin token via the plugins service. Tokens are stored locally in ~/.archgate/credentials. The `init` command now auto-detects stored credentials and: - For Claude Code: prints the marketplace URL with embedded token - For Cursor: downloads and extracts the cursor plugin bundle New files: - src/helpers/auth.ts — device flow, token claim, credential storage - src/helpers/plugin-install.ts — marketplace URL builder, cursor download - src/commands/login.ts — login/logout/status/refresh subcommands - tests/ — 19 new tests covering auth, login, and plugin-install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use cross-platform node:fs APIs for Windows compatibility Replace shell commands (mkdir -p, rm -f) with mkdirSync/unlinkSync from node:fs in plugin-install.ts. Use static import for unlinkSync in auth.ts instead of dynamic import. tar is available on macOS, Linux, and Windows 10+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(login): auto-install claude plugin via CLI when available Use `claude plugin marketplace add` and `claude plugin install` to automatically install the archgate plugin when the claude CLI is on PATH. Falls back to printing manual commands when the CLI is not found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: improve init flow and plugin install documentation Rewrite quick start to include login step and editor flag. Add archgate login command docs. Replace old claude-code-plugin GitHub link with plugins.archgate.dev. Add dedicated Claude Code and Cursor plugin sections with install instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add initialized configs for claude and cursor * docs: clarify free CLI vs optional paid plugins Emphasize that the CLI is free and fully functional without plugins or an account. Move login out of quick start since it is only needed for the optional paid editor plugins. Add callouts throughout the README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add cursor onboarding step for ag-onboard skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: fix prettier formatting in settings.local.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rhuanbarreto
added a commit
that referenced
this pull request
Mar 3, 2026
* feat(login): add GitHub device flow auth and plugin install for init Add `archgate login` command that authenticates users via GitHub's OAuth device flow (RFC 8628) and exchanges the GitHub token for an archgate plugin token via the plugins service. Tokens are stored locally in ~/.archgate/credentials. The `init` command now auto-detects stored credentials and: - For Claude Code: prints the marketplace URL with embedded token - For Cursor: downloads and extracts the cursor plugin bundle New files: - src/helpers/auth.ts — device flow, token claim, credential storage - src/helpers/plugin-install.ts — marketplace URL builder, cursor download - src/commands/login.ts — login/logout/status/refresh subcommands - tests/ — 19 new tests covering auth, login, and plugin-install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use cross-platform node:fs APIs for Windows compatibility Replace shell commands (mkdir -p, rm -f) with mkdirSync/unlinkSync from node:fs in plugin-install.ts. Use static import for unlinkSync in auth.ts instead of dynamic import. tar is available on macOS, Linux, and Windows 10+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(login): auto-install claude plugin via CLI when available Use `claude plugin marketplace add` and `claude plugin install` to automatically install the archgate plugin when the claude CLI is on PATH. Falls back to printing manual commands when the CLI is not found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: improve init flow and plugin install documentation Rewrite quick start to include login step and editor flag. Add archgate login command docs. Replace old claude-code-plugin GitHub link with plugins.archgate.dev. Add dedicated Claude Code and Cursor plugin sections with install instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add initialized configs for claude and cursor * docs: clarify free CLI vs optional paid plugins Emphasize that the CLI is free and fully functional without plugins or an account. Move login out of quick start since it is only needed for the optional paid editor plugins. Add callouts throughout the README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add cursor onboarding step for ag-onboard skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: fix prettier formatting in settings.local.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
rhuanbarreto
added a commit
that referenced
this pull request
Mar 4, 2026
* feat(login): add GitHub device flow auth and plugin install for init Add `archgate login` command that authenticates users via GitHub's OAuth device flow (RFC 8628) and exchanges the GitHub token for an archgate plugin token via the plugins service. Tokens are stored locally in ~/.archgate/credentials. The `init` command now auto-detects stored credentials and: - For Claude Code: prints the marketplace URL with embedded token - For Cursor: downloads and extracts the cursor plugin bundle New files: - src/helpers/auth.ts — device flow, token claim, credential storage - src/helpers/plugin-install.ts — marketplace URL builder, cursor download - src/commands/login.ts — login/logout/status/refresh subcommands - tests/ — 19 new tests covering auth, login, and plugin-install Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use cross-platform node:fs APIs for Windows compatibility Replace shell commands (mkdir -p, rm -f) with mkdirSync/unlinkSync from node:fs in plugin-install.ts. Use static import for unlinkSync in auth.ts instead of dynamic import. tar is available on macOS, Linux, and Windows 10+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(login): auto-install claude plugin via CLI when available Use `claude plugin marketplace add` and `claude plugin install` to automatically install the archgate plugin when the claude CLI is on PATH. Falls back to printing manual commands when the CLI is not found. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: improve init flow and plugin install documentation Rewrite quick start to include login step and editor flag. Add archgate login command docs. Replace old claude-code-plugin GitHub link with plugins.archgate.dev. Add dedicated Claude Code and Cursor plugin sections with install instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * add initialized configs for claude and cursor * docs: clarify free CLI vs optional paid plugins Emphasize that the CLI is free and fully functional without plugins or an account. Move login out of quick start since it is only needed for the optional paid editor plugins. Add callouts throughout the README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add cursor onboarding step for ag-onboard skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style: fix prettier formatting in settings.local.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
archgate logincommand with GitHub OAuth device flow (RFC 8628) for CLI authenticationPOST /api/token/claimon the plugins service~/.archgate/credentialsarchgate initto auto-detect credentials and configure plugin access:/plugin marketplace addcursor.tar.gzplugin bundle directlyNew commands
archgate loginarchgate login statusarchgate login logoutarchgate login refreshNew files
src/helpers/auth.tssrc/helpers/plugin-install.tssrc/commands/login.tstests/helpers/auth.test.tstests/commands/login.test.tstests/helpers/plugin-install.test.tsTest plan
bun test tests/helpers/auth.test.ts tests/commands/login.test.ts tests/helpers/plugin-install.test.ts)no-await-in-loopwarnings for RFC 8628 polling)archgate loginagainst live plugins servicearchgate init --install-pluginwith stored credentials🤖 Generated with Claude Code