1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// === m1nd-mcp CLI argument parsing ===
//
// Clap derive struct for m1nd-mcp binary modes.
// Replaces manual std::env::args() parsing in main.rs.
use clap::Parser;
#[derive(Parser, Debug)]
#[command(name = "m1nd-mcp", about = "Neuro-symbolic connectome engine", version)]
pub struct Cli {
/// Start HTTP server with embedded web UI
#[arg(long)]
pub serve: bool,
/// HTTP server port
#[arg(long, default_value = "1337")]
pub port: u16,
/// Bind address override (default: 127.0.0.1). Use 0.0.0.0 for network access.
#[arg(long, default_value = "127.0.0.1")]
pub bind: String,
/// Serve frontend from disk instead of embedded (dev mode)
#[arg(long)]
pub dev: bool,
/// Also run JSON-RPC stdio server alongside HTTP
#[arg(long)]
pub stdio: bool,
/// Auto-open browser on startup
#[arg(long)]
pub open: bool,
/// Path to config JSON file
#[arg(long)]
pub config: Option<String>,
/// Graph source path override
#[arg(long)]
pub graph: Option<String>,
/// Plasticity state path override
#[arg(long)]
pub plasticity: Option<String>,
/// Domain: code, music, memory, generic
#[arg(long, default_value = "code")]
pub domain: String,
/// Disable auto-launching the HTTP GUI in stdio mode (for CI, headless servers)
#[arg(long)]
pub no_gui: bool,
/// Path to event log file (append-only JSON lines). Enables cross-process SSE via file bus.
#[arg(long)]
pub event_log: Option<String>,
/// Watch an event log file and broadcast new events via SSE (HTTP-only mode).
/// Use when a separate stdio process writes events to this file.
#[arg(long)]
pub watch_events: Option<String>,
}