pub struct Args {Show 59 fields
pub provider: Option<String>,
pub model: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub timeout: Option<Duration>,
pub stream_idle_timeout: Option<Duration>,
pub resource_config: Option<PathBuf>,
pub resource_transition: Option<PathBuf>,
pub system_prompt: Option<String>,
pub append_system_prompt: Vec<String>,
pub theme: Option<String>,
pub thinking: Option<ThinkingLevel>,
pub print: bool,
pub mini: bool,
pub host: Option<String>,
pub mode: Mode,
pub rpc_message_updates: RpcMessageUpdates,
pub tui_mode: TuiMode,
pub list_models: Option<String>,
pub offline: bool,
pub export: Option<PathBuf>,
pub trust_override: Option<bool>,
pub continue_session: bool,
pub resume: bool,
pub session: Option<String>,
pub session_id: Option<String>,
pub fork: Option<String>,
pub fork_entry: Option<String>,
pub fork_position: Option<ForkPosition>,
pub models: Option<Vec<String>>,
pub session_dir: Option<PathBuf>,
pub no_session: bool,
pub name: Option<String>,
pub tools: Option<Vec<String>>,
pub exclude_tools: Option<Vec<String>>,
pub no_tools: bool,
pub no_builtin_tools: bool,
pub native_durable: bool,
pub experimental_durable_epoch: Option<String>,
pub no_skills: bool,
pub no_prompt_templates: bool,
pub no_context_files: bool,
pub no_extensions: bool,
pub no_themes: bool,
pub extensions_dir: Vec<PathBuf>,
pub extension: Vec<PathBuf>,
pub skill: Vec<PathBuf>,
pub prompt_template: Vec<PathBuf>,
pub dev_local_only: bool,
pub project_only: bool,
pub verbose: bool,
pub help: bool,
pub version: bool,
pub debug_system_prompt: bool,
pub messages: Vec<String>,
pub file_args: Vec<PathBuf>,
pub unknown_flags: BTreeMap<String, Value>,
pub ignored: Vec<String>,
pub errors: Vec<String>,
}Expand description
The parsed argument set. Mirrors TS Args. Unknown long flags are retained
for extension consumption; unknown short flags remain hard errors.
Fields§
§provider: Option<String>§model: Option<String>§api_key: Option<String>§base_url: Option<String>--base-url — overrides ANTHROPIC_BASE_URL + each model’s base URL,
for third-party Anthropic-compatible gateways/proxies.
timeout: Option<Duration>--timeout <seconds> overrides the deadline for each LLM API request.
stream_idle_timeout: Option<Duration>Maximum silence between streamed response bytes; zero disables it.
resource_config: Option<PathBuf>§resource_transition: Option<PathBuf>§system_prompt: Option<String>§append_system_prompt: Vec<String>§theme: Option<String>--theme — built-in theme name or a theme file path.
thinking: Option<ThinkingLevel>§print: bool§mini: boolSelect an ephemeral session and turn off native durable execution.
host: Option<String>The empty string selects the configured default area.
mode: Mode§rpc_message_updates: RpcMessageUpdates§tui_mode: TuiMode--tui-mode regular|fullscreen controls the interactive terminal
buffer. macOS defaults to regular so native selection and terminal
scrollback remain available together; other platforms use fullscreen.
list_models: Option<String>--list-models [search]: list the merged model catalog and exit.
Some("") represents the bare flag; None means absent.
offline: bool--offline: disable best-effort startup network checks.
export: Option<PathBuf>--export <session-file>: export a JSONL session to HTML (or copy it
when the destination ends in .jsonl).
trust_override: Option<bool>Explicit project trust override. --approve trusts the current
project; --no-approve keeps project-local resources disabled.
continue_session: bool§resume: bool§session: Option<String>§session_id: Option<String>--session-id <id>: use the EXACT project session id, creating it if
missing (pi --session-id). Unlike --session (partial match), this
is an exact-id open-or-create.
fork: Option<String>--fork <path|id>: fork the given session into a new one and start in
the fork (pi --fork).
fork_entry: Option<String>--fork-entry <entryId>: cut the new branch at this message entry
instead of the lane leaf. The id must match exactly — unlike --fork’s
partial session id, no prefix or substring match is attempted.
Requires --fork.
fork_position: Option<ForkPosition>--fork-position at|before: whether --fork-entry includes (at) or
excludes (before) its message. None keeps the harness default for an
explicit entry, which is before (ForkOptions::Branch).
Requires --fork and --fork-entry; without an explicit entry the
harness applies the position to the implicit lane leaf and truncates it.
models: Option<Vec<String>>--models <patterns>: comma-separated model patterns for the Ctrl+P
cycle (globs/fuzzy in pi; v1 writes the matched ids to settings.json’s
scopedModels — the same set /scoped-models edits). Empty = all models.
session_dir: Option<PathBuf>§no_session: bool§name: Option<String>§tools: Option<Vec<String>>§exclude_tools: Option<Vec<String>>§no_tools: bool§no_builtin_tools: bool§native_durable: boolNative durable host selection. CLI parsing enables it by default; the
temporary --no-native-durable escape hatch selects legacy session behavior.
experimental_durable_epoch: Option<String>Explicit experimental v2 epoch; requires native durable admission.
no_skills: bool--no-skills/-ns: skip skill discovery + the <available_skills>
system-prompt listing.
no_prompt_templates: bool--no-prompt-templates/-np: skip prompt-template discovery (templates
are on-demand only; this suppresses populating the resource registry).
no_context_files: bool--no-context-files/-nc: skip context-file (AGENTS.md/CLAUDE.md)
discovery + the <project_context> system-prompt block.
no_extensions: bool--no-extensions/-ne: skip Rust cdylib extension loading.
Honored by session.rs: when set, no extension directory is scanned.
no_themes: bool--no-themes: disable custom theme discovery and loading.
Built-in presets remain available unless a custom --theme is given.
extensions_dir: Vec<PathBuf>--extensions-dir/-ed: an extra directory to scan for cdylib plugins
(.dll/.so/.dylib), in addition to project .rpi/extensions
and global
agent_dir()/extensions defaults. May be repeated; scanned after
the defaults (so a same-named tool in a default dir wins first, mirroring
pi’s registration order). RPI_EXTENSIONS_DIR (colon-separated on Unix,
semicolon on Windows) provides the same list via env.
extension: Vec<PathBuf>--extension/-e <path>: load an explicit extension cdylib file (may
be repeated). Loaded in addition to the discovered dirs.
skill: Vec<PathBuf>--skill <path>: load an explicit skill file or directory (repeated).
prompt_template: Vec<PathBuf>--prompt-template <path>: load an explicit prompt-template file or
directory (repeated).
dev_local_only: bool--local-only: load only explicitly supplied extension paths.
project_only: bool--package-only / --project-only: load project resources and
extensions from the active project’s settings, excluding global ones.
verbose: bool§help: bool§version: bool§debug_system_prompt: bool--debug-system-prompt: print the resolved system-prompt sections
(base, append, context, skills listing) + resource counts to stderr at
harness build time, then proceed normally. A verification affordance for
resource-discovery (Part A) — lets a smoke confirm <available_skills> +
<project_context> + appended text reached the prompt without a full
round-trip parse. Mirrors the plan’s “add –debug-system-prompt if absent”.
messages: Vec<String>Positional prompt text (one or more messages). Mirrors TS messages.
file_args: Vec<PathBuf>@file attachments (prefix stripped), as raw paths for the caller to
expand. Mirrors TS fileArgs.
unknown_flags: BTreeMap<String, Value>Extension-declared or otherwise unknown long flags. Values are either
JSON booleans (a bare flag) or strings (a flag with a value), matching
Pi’s unknownFlags contract so an extension can claim its own options.
ignored: Vec<String>Warnings about recognized-but-ignored flags (v1 scope cuts). Surfaced
to the user on startup when --verbose.
errors: Vec<String>Hard parse errors (unknown short flags, missing values). Non-empty ⇒
main prints them + help and exits non-zero.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Args
impl Freeze for Argswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<PathBuf>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnsafeUnpin for Argswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for Args
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
impl<T> MaybeSendSync for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().