Identity Management Commands
Commands for managing users, agent identities, API keys, and OAuth consents.
All commands require a running server and admin credentials:
User Commands (shark user)
shark user list
List all users.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--limit | int | 50 | Maximum number of users to return |
--search | string | (none) | Filter by email or name (substring match) |
--json | bool | false | Emit JSON array |
Examples
shark user create
Create a new user.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--email | string | (required) | User email address |
--name | string | (none) | Display name |
--password | string | (none) | Initial password (optional; user can set via magic link otherwise) |
--json | bool | false | Emit created user as JSON |
Examples
shark user show
Show a single user by ID.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit user object as JSON |
Examples
shark user update
Update a user's fields (partial update — only changed flags are sent).
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | (none) | New display name |
--email | string | (none) | New email address |
--email-verified | bool | false | Set email-verified state |
--json | bool | false | Emit updated user as JSON |
Examples
Gotchas
- At least one flag must be provided; the command errors if nothing changes.
shark user delete
Delete a user (destructive — irreversible).
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--yes | bool | false | Skip interactive confirmation prompt |
--json | bool | false | Emit {"deleted":"<id>"} |
Examples
Agent Commands (shark agent)
Agents are non-human identities (services, bots, workers) that authenticate via OAuth client credentials or DPoP-bound tokens.
shark agent register
Register a new agent identity. The client secret is shown only once.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | (required) | Human-readable agent name |
--description | string | (none) | Optional description |
--app | string | (none) | App slug to associate this agent with (stored in metadata) |
--json | bool | false | Emit created agent as JSON |
Examples
Gotchas
- The
client_secretis shown exactly once. Save it immediately — there is no way to retrieve it again. - To get a new secret, use
shark agent rotate-secret <id>.
shark agent show
Show a single agent by ID.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit agent object as JSON |
Examples
shark agent update
Update an agent's name or description.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | (none) | New agent name |
--description | string | (none) | New description |
--json | bool | false | Emit updated agent as JSON |
Examples
shark agent delete
Deactivate (soft-delete) an agent.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--yes | bool | false | Skip confirmation prompt |
--json | bool | false | Emit {"deleted":"<id>"} |
Examples
shark agent rotate-secret
Rotate an agent's client secret. The new secret is shown only once.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit {"client_secret":"..."} as JSON |
Examples
shark agent revoke-tokens
Revoke all active OAuth tokens for an agent (force re-authentication).
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit {"revoked":<count>} |
Examples
API Key Commands (shark api-key)
Admin API keys authenticate CLI and programmatic access to the admin API.
shark api-key create
Create a new admin API key. The key value is shown only once.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | (required) | Name for the API key |
--json | bool | false | Emit created key as JSON |
Examples
Gotchas
- The
keyvalue is shown exactly once at creation. Set it asSHARK_ADMIN_TOKENbefore it scrolls off.
shark api-key list
List all API keys (key values are never shown — prefix only).
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit JSON array |
Examples
shark api-key revoke
Permanently revoke an API key by ID.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit {"revoked":"<id>"} |
Examples
shark api-key rotate
Rotate an API key — generates a new value, invalidates the old one. New key shown once.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit {"key":"..."} with new value |
Examples
Consent Commands (shark consents)
shark consents list
List OAuth consents granted by users.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--user / -u | string | (none) | Filter by user ID |
--json | bool | false | Emit JSON array |