Skip to content

CLI Flag cli

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

--cli

Status: ✅ Implemented (#44)

Runs the binary in CLI mode. This is the default mode, so the flag can be omitted.

Usage

transf-orm                       # interactive CLI (same as transf-orm --cli)
transf-orm --cli                 # interactive CLI
transf-orm [--cli] <command> ... # run one command, e.g. transf-orm convert schema.prisma

Behavior

  • With a command, runs that command (see convert).
  • Without a command, starts the interactive mode. It is not implemented yet and only prints Interactive mode is not implemented yet (see #48).
  • Conflicts with --serveur: --cli --serveur prints an error and exits with status 2.

Implementation

  • Declared in the Args struct of crates/transf-orm/src/main.rs with conflicts_with = "serveur".
  • dispatch calls transf_orm_cli::run(&config, command) whenever --serveur is absent.
  • Tests: no_argument_runs_interactive_cli, cli_flag_runs_interactive_cli, cli_mode_runs_commands, conflicting_modes_exit_with_2 in crates/transf-orm/tests/dispatch.rs.

← CLI

Clone this wiki locally