pub struct Cli {Show 18 fields
pub prompt: Option<String>,
pub cwd: Option<PathBuf>,
pub harness: Option<Harness>,
pub api_schema: Option<String>,
pub model: Option<String>,
pub settings: Option<String>,
pub no_session_persistence: bool,
pub continue_session: bool,
pub resume: Option<String>,
pub max_turns: Option<u32>,
pub output_format: OutputFormat,
pub restricted: bool,
pub dangerously_skip_permissions: bool,
pub strip_identity: bool,
pub stream: bool,
pub no_project_instructions: bool,
pub add_dir: Vec<PathBuf>,
pub effort: Option<EffortArg>,
}Expand description
Minimal headless runner for the locode engine: one JSON report on stdout (ADR-0009), diagnostics on stderr, exit code from the run’s status.
Fields§
§prompt: Option<String>The task prompt. - or omitted reads the prompt from stdin.
cwd: Option<PathBuf>Workspace root / working directory (the path-jail root). Defaults to the current directory.
harness: Option<Harness>Harness pack selecting the toolset + system prompt. Omitted ⇒ the
settings harness default (ADR-0024 §1.4), else claude.
api_schema: Option<String>Provider wire schema: anthropic, openai-responses, or mock
(keyless CI) — plus any custom providers the binary registered
(ADR-0015). Unknown names fail pre-run listing the available set.
Omitted ⇒ the settings api_schema default (ADR-0024 §1.4 — the
project layers may not set it), else anthropic.
model: Option<String>Model id override. Omitted ⇒ the settings model default, else the
wire’s built-in default (ADR-0024 §1.4 — same precedence chain as every
other knob; there is deliberately no model env var).
settings: Option<String>Extra settings layer: a path to a JSON file, or inline JSON (highest- precedence settings layer, ADR-0024 §1.2).
no_session_persistence: boolDo not write (or append to) a session trace for this run — nothing lands
under ~/.locode/sessions (ADR-0024 §2; Claude Code’s
--no-session-persistence). --continue/--resume still read.
continue_session: boolContinue the newest session started in this cwd (ADR-0024 §2.5): the recovered transcript seeds the run and the same rollout keeps appending.
resume: Option<String>Resume the session with this id — found in this cwd’s sessions first, then anywhere (ADR-0024 §2.5).
max_turns: Option<u32>Hard ceiling on sample→dispatch turns. Unlimited when omitted (ADR-0005 amendment — no studied harness caps turns by default).
output_format: OutputFormatstdout contract: json = one Report; stream-json = Event JSONL;
text = the final message.
restricted: boolRestrict file access to the working directory and ask before each tool call. Incomplete — there is no way to record an answer yet, so every call asks again. Off by default.
dangerously_skip_permissions: boolAccepted for compatibility and does nothing — this is the default now.
Use --restricted to turn the restrictions on.
strip_identity: boolStrip harness identity sentences from the rendered system prompt (A/B contamination control; default = faithful reproduction).
stream: boolStream the model turn (SSE) instead of one buffered call (ADR-0021).
Needed for unbounded output — Anthropic rejects non-streaming
requests that may exceed ~10 min. The stream-json trace stays
whole-message: token deltas are assembled but not written to it.
no_project_instructions: boolSkip project-instruction loading (AGENTS.md) — the --bare-style disable
(ADR-0023). Auto-discovery is otherwise on by default.
add_dir: Vec<PathBuf>Add a directory the agent may read and write, beyond the working
directory. Repeatable. Its AGENTS.md and .agents/skills are picked up
too — the point of pointing at a subtree of a large monorepo.
effort: Option<EffortArg>How hard the model should think. Omitted uses the effort setting, then
the API’s own default.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
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 CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
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.