Skip to content

Require project IDs for CLI request scoping - #218

Merged
IlyaasK merged 2 commits into
mainfrom
hypeship/cli-project-id-scope
Aug 7, 2026
Merged

Require project IDs for CLI request scoping#218
IlyaasK merged 2 commits into
mainfrom
hypeship/cli-project-id-scope

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • document the global --project flag as accepting project IDs only
  • use the Go SDK's typed option.WithProjectID client option
  • align KERNEL_PROJECT examples with the merged API contract

Why

X-Kernel-Project-Id is an ID selector on the merged API. Advertising project names here can scope a command incorrectly or produce a confusing not-found response. The typed SDK option also keeps client configuration aligned with generated SDK behavior.

Implementation

The request still carries the same X-Kernel-Project-Id header. This changes the public CLI guidance and replaces the manually named header option with the SDK's first-class project option.

Verification

  • go test -short -timeout=2m ./...
  • go vet ./...
  • gofmt -l cmd
  • git diff --check
  • crap4go: changed resolveProjectSelection CRAP 2.0; root init CRAP 5.8

Note

Low Risk
Small client-option refactor with equivalent header behavior; main user-facing change is clearer docs that names are not valid for global scoping.

Overview
Global project scoping (--project / KERNEL_PROJECT) is now documented and intended for project IDs only, not names, matching the API’s X-Kernel-Project-Id contract.

Client setup switches from a manual X-Kernel-Project-Id header option to the Go SDK’s option.WithProjectID (same header, typed configuration). README and flag help text are updated accordingly, including clarification that api-keys create --project-id is separate from the global scoping flag. Tests use ID-style example values.

Reviewed by Cursor Bugbot for commit 8f4d57d. Bugbot is set up for automated code reviews on this repo. Configure here.

Document the global project selector truthfully and use the SDK's canonical project option so request scoping continues to match the ID-only API header contract.
@IlyaasK
IlyaasK requested a review from Sayan- August 7, 2026 14:16
@IlyaasK
IlyaasK merged commit 4cb135d into main Aug 7, 2026
7 checks passed
@IlyaasK
IlyaasK deleted the hypeship/cli-project-id-scope branch August 7, 2026 17:52
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