Skip to content

Add signup command - #43

Draft
usiegl00 wants to merge 1 commit into
mainfrom
feature/signup
Draft

Add signup command#43
usiegl00 wants to merge 1 commit into
mainfrom
feature/signup

Conversation

@usiegl00

Copy link
Copy Markdown
Contributor

Summary

Adds bld signup -e user@example.com, a fully CLI-driven signup so an agent can sign a user up on their behalf with just an email address.

  • Calls Build::DefaultApi#signup(email), which sends a verification link to that address
  • No auto-login: the user clicks the link to finish creating the account, then runs bld login to authenticate
  • Output notes that region access is granted separately, so a new account may not have access to any region yet
  • Signup is unauthenticated, so the command builds Build::DefaultApi directly rather than going through Base#api (which exits when no token is stored)
  • On Build::ApiError, shows the response body's error JSON field (falling back to the raw message) and exits non-zero
  • Registers the command in build_cli.cr and documents it in bld skills per AGENTS.md

⚠️ Does not compile yet — SDK dependency

DefaultApi#signup does not exist in the generated SDK yet. It is added by a follow-up buildio/sdk-crystal-lang PR that should reference this PR. Until that SDK update is pinned here, this branch fails to build — expected and intentional per the agreed workflow (CLI side first, SDK/server side after).

Expected generated method (mirroring oidc_login): DefaultApi#signup(email : String? = nil) — raises Build::ApiError on non-2xx, where the error body may contain a JSON "error" message for display.

Test plan

  • bld signup --help and missing --email error path verified against a locally built binary (prior raw-HTTP iteration; command wiring unchanged)
  • shards build / crystal spec once the SDK adds signup
  • End-to-end verification against the real endpoint

🤖 Generated with Claude Code

Adds `bld signup -e user@example.com`, a fully CLI-driven signup so an
agent can sign a user up on their behalf. It calls the SDK signup
endpoint, which sends a verification link to that address; the user
then clicks the link and runs `bld login` to authenticate (no
auto-login). Output notes that region access is granted separately, so
a new account may not have access to any region yet.

DefaultApi#signup does not exist in the generated SDK yet — it is added
by a follow-up buildio/sdk-crystal-lang PR referencing this one, so
this branch does not compile until that SDK update is pinned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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