Console (CLI)
The image ships a small command-line tool for the user operations you sometimes need without a browser:
- an admin who is locked out;
- a scripted setup that creates accounts;
- a quick "who is this, suspend them now".
docker compose exec app schleuse user listapp is the service name from the reference compose. Without compose, use docker exec -it <container> schleuse user list. From a source checkout, run pnpm build once, then pnpm cli user list.
The CLI runs inside the container, against the configured database, with the same NUXT_* environment as the server. It starts no listener and runs no migrations. If the database has never been migrated, it says so and stops: start the server once first.
Commands
| Command | What it does |
|---|---|
user list [--search <text>] | Every user, newest first: email, name, flags (admin, verified, suspended), id. --search matches email and name. |
user show <email> | One user, with password / passkey / authenticator-app status and app roles. |
user create <email> [--first-name <n>] [--last-name <n>] [--admin] | Creates a verified account and prints a generated password once. It satisfies your password policy. |
user create <email> --password-stdin | The same, with the password read from stdin and checked against the policy. |
user create <email> --invite | An unverified account plus an invite link. The link is also mailed when SMTP is configured. Same as Create user → invite in the admin panel. |
user set-password <email> [--password-stdin] | Replaces the password (generated, or from stdin). The policy and the reuse history apply, and all of the user's sessions end. |
user admin <email> on|off | Grant or revoke admin. |
user verify-email <email> | Mark the address verified. |
user suspend <email> / user unsuspend <email> | Like the admin buttons. Suspending blocks sign-in, ends sessions and revokes the user's OIDC tokens. |
user logout <email> | Ends every session of that user. |
user reset-2fa <email> | Removes the second factor, with the same rules as the admin panel's Reset 2FA, and ends all sessions. |
user delete <email> --yes | Erases the account exactly like the admin panel does. Without --yes nothing happens. |
The last remaining admin can be neither demoted nor deleted. Promote someone else first.
There is no --password <value> on purpose: a password in an argument ends up in your shell history and in ps. Pipe it in instead:
printf '%s\n' "$NEW_PASSWORD" | docker compose exec -T app schleuse user set-password ops@example.com --password-stdinExit codes are 0 for success, 1 when the operation failed (unknown user, policy violation, last admin) and 2 for a usage error. Add --verbose to see a stack trace when something unexpected breaks.
Locked out?
docker compose exec app schleuse user set-password admin@example.com
docker compose exec app schleuse user reset-2fa admin@example.com # lost the authenticator tooThe first command prints a new password. Sign in with it and change it on the account page.
Audit trail and security
Every change is written to the audit log under the same event as its admin-panel twin (admin.user.created, admin.user.suspended, …). The actor is empty and the reason starts with via CLI. Webhooks subscribed to those events fire as usual. The command waits for their delivery before it exits, so a receiver that does not answer delays it by the webhook timeout plus any configured retries.
The CLI has no login of its own and opens no port. Whoever can run docker exec in the container can already read the database and the signing keys under /app/data, so shell access is the authorization. Guard it like root on the host.