pub struct Args {Show 38 fields
pub provider: Option<String>,
pub model: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub system_prompt: Option<String>,
pub append_system_prompt: Vec<String>,
pub thinking: Option<ThinkingLevel>,
pub print: bool,
pub mode: Mode,
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 extensions_dir: Vec<PathBuf>,
pub extension: Vec<PathBuf>,
pub skill: Vec<PathBuf>,
pub prompt_template: Vec<PathBuf>,
pub verbose: bool,
pub help: bool,
pub version: bool,
pub debug_system_prompt: bool,
pub messages: Vec<String>,
pub file_args: Vec<PathBuf>,
pub ignored: Vec<String>,
pub errors: Vec<String>,
}Expand description
The parsed argument set. Mirrors TS Args. Fields absent in v1
(unknownFlags, extension/resource discovery) are omitted; everything here
is either honored or explicitly ignored-with-warning.
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.
system_prompt: Option<String>§append_system_prompt: Vec<String>§thinking: Option<ThinkingLevel>§print: bool§mode: Mode§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+M
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 cdylib plugin discovery + loading entirely.
Honored by session.rs (Part B2): when set, no extension directory is
scanned and no plugin tools/handlers are registered.
extensions_dir: Vec<PathBuf>--extensions-dir/-ed: an extra directory to scan for cdylib plugins
(.dll/.so/.dylib), in addition to the project .pi/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).
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.
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.