Admin Commands
Commands for runtime configuration, branding, signing key management, and instance introspection.
All commands require a running server and admin credentials:
shark admin config dump
Fetch and pretty-print the live admin configuration from the running server.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Included for consistency; output is always JSON |
The command always emits indented JSON — config is inherently structured and has no useful human-readable representation.
Examples
Gotchas
- Config is DB-backed (yaml was removed in W17). Changes made via the dashboard or API are reflected immediately.
- Sensitive fields (secrets, SMTP passwords) are redacted in the API response.
shark auth config show
Show the current server configuration. Alias of shark admin config dump — both commands fetch the full live config via GET /api/v1/admin/config.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit JSON |
Examples
shark branding get
Read current branding design tokens for an app.
Synopsis
Arguments
| Argument | Description |
|---|---|
<slug> | App slug (currently global; slug is reserved for future per-app scoping) |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit JSON (output is always JSON) |
Examples
shark branding set
Set design tokens for an app. Accepts key=value pairs or a JSON file.
Synopsis
Arguments
| Argument | Description |
|---|---|
<slug> | App slug |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--token | string[] | (none) | Design token as key=value (repeatable) |
--from-file | string | (none) | Path to a JSON file containing design tokens |
--json | bool | false | Emit updated branding as JSON |
Exactly one of --token or --from-file must be provided.
Examples
Gotchas
- Token keys are dot-notation paths (e.g.
colors.primary,typography.font_family). The format is defined by the dashboard's design token system. - Changes take effect immediately — no server restart required.
shark keys generate-jwt
Rotate the active RS256 JWT signing keypair via the admin API.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--rotate | bool | false | Accepted for compatibility; the endpoint always generates a new key |
--json | bool | false | Emit {"kid":"...","algorithm":"...","status":"..."} |
Examples
Gotchas
- The old key is retired (not deleted). Both old and new keys remain in the JWKS endpoint until
rotated_at + 2 × access_token_ttlhas elapsed, ensuring in-flight tokens remain valid. shark doctorwarns if any active key is older than 90 days.- Rotating mid-traffic is safe — the JWKS endpoint serves all non-expired keys.
shark whoami
Introspect the current token and print identity information.
Synopsis
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--json | bool | false | Emit identity JSON |
--token | string | (env) | Token to introspect (defaults to SHARK_ADMIN_TOKEN) |
--url | string | (env) | Server URL |
Behavior
- Calls
GET /api/v1/auth/mewith the configured token as a Bearer. - If that returns 401 (e.g. the token is an admin API key, not a user JWT), falls back to
GET /api/v1/admin/statsto verify the key is valid. - Reports
token_type: admin_api_keyin that case.
Examples
shark health
Ping the /healthz endpoint. Documented in full in 01-server.md.
shark cli
Print a grouped summary of all shark CLI commands to stdout.
Synopsis
No flags. Useful for a quick reference when offline.
Examples
Deprecated / Removed Commands
| Command | Status | Notes |
|---|---|---|
shark init | Removed | YAML-based init was removed in W17. All config is now DB-backed. First boot is automatic via shark serve. |
| Device flow commands | Disabled | OAuth device authorization flow is disabled in v0.1. |