@@ -41,6 +41,7 @@ pub enum Commands {
4141 IMPORTANT: If the output file exists, it will be overwritten without warning.
4242 " }
4343 ) ]
44+ #[ serde( untagged) ]
4445 Init {
4546 /// Path where the configuration file will be written
4647 #[ clap( short, long, default_value = "config.toml" , verbatim_doc_comment) ]
@@ -50,6 +51,75 @@ pub enum Commands {
5051 #[ clap( short, long) ]
5152 #[ serde( skip_serializing_if = "Option::is_none" ) ]
5253 name : Option < String > ,
54+
55+ /// Gateway addresses to connect to (repeatable, overrides config)
56+ ///
57+ /// Gateways provide network bootstrapping, DHT access, and optional relay.
58+ /// Must include the peer ID in the multiaddr.
59+ ///
60+ /// Examples:
61+ /// --gateway /ip4/203.0.113.10/tcp/8080/p2p/12D3KooWAbc...
62+ /// --gateway /dns4/gateway.hypha.example/tcp/443/p2p/12D3KooWAbc...
63+ /// Required: connect to at least one gateway.
64+ #[ arg( long( "gateway" ) , verbatim_doc_comment) ]
65+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
66+ gateway_addresses : Option < Vec < Multiaddr > > ,
67+
68+ /// Addresses to listen on (repeatable, overrides config)
69+ ///
70+ /// Where the worker accepts incoming connections.
71+ ///
72+ /// Examples:
73+ /// --listen /ip4/0.0.0.0/tcp/9091
74+ /// --listen /ip4/0.0.0.0/udp/9091/quic-v1
75+ #[ arg( long( "listen" ) , verbatim_doc_comment) ]
76+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
77+ listen_addresses : Option < Vec < Multiaddr > > ,
78+
79+ /// External addresses to advertise (repeatable, overrides config)
80+ ///
81+ /// Publicly reachable addresses peers should use to connect.
82+ ///
83+ /// Examples:
84+ /// --external /ip4/203.0.113.30/tcp/9091
85+ /// --external /dns4/worker.example.com/tcp/9091
86+ #[ arg( long( "external" ) , verbatim_doc_comment) ]
87+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
88+ external_addresses : Option < Vec < Multiaddr > > ,
89+
90+ /// Enable relay circuit listening via gateway (overrides config)
91+ ///
92+ /// true = use relay (default), false = direct connections only.
93+ #[ arg( long( "relay-circuit" ) , verbatim_doc_comment) ]
94+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
95+ relay_circuit : Option < bool > ,
96+
97+ /// Socket path for driver communication (overrides config)
98+ ///
99+ /// Unix domain socket for worker-executor communication (optional).
100+ #[ arg( long( "socket" ) , verbatim_doc_comment) ]
101+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
102+ socket_address : Option < PathBuf > ,
103+
104+ /// Base directory for job working directories (overrides config)
105+ ///
106+ /// Where per-job working directories are created.
107+ ///
108+ /// Examples:
109+ /// --work-dir /tmp
110+ /// --work-dir /mnt/fast-ssd/hypha
111+ #[ arg( long( "work-dir" ) , verbatim_doc_comment) ]
112+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
113+ work_dir : Option < PathBuf > ,
114+
115+ /// CIDR ranges to exclude from DHT (repeatable, overrides config)
116+ ///
117+ /// Filters out peer addresses matching these ranges before adding to the DHT.
118+ ///
119+ /// Examples: 10.0.0.0/8, fc00::/7
120+ #[ arg( long( "exclude-cidr" ) , verbatim_doc_comment) ]
121+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
122+ exclude_cidr : Option < Vec < IpNet > > ,
53123 } ,
54124
55125 #[ command(
0 commit comments