oxur_cli/
args.rs

1//! Command-line argument definitions for Oxur CLI tools.
2//!
3//! This module contains shared argument structures that can be reused
4//! across different Oxur binaries (e.g., `oxur` and `cargo-oxur`).
5
6use clap::Args;
7
8/// REPL command arguments
9///
10/// These arguments control how the Oxur REPL operates, including
11/// connection modes, server configuration, and display options.
12#[derive(Args, Debug, Default, Clone)]
13pub struct ReplArgs {
14    /// Start the default built-in REPL server and connect to it
15    /// with the built-in client. This is the default behavior.
16    #[arg(short = 'i', long = "interactive")]
17    pub interactive: bool,
18
19    /// Connect to a running REPL server with the built-in client.
20    /// If no address given, connects to 127.0.0.1:5099
21    #[arg(short = 'c', long = "connect", value_name = "HOST:PORT")]
22    pub connect: Option<Option<String>>,
23
24    /// Disable ANSI colors in interactive or connect modes.
25    #[arg(long = "no-color")]
26    pub no_color: bool,
27
28    /// Start a REPL server only (no client).
29    /// Use a path for Unix socket, or HOST:PORT for TCP.
30    #[arg(short = 's', long = "serve", value_name = "PATH|HOST:PORT")]
31    pub serve: Option<String>,
32
33    /// Acknowledge the port of this server to another nREPL server
34    /// running on ACK-PORT. Used for tooling integration.
35    #[arg(long = "ack", value_name = "ACK-PORT")]
36    pub ack: Option<u16>,
37
38    /// The transport module to use.
39    /// Default: oxur_repl::transport::tcp
40    #[arg(short = 't', long = "transport", value_name = "TRANSPORT")]
41    pub transport: Option<String>,
42}