Skip to content

feat(cli): add login and logout - #23

Merged
Kikobeats merged 2 commits into
masterfrom
feat/cli-login
Aug 25, 2026
Merged

feat(cli): add login and logout#23
Kikobeats merged 2 commits into
masterfrom
feat/cli-login

Conversation

@Kikobeats

Copy link
Copy Markdown
Member

Summary

  • Add microlink login / logout so a purchased API key can be saved locally (~/.config/microlink/config.json).
  • Login opens the dashboard /connect handshake, fetches keys, and shows a TTY picker. --api-key still wins over MICROLINK_API_KEY over the file.
  • 429 responses point at microlink login.

Depends on the dashboard /connect PR in microlinkhq/gateway.

Test plan

  • microlink login --help / microlink logout --help
  • microlink logout removes ~/.config/microlink/config.json
  • With a local dashboard: MICROLINK_DASHBOARD_URL=http://localhost:3000 microlink login saves a key
  • After login, a product command uses the saved key (no --api-key / env)
  • --api-key and MICROLINK_API_KEY still override the file

Made with Cursor

Rate-limited users buy a key and had no official place to store it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 10 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dcbf6126-af53-4500-8053-eb7bb6462e26

📥 Commits

Reviewing files that changed from the base of the PR and between e2a1dae and 1ae44ce.

📒 Files selected for processing (7)
  • README.md
  • packages/core/bin/config.js
  • packages/core/bin/help.js
  • packages/core/bin/index.js
  • packages/core/bin/login.js
  • packages/core/bin/select.js
  • packages/core/test/cli.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

coveralls commented Aug 25, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32813496452

Warning

No base build found for commit e2a1dae on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 76.285%

Details

  • Patch coverage: 231 uncovered changes across 4 files (199 of 430 lines covered, 46.28%).

Uncovered Changes

File Changed Covered %
packages/core/bin/login.js 148 24 16.22%
packages/core/bin/select.js 98 18 18.37%
packages/core/bin/index.js 89 72 80.9%
packages/core/bin/config.js 61 51 83.61%
Total (5 files) 430 199 46.28%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 4708
Covered Lines: 3596
Line Coverage: 76.38%
Relevant Branches: 719
Covered Branches: 544
Branch Coverage: 75.66%
Branches in Coverage %: Yes
Coverage Strength: 13.77 hits per line

💛 - Coveralls

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5741af9. Configure here.

Comment thread packages/core/bin/login.js
Comment thread packages/core/bin/login.js
Co-authored-by: Cursor <cursoragent@cursor.com>
@Kikobeats
Kikobeats merged commit 352fe0e into master Aug 25, 2026
9 checks passed
@Kikobeats
Kikobeats deleted the feat/cli-login branch August 25, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants