Skip to content

CLI Flag serveur

Manech Dubreil edited this page Oct 21, 2026 · 1 revision

--serveur

Status: ✅ Implemented (#44) — HTTP server coming with #91

Runs the binary in server mode instead of the CLI.

Usage

transf-orm --serveur
transf-orm --serveur --port 8080

Behavior

  • For now, it only prints Starting transf-orm server on port <port> on stderr and exits. The HTTP bootstrap (axum, /health, --ip / --host) comes with #91.
  • Cannot be combined with a CLI command (transf-orm --serveur convert ...) nor with --cli: both print an error and exit with status 2.
  • Enables the server-only flag --port.
  • Reads the same global flags as the CLI, e.g. --verbose and --debug.

Implementation

  • Declared in the Args struct of crates/transf-orm/src/main.rs. dispatch checks for a command (ErrorKind::ArgumentConflict) and then calls transf_orm_server::run(&config, server_args).
  • crates/server/src/lib.rs — run(config, args).
  • Tests: serveur_flag_starts_server, conflicting_modes_exit_with_2 in crates/transf-orm/tests/dispatch.rs.

← CLI

Clone this wiki locally