Skip to content

feat(cli): add whoami command#331

Merged
gregberge merged 1 commit into
mainfrom
feat/cli-whoami-command
Jul 1, 2026
Merged

feat(cli): add whoami command#331
gregberge merged 1 commit into
mainfrom
feat/cli-whoami-command

Conversation

@gregberge

Copy link
Copy Markdown
Member

Summary

  • Regenerated the API client schema to pick up the new /me endpoint (getMeUser).
  • Added an argos whoami command that prints the user authenticated with the current Argos token, supporting both human-readable and --json output.

Details

  • packages/api-client/src/schema.ts — regenerated from https://api.argos-ci.com/v2/openapi.yaml, adding the /me path.
  • packages/cli/src/commands/whoami.ts — new command. Resolves the token (--token / ARGOS_TOKEN / argos login), calls GET /me, and outputs the user.
  • packages/cli/src/lib/target.ts — exported the existing resolveToken helper so the non-build-scoped command reuses the same token resolution.
  • packages/cli/src/lib/format.ts — added formatMe for human-readable output (slug + name; the user ID is intentionally omitted).
  • packages/cli/src/index.ts — registered the command.
  • packages/cli/e2e/whoami.test.ts — covers the no-token failure plus JSON and human-readable success paths.

Test plan

  • pnpm lint, pnpm check-format, pnpm check-types pass.
  • pnpm test (45 unit tests) pass.

🤖 Generated with Claude Code

Regenerate the API schema to pick up the new `/me` endpoint and add a
`whoami` command that prints the user authenticated with the current
Argos token (text or `--json`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gregberge gregberge requested a review from jsfez June 30, 2026 20:52
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
argos-js-sdk-reference Ready Ready Preview, Comment Jun 30, 2026 8:53pm

Request Review

@gregberge gregberge merged commit d975bc6 into main Jul 1, 2026
68 checks passed
@gregberge gregberge deleted the feat/cli-whoami-command branch July 1, 2026 13:05
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