Skip to main content

Crate sapphire_sync_cli

Crate sapphire_sync_cli 

Source
Expand description

sapphire-sync: the app’s command line, Syncthing-style.

As serve, it is the embedded server (sapphire-sync-server); every other subcommand is a one-shot invocation that talks to that server over the local socket — the app’s own sync verb and the framework’s (status, service, workspace, api-key, config, …).

The modules are a library so the integration tests can link them, and so both editions run the same commands (run): the headless one (sapphire-sync-headless) and the desktop app, which runs them when given a subcommand. Both put sapphire-sync on PATH.

Modules§

cli
CLI-shell types: the command line both editions run.
sync
The app’s own sync verb: sync disable.

Enums§

Edition
Which edition runs the server: the release file update installs is the edition’s own.

Functions§

exit_with
Print err the app’s way — the program name, the message (Display, not the Debug dump) — and exit 1. A plain Result main would print Error: {err:?} instead.
run
Run one command as edition, exiting the process with its code.