docs: add reference CLI usage
This commit is contained in:
parent
220e2d2801
commit
8fd54383a8
3 changed files with 49 additions and 1 deletions
43
apps/docs/content/docs/cli.mdx
Normal file
43
apps/docs/content/docs/cli.mdx
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
title: CLI Reference
|
||||||
|
description: Short reference for Zerobyte admin CLI commands
|
||||||
|
---
|
||||||
|
|
||||||
|
The Zerobyte CLI is useful for account recovery and admin maintenance tasks that are easier to run from the server than from the web UI.
|
||||||
|
|
||||||
|
Run commands inside the Zerobyte container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it zerobyte bun run cli <command>
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `--help` to see all options:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it zerobyte bun run cli --help
|
||||||
|
docker exec -it zerobyte bun run cli reset-password --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Most commands prompt for missing values when run interactively.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
| Command | Useful for |
|
||||||
|
|---------|------------|
|
||||||
|
| `reset-password` | Reset a user's password when they are locked out or forgot it. Invalidates existing sessions. |
|
||||||
|
| `disable-2fa` | Disable two-factor authentication for a user who lost access to their 2FA device. |
|
||||||
|
| `change-username` | Rename a user account. Invalidates existing sessions. |
|
||||||
|
| `change-email` | Change a user's email address. Removes linked SSO accounts for that user and invalidates sessions. |
|
||||||
|
| `rekey-2fa` | Re-encrypt existing 2FA secrets using the current `APP_SECRET`, usually after migrating from an older secret setup. |
|
||||||
|
| `assign-organization` | Move a user to another organization by organization slug. Invalidates existing sessions. |
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it zerobyte bun run cli reset-password --username admin
|
||||||
|
docker exec -it zerobyte bun run cli disable-2fa --username admin
|
||||||
|
docker exec -it zerobyte bun run cli change-email --username admin --email admin@example.com
|
||||||
|
docker exec -it zerobyte bun run cli assign-organization --username admin --organization default
|
||||||
|
```
|
||||||
|
|
||||||
|
For non-interactive use, pass the command options directly instead of relying on prompts.
|
||||||
|
|
@ -56,9 +56,13 @@ Zerobyte simplifies backup management by providing an intuitive web interface on
|
||||||
Environment variables and Docker configuration reference
|
Environment variables and Docker configuration reference
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
|
<Card title="CLI Reference" icon={<Terminal />} href="/docs/cli">
|
||||||
|
Admin commands for account recovery and maintenance
|
||||||
|
</Card>
|
||||||
|
|
||||||
<Card title="Troubleshooting" icon={<LifeBuoy />} href="/docs/troubleshooting">
|
<Card title="Troubleshooting" icon={<LifeBuoy />} href="/docs/troubleshooting">
|
||||||
Solve common issues with permissions, mounts, and rclone
|
Solve common issues with permissions, mounts, and rclone
|
||||||
</Card>
|
</Card>
|
||||||
</Cards>
|
</Cards>
|
||||||
|
|
||||||
import { BookOpen, Download, Rocket, ShieldCheck, Layers, BookMarked, Settings, LifeBuoy } from "lucide-react";
|
import { BookOpen, Download, Rocket, ShieldCheck, Layers, BookMarked, Settings, Terminal, LifeBuoy } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
"...guides",
|
"...guides",
|
||||||
"---Reference---",
|
"---Reference---",
|
||||||
"configuration",
|
"configuration",
|
||||||
|
"cli",
|
||||||
"troubleshooting"
|
"troubleshooting"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue