CLI reference
fret serve [options] opens the dock (web UI and API)fret add <link>… creates a shipment on a running Fretfret status shows the state of the dockfret healthcheck checks that a local Fret answers (for Docker)fret version shows the versionfret help shows this helpWithout a command, fret runs fret serve.
fret serve
Section titled “fret serve”Starts Fret: the interface, the API, the dock and collection. It runs until it receives SIGINT
(Ctrl+C) or SIGTERM, then stops cleanly: transfers save their progress and
resume at the next start.
| Option | Variable | Default |
|---|---|---|
-addr |
FRET_ADDR |
:8080 |
-collect-addr |
FRET_COLLECT_ADDR |
127.0.0.1:9666 |
-data-dir |
FRET_DATA_DIR |
./data |
-download-dir |
FRET_DOWNLOAD_DIR |
./downloads |
-auth |
FRET_AUTH |
password |
-log-level |
FRET_LOG_LEVEL |
info |
-log-format |
FRET_LOG_FORMAT |
text |
-dev-cors |
FRET_DEV_CORS |
empty |
Each option is described in Configuration. fret serve -h lists them.
fret add
Section titled “fret add”Creates a shipment on a running Fret, through its API.
fret add [options] <link>…fret add [options] -| Option | Default | Value |
|---|---|---|
-name |
from the links | Shipment name |
-dir |
warehouse root | Warehouse subfolder, such as series/doc |
-priority |
standard |
express, standard or night (Overnight) |
Options come before the links. With - as the only link, the links are read from the standard
input, one per line (any text is accepted, as in New shipment).
It prints the shipment and its parcels, with the state of each one (at the dock, or already known):
Shipment "Shipment of 2 parcels": 2 parcels FR-0012 ubuntu.iso (at the dock) FR-0013 debian.iso (at the dock)fret status
Section titled “fret status”Prints the state of the dock, then every shipment on the dock with its parcels: number, status, progress, weight and name.
DOCK OPEN · doors 1/3 · 2.0 MB/s · gauge unlimited
Ubuntu 24.04 FR-0002 In transit 10% 314.6 MB ubuntu-24.04.3-desktop-amd64.isofret healthcheck
Section titled “fret healthcheck”Calls /api/v1/health on the local Fret (the address of FRET_ADDR, or of -addr) and exits with 0
if it answers within 3 seconds. The Docker image uses it as its health check.
fret version
Section titled “fret version”Prints fret 1.0.0. A build from the sources prints dev-<commit>.
Environment of add and status
Section titled “Environment of add and status”| Variable | Default | Use |
|---|---|---|
FRET_URL |
http://localhost:8080 |
Address of the Fret to drive |
FRET_TOKEN |
none | API token, created in Settings › API tokens |
With FRET_AUTH=none on the server, no token is needed.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Success |
1 |
Failure: Fret unreachable, access denied, request refused, or serve stopped on an error |
2 |
Wrong usage: unknown command, invalid option or configuration |