Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cf2ca8b
feat: allow overriding CLI auth client ID via WORKOS_CLIENT_ID
nicknisi Jun 15, 2026
186ddb3
feat: point the CLI at a non-prod API via WORKOS_API_URL
nicknisi Jun 22, 2026
2dac1b4
feat: add `workos whoami` command
nicknisi Jun 23, 2026
86f44e9
feat: vendor Management catalog snapshot + loader
nicknisi Jun 25, 2026
835b707
feat(catalog): add justification manifest, curation, and reused confi…
nicknisi Aug 19, 2026
2cdd0db
feat: add account-plane lifecycle commands (environment, project, team)
nicknisi Jun 25, 2026
e407716
feat: add authkit app config commands (redirect URIs, CORS, logout UR…
nicknisi Jun 25, 2026
755607f
docs(catalog): note deferred userland->user ops and retained test fix…
nicknisi Jul 10, 2026
62af02c
feat: command-path auth guard with silent token refresh
nicknisi Jul 22, 2026
a9fcf49
feat: target the active environment on dashboard-plane commands
nicknisi Jul 22, 2026
a9252e6
feat!: migrate organization + user commands to the dashboard account …
nicknisi Jul 22, 2026
2f79a8a
feat!: migrate membership, invitation, session to the dashboard accou…
nicknisi Jul 22, 2026
9497d0a
feat!: migrate role, permission, feature-flag to the dashboard accoun…
nicknisi Jul 23, 2026
10675ff
feat!: migrate event + org-domain to the dashboard account plane; dir…
nicknisi Jul 23, 2026
38ae16b
feat!: migrate webhook, portal, config to the dashboard account plane
nicknisi Jul 23, 2026
1564619
chore: remove dead REST-plane code and align docs with dashboard auth
nicknisi Jul 23, 2026
3231673
test: add live smoke script for dashboard-plane resource commands
nicknisi Jul 23, 2026
a8f19f7
chore: formatting
nicknisi Jul 23, 2026
d3dd7e4
chore: remove unused declarations flagged by oxlint
nicknisi Jul 23, 2026
40408f6
chore: formatting
nicknisi Jul 23, 2026
40c7a09
fix: address review feedback on client-id override, 403 handling, and…
nicknisi Jul 23, 2026
0c76503
refactor: extract dashboard-operation executor seam and shared resour…
nicknisi Jul 23, 2026
14b434d
feat: add branding image upload to the CLI
nicknisi Jul 25, 2026
4356258
fix: point remaining clack imports at the ui facade
nicknisi Jul 25, 2026
f619172
feat!: move branding to a top-level command with a positional form
nicknisi Jul 25, 2026
c852df6
docs: document the authkit and branding commands in the README
nicknisi Jul 25, 2026
8602f57
fix: lowercase organization domain state in the curated shape
nicknisi Aug 19, 2026
c6673ec
test: add branch-vs-main parity smoke for migrated commands
nicknisi Aug 19, 2026
1d55ef6
chore: add setup wizard for the parity smoke prereqs
nicknisi Aug 19, 2026
c602351
test: make the parity smoke actually prove parity
nicknisi Aug 21, 2026
23878c8
feat: add central output conventions for the --json contract
nicknisi Aug 21, 2026
22d441d
feat!: normalize enum values, metadata shape, and lifecycle key
nicknisi Aug 21, 2026
f26c1aa
docs: write down the --json output conventions
nicknisi Aug 21, 2026
e67867d
docs: correct the org list --json example to the curated shape
nicknisi Aug 21, 2026
461df62
fix: snake_case multiword enum values instead of running them together
nicknisi Aug 21, 2026
25bb89c
test: pin the --json contract and guard the enum boundary
nicknisi Aug 21, 2026
825b1b2
test: seed user and invitation, widen the event window
nicknisi Aug 21, 2026
a98b607
docs: add migration guide for the breaking --json changes
nicknisi Aug 21, 2026
0dcd8ea
fix: stop truncating the --help --json command tree on a pipe
nicknisi Aug 24, 2026
127fb5e
fix: make event --after reach the next page
nicknisi Aug 24, 2026
25a6297
test: add a strict release gate to the parity smoke
nicknisi Aug 24, 2026
5a2f671
chore: formatting
nicknisi Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,38 @@ WorkOS CLI for installing AuthKit integrations and managing WorkOS resources (or
## Non-TTY Behavior

- **Output**: Auto-switches to JSON when piped or `--json` flag. `WORKOS_FORCE_TTY=1` overrides.
- **Auth**: Exits code 4 instead of opening browser. Requires prior `workos auth login` or `WORKOS_API_KEY` env var.
- **Auth**: Exits code 4 instead of opening browser. Resource commands (organization, user, role, permission, membership, invitation, session, event, feature-flag, org-domain, portal, webhook, config) use the dashboard session from a prior `workos auth login`; expired access tokens refresh silently while the stored refresh token is valid, so only a truly dead session exits 4. `WORKOS_API_KEY` applies only to `workos api` and the still-REST commands (`connection`, `directory`, `audit-log`, `api-key`, `vault`, plus the workflow/debug commands `seed`, `setup-org`, `onboard-user`, `verify-login`, `debug-sso`, `debug-sync`, `migrations`).
- **Errors**: Structured JSON to stderr: `{ "error": { "code": "...", "message": "..." } }`
- **Exit codes**: 0=success, 1=error, 2=cancelled, 4=auth required (follows `gh` CLI convention)
- **Headless flags**: `--no-branch`, `--no-commit`, `--create-pr`, `--no-git-check`. CI mode (`WORKOS_MODE=ci`) auto-continues past a dirty tree without `--no-git-check`; agent mode requires the flag.

## JSON Output Conventions

`--json` output is a public API: users script against it with jq and in CI. The
backend's vocabulary is an implementation detail and must never leak through
untranslated, or the next backend migration becomes another user-visible break.
Route every enum and metadata field through `src/utils/output-conventions.ts`
rather than hand-normalizing per command.

- **Keys are camelCase.**
- **Enum values are lowercase.** Backends emit assorted casings (`Verified`,
`PENDING`, `Active`); the CLI emits one convention. Use `enumOut()`.
- **Enum input is case-insensitive.** Whatever the CLI prints for a field it
accepts for that field ("forgiving in, canonical out"). Use `enumIn()`.
- **`state` is the lifecycle-state key** on every resource, not `status`.
- **`metadata` is an object map**, not GraphQL's array of pairs, so
`.metadata.foo` resolves in jq. Use `metadataToMap()`.
- **Internal/backend-only fields are dropped** from curated shapes.

When a spec mocks a backend response, feed it the backend's real casing
(`'Verified'`) and assert the lowercase output. A mock that feeds already-correct
values never exercises the normalization, which is exactly how a casing bug
shipped once already.

`scripts/parity-smoke.ts` compares this branch against `../main` and fails on any
unexpected field divergence. Its `ACCEPTED` map lists deliberate curations only;
a casing-only difference appearing there is a bug, not an accepted divergence.

## Tech Constraints

- **Bun** only; the shipped CLI is a Bun-compiled standalone binary
Expand Down
Loading
Loading