Skip to content

feat(cli): expand API command coverage - #6837

Draft
chronark wants to merge 2 commits into
mainfrom
chronark/cli
Draft

feat(cli): expand API command coverage#6837
chronark wants to merge 2 commits into
mainfrom
chronark/cli

Conversation

@chronark

@chronark chronark commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Expands unkey api coverage with commands for apps, deployments, environments, gateway policies, portal sessions, and projects. Updates existing API commands to support typed --body input, JSON-backed domain flags, current SDK request types, and consistent output behavior.

Adds generic mutually exclusive CLI flags so each command can expose --body directly while rejecting combinations with request-building flags. Authentication, API URL, configuration, and output flags remain available in body mode.

Updates command documentation, navigation, generator guidance, and the SDK dependency.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Run mise exec -- rask ./pkg/cli ./cmd/api/...
  • Run mise run build
  • Verify unkey api <group> <command> --help shows request flags as mutually exclusive with --body
  • Verify an explicit JSON body reaches a local test server while mixed body/request flags fail before the request

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Internal Workflow Guide
  • Self-reviewed the changes
  • Commented on hard-to-understand behavior
  • Ran pnpm build (not applicable)
  • Ran pnpm fmt (not applicable)
  • Ran mise run fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto the branch
  • The changes don't cause responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR (not applicable)
  • Updated the Unkey Docs where necessary

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Jul 28, 2026 6:35am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
design Ignored Ignored Preview Jul 28, 2026 6:35am

Request Review

@mintlify

mintlify Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
unkey 🟢 Ready View Preview Jul 23, 2026, 3:53 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@socket-security

socket-security Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​unkeyed/​sdks/​api/​go/​v2@​v2.6.1 ⏵ v2.7.173 -9100100100100

View full report

@mintlify

mintlify Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
unkey 🟡 Building Jul 23, 2026, 3:50 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant