feat(cli): add token subcommand for Graph API bearer token export#12
Open
stevenobiajulu wants to merge 1 commit intomainfrom
Open
feat(cli): add token subcommand for Graph API bearer token export#12stevenobiajulu wants to merge 1 commit intomainfrom
token subcommand for Graph API bearer token export#12stevenobiajulu wants to merge 1 commit intomainfrom
Conversation
Print a Microsoft Graph API bearer token to stdout for use in sandboxed environments (e.g., NemoClaw) where the macOS Keychain is unavailable. Follows `gh auth token` convention: token to stdout, errors to stderr. Auto-selects when one mailbox is configured; requires --mailbox if multiple exist (exit 2 with list). Strictly noninteractive — expired auth directs user to `configure` instead of starting device code flow. Includes stdout flush await to prevent truncation when CLI wrapper calls process.exit() after runCli() resolves.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Add a
tokensubcommand that prints a Microsoft Graph API bearer token to stdout for use in sandboxed environments where the OS keychain is unavailable.--mailboxif multiple exist (exit 2 with list)configureUsage
Motivation
NemoClaw sandboxes pass credentials as env vars at creation time (same pattern as Discord/Slack bot tokens). This command enables
gh auth token-style piping for Graph API tokens.Test plan
/v1.0/mereturns correct user)--mailbox nonexistentreturns exit 2 with error on stderr--mailbox [email protected]returns valid token