pub struct WithArgs {Show 22 fields
pub global: bool,
pub undo: bool,
pub non_interactive: bool,
pub interactive: bool,
pub extend_global_config: bool,
pub isolated_config: bool,
pub reset_to_default_configuration: bool,
pub yes: bool,
pub managed: bool,
pub server: Option<String>,
pub management_server: Option<String>,
pub local: bool,
pub token: Option<String>,
pub token_stdin: bool,
pub model: Option<String>,
pub pick_model: bool,
pub label: Option<String>,
pub run_ttl_hours: i64,
pub fixed_run_ttl: bool,
pub run_max_requests: Option<u64>,
pub client: ClientKind,
pub client_args: Vec<OsString>,
}Expand description
Options shared by router with and the standalone with-router binary.
Fields§
§global: boolPermanently configure the client instead of launching it temporarily.
undo: boolRestore the exact configuration saved by a previous --global call.
non_interactive: boolForce the client’s non-interactive/one-shot mode.
By default a bare positional is read as a prompt and starts a one-shot
run, a flag is read as an option passed to a session, and streams that
are not a terminal are one-shot. Reading any forwarded argument as a
task turned --resume, --continue and --verbose into batch runs
(issue #297).
interactive: boolForce the client’s interactive mode.
extend_global_config: boolExtend the client’s normal user configuration for this launch.
Claude uses a dedicated persistent Router-owned profile by default. This explicitly restores the older process-overlay behavior, without writing the user’s Claude files. Other extensible clients already use their normal configuration and accept this for compatibility (#536).
isolated_config: boolGive the client a configuration directory of its own.
Claude uses a persistent profile owned by Router by default, so onboarding happens once and Router sessions remain resumable without inheriting the user’s theme, permissions, MCP servers, credentials, or model cache. Other clients retain their existing profile behavior.
--extend-global-config explicitly layers Claude routing onto the real
profile instead. Nothing the user owns is written or modified.
Isolation remains right for CI and clean-room reproductions, where passing a flag is normal and cheap.
It is a no-op for codex, gemini, opencode and agent: those are
routed through a file the router writes, so they never use the user’s
own directory with or without it. The run says so rather than accepting
the flag silently (issue #312). What they get instead is a profile of
their own that persists between runs, so sessions stay resumable
(issue #298); --isolated-config makes that profile disposable.
reset_to_default_configuration: boolReplace only the persistent Router-owned Claude profile before launch.
yes: boolConfirm a requested profile reset without an interactive prompt.
managed: boolStart a disposable managed container even if a router is already listening locally.
The default reuses a running local router (issue #250); CI and clean-room reproductions want a fresh instance on purpose.
server: Option<String>Router origin. No local server is started when this is supplied.
management_server: Option<String>Private management origin when it differs from --server.
local: boolUse the router running on this machine, not the selected one.
with had --server and --managed but not --local, so it carried
half the target vocabulary every other family has (issue #314).
token: Option<String>Router token. Prefer the environment or --token-stdin to shell history.
token_stdin: boolRead the router token as one line from standard input.
model: Option<String>Model the client is launched with.
Without this the client keeps the model its own configuration selects,
and with changes only how that model is reached — the same rule
--global follows. A router that picked one by catalog order replaced
the user’s choice silently, and the client’s status line then presented
the substitution as though the user had made it (issue #295).
A client whose configuration embeds the router’s catalog — opencode,
qwen, agent — is always given an id, because it cannot start
without one.
pick_model: boolLet the router choose a model from the target’s live catalog.
It reports what it picked and why. Without this no model is named and the client’s own configuration decides.
label: Option<String>Label recorded on the router for this run’s token.
Each run mints a token on the target and the label is stored there. It defaults to the client name and a short suffix; it used to be the name of the directory the run was launched from, so a deployment accumulated a list of the projects its users work in (issue #316). Anything sent to a router someone else operates should be something you chose to send.
run_ttl_hours: i64Lifetime of an automatically minted per-run token, in hours.
--ttl-hours is accepted too, so the name matches tokens issue,
tokens rotate and configure (issue #314).
Defaults to a day because this token is revoked when the client exits:
the run already bounds its life, and the clock was a second bound that
could only fire early. At one hour it routinely did — an interactive
session that outlived the hour died mid-work with 401 Token has expired, and the client answered with its own /login advice about
an unrelated credential (issue #341).
fixed_run_ttl: boolKeep a fixed expiry instead of extending it while the run is in use.
By default the per-run token’s expiry slides: every request served
with it pushes the expiry to now + --run-ttl-hours, so a session
that is still being used never hits the wall, and one abandoned for
longer than the window still expires. That is what the bound is for –
the run’s own life already bounds the token, since it is revoked when
the client exits, and a fixed clock could only ever fire early
(issue #354).
Pass this to keep the old behaviour: the expiry set at issue time is final, whatever the session is doing.
run_max_requests: Option<u64>Optional request budget for an automatically minted per-run token.
client: ClientKindClient integration to launch or configure.
client_args: Vec<OsString>Arguments forwarded to the client. Use -- to make the boundary explicit.
Implementations§
Source§impl WithArgs
impl WithArgs
Sourcepub fn as_configure(&self) -> ConfigureArgs
pub fn as_configure(&self) -> ConfigureArgs
The permanent-setup request --global / --undo really is.
with --global predates configure and stays as an accepted spelling,
so it maps onto the same arguments rather than keeping a second
implementation that can disagree with it (issue #296).
Trait Implementations§
Source§impl Args for WithArgs
impl Args for WithArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for WithArgs
impl FromArgMatches for WithArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for WithArgs
impl RefUnwindSafe for WithArgs
impl Send for WithArgs
impl Sync for WithArgs
impl Unpin for WithArgs
impl UnsafeUnpin for WithArgs
impl UnwindSafe for WithArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more