pub struct Args {Show 48 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 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 enable_pi_packages: 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 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.
system_prompt: Option<String>§append_system_prompt: Vec<String>§theme: Option<String>--theme — built-in theme name or a static package theme name/path.
thinking: Option<ThinkingLevel>§print: bool§mode: Mode§tui_mode: TuiMode--tui-mode regular|fullscreen controls the interactive terminal
buffer. The default remains fullscreen for compatibility with rpi.
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+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 Rust cdylib extension loading and act
as a final kill switch for Pi JS/TS packages when enabled.
Honored by session.rs (Part B2): when set, no extension directory is
scanned and no plugin tools/handlers are registered.
enable_pi_packages: bool--enable-pi-packages: opt into discovery and loading of configured
Pi JavaScript/TypeScript packages. This is intentionally opt-in because
loading a package may start a Node runtime and execute package code.
no_themes: bool--no-themes: disable package/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
(with legacy .pi/extensions compatibility) 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: boolInternal scope set by rpi dev-local / rpi dev --local-only.
Only the freshly staged development extension and resources it
discovers are loaded; normal project/global/package discovery is
skipped. This is intentionally not parsed by the regular CLI parser.
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.