mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: 📝 Move documentation to a custom VitePress site
This commit is contained in:
parent
19d8680289
commit
06a8dd1c0a
26 changed files with 1449 additions and 775 deletions
25
docs/cli/index.md
Normal file
25
docs/cli/index.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Versia Server CLI
|
||||
|
||||
Versia Server includes a built-in, scripting-compatible CLI that can be used to manage the server. This CLI can be used to create and delete users, manage the database and more. It can also output data in JSON or CSV format, making it easy to use in scripts.
|
||||
|
||||
## Using the CLI
|
||||
|
||||
Versia Server includes a built-in CLI for managing the server. To use it, simply run the following command:
|
||||
|
||||
```bash
|
||||
# Development
|
||||
bun cli help
|
||||
# Source installs
|
||||
bun run dist/cli.js help
|
||||
# Docker
|
||||
# Replace `versia` with the name of your container
|
||||
docker compose exec -it versia /bin/sh /app/entrypoint.sh cli help
|
||||
```
|
||||
|
||||
You can use the `help` command to see a list of available commands. These include creating users, deleting users and more. Each command also has a `--help,-h` flag that you can use to see more information about the command.
|
||||
|
||||
## Scripting with the CLI
|
||||
|
||||
Some CLI commands that return data as tables can be used in scripts. To convert them to JSON or CSV, some commands allow you to specify a `--format` flag that can be either `"json"` or `"csv"`. See `cli help` or `cli <command> -h` for more information.
|
||||
|
||||
Flags can be used in any order and anywhere in the script (except for the `cli` command itself).
|
||||
Loading…
Add table
Add a link
Reference in a new issue