Showcase server CLI
The Showcase server is also its own administration tool. Given a subcommand it opens the configured database, runs any pending migrations, performs the action, writes an audit-log entry, and exits — the server daemon does not start.
Use it for recovery operations that must not depend on a working browser session: a lost admin password, a locked-out account, a first admin on a machine that has no mail server.
The running server is unaffected
Subcommands act directly on the database and exit. You do not need to stop the service first, and running one does not restart it.
Running the CLI
The command is showcase-server. Where you find it depends on the platform.
Linux
The Debian package puts it on your PATH:
showcase-server users:create-admin --email alice@example.com --password 'SecurePassword123'
The database is owned by the mt-showcase-server service account, so the
command re-runs itself as that user and tells you it has done so:
showcase-server: re-running as mt-showcase-server (owner of the database)
You will be prompted for your sudo password. Running the server's entry
point directly as your own user fails with SQLITE_READONLY.
Windows
The installer does not add the server folder to PATH. Call the script by its
full path from an ordinary Command Prompt or PowerShell:
"C:\Program Files\MT Showcase\server\showcase-server.cmd" users:create-admin --email alice@example.com --password "SecurePassword123"
Windows runs the server as the signed-in operator rather than a service account, so there is no privilege escalation step.
macOS
The command lives inside the application bundle:
"/Applications/MT Showcase.app/Contents/Resources/server/showcase-server" users:create-admin --email alice@example.com --password 'SecurePassword123'
The database is in your own home directory (~/.mt-showcase/showcase.db), so
no escalation is needed.
Older installations
If showcase-server is not present, your build predates it. Invoke the
server's entry point directly — the subcommands and exit codes are
identical:
# Linux
cd /opt/mt-showcase-<version>/server
sudo -u mt-showcase-server env NODE_ENV=production \
node/bin/node api/dist/index.js users:create-admin --email … --password …
On Windows use node\node.exe api\dist\index.js … from
C:\Program Files\MT Showcase\server with NODE_ENV=production_win; on
macOS use Contents/Resources/node/bin/node against
Contents/Resources/server/api/dist/index.js.
Subcommands
users:create-admin
showcase-server users:create-admin --email <email> --password <password> [--display-name <name>]
Creates a role=admin status=active user, bypassing the setup wizard. Use it
to seed the first administrator, or to regain access when no admin can log in.
- Idempotent when the email already belongs to an active admin — exits 0 and changes nothing.
- Refused with exit 65 when the email exists with a different role or status. The CLI never silently promotes, demotes, or re-enables an account.
users:reset-password
showcase-server users:reset-password --email <email> --password <new-password>
Overwrites the user's password and clears any active lockout
(failed_login_count, locked_until). Exits 66 if no such user exists.
users:disable / users:enable
showcase-server users:disable --email <email>
showcase-server users:enable --email <email>
Toggles the account between active and disabled. A disabled user cannot
log in. Both are idempotent — running one against an account already in that
state exits 0 and changes nothing.
users:unlock
showcase-server users:unlock --email <email>
Clears failed_login_count and locked_until for an account that tripped the
lockout threshold. Equivalent to the Unlock button in the admin portal.
Idempotent.
keys:rotate-signing
showcase-server keys:rotate-signing
Mints a new JWT signing key and demotes the previous key to a 30-day validity window, so tokens already issued keep verifying until they expire. Prints the new key ID.
This does not end active sessions
For immediate fleet-wide invalidation — a suspected compromise, say — use Admin → Security → Revoke all sessions in the editor instead. That revokes every refresh token and rotates the signing key in one transaction.
Exit codes
Scripts can branch on the exit status; every subcommand uses the same set.
| Code | Meaning |
|---|---|
0 |
Success, or a no-op (these subcommands are idempotent) |
1 |
Unhandled error |
64 |
Usage or validation error — a missing or malformed flag |
65 |
The email exists with a conflicting role or status |
66 |
User not found |
Audit trail
Every subcommand writes a row to the audit_log table, so CLI recovery
actions appear alongside actions taken in the editor. There is no separate
CLI log to collect.