pub struct Args {Show 49 fields
pub provider: Option<String>,
pub model: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub timeout: Option<Duration>,
pub system_prompt: Option<String>,
pub append_system_prompt: Vec<String>,
pub theme: Option<String>,
pub thinking: Option<ThinkingLevel>,
pub print: bool,
pub mode: Mode,
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 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 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.
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§mode: Mode§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).
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§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 Freeze for Args
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnsafeUnpin for Args
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,
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 moreSource§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().