feat(cli): add user management CLI commands (list, create, update, delete)#794
Merged
feat(cli): add user management CLI commands (list, create, update, delete)#794
Conversation
nhopeatall
approved these changes
Mar 14, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — Clean implementation that follows the established credentials/ CLI pattern exactly. All four commands (list, create, update, delete) are thin tRPC adapters with consistent flag definitions, error handling, and --json output support.
Verified:
- tRPC
usersRouterexists with matchinglist,create,update,deleteendpoints and proper authorization (adminProcedure, superadmin guards) - oclif auto-discovers
users/via existing glob pattern inpackage.json formatDateimport inlist.tsresolves correctly from_shared/format.tsroleflag usesoptionsconstraint so the type cast is safe- No test coverage, consistent with existing CLI commands (credentials also has none)
- All CI checks pass (typecheck, lint, 4667 tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cascade users list— displays table of org users (ID, Email, Name, Role, Created) with--jsonsupportcascade users create --email --password --name [--role]— creates a new user via tRPCcascade users update <id> [--name] [--email] [--role] [--password]— updates user fields via tRPCcascade users delete <id> --yes— deletes a user with confirmation guardAll commands live in
src/cli/dashboard/users/, extendDashboardCommand, and follow thecredentials/CLI pattern exactly (oclif flags, tRPC calls,--jsonoutput, error handling).Closes: https://trello.com/c/fzNezXRd/322-as-an-admin-i-want-cli-commands-to-manage-users-so-that-i-can-add-list-update-delete-users-from-the-terminal
Test plan
npm run typecheckpasses (zero errors)npm run lint:fixpasses (no changes needed)npm testpasses (4667 tests, 269 test files)cascade users listshows a user tablecascade users create --email x@y.com --password p --name "Test User"creates a usercascade users update <id> --name "New Name"updates the usercascade users delete <id> --yesdeletes the user🤖 Generated with Claude Code