pub struct Cli {Show 34 fields
pub base: PathBuf,
pub name: Option<String>,
pub hidden: bool,
pub follow: bool,
pub no_ignore: bool,
pub validate: bool,
pub list: bool,
pub show: Option<PathBuf>,
pub links: bool,
pub new: Option<PathBuf>,
pub init: bool,
pub index: bool,
pub log: Option<String>,
pub set: Option<String>,
pub script: Option<PathBuf>,
pub dry_run: bool,
pub fence: Option<String>,
pub type_: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub tag: Vec<String>,
pub log_kind: Option<String>,
pub file: Option<PathBuf>,
pub strict: bool,
pub question: Option<String>,
pub expect: Option<String>,
pub emit: Option<String>,
pub emit_stderr: Option<String>,
pub quiet: bool,
pub json: bool,
pub json_pretty: bool,
pub timeout: Option<f64>,
pub heartbeat: HeartbeatOpts,
pub explain: Option<Format>,
}Fields§
§base: PathBufBundle root (or single concept root) to operate on.
name: Option<String>Limit selection to files whose name matches; ‘|’-separated alternatives, each substring->glob->regex promoted and anchored.
Include dot-entries (names starting with ‘.’); default skips them.
follow: boolFollow symlinks while traversing.
no_ignore: boolWalk gitignored / .ignore files too (the .git directory is always skipped); by default the walk skips what git would.
validate: boolCheck the bundle for OKF conformance and report a verdict (the default verb when no other is given).
list: boolList the bundle’s concepts with their metadata; filter with –type / –tag.
show: Option<PathBuf>Show one concept’s frontmatter (give the concept path).
links: boolReport the bundle’s cross-links; with –strict, fail on a broken bundle-relative link.
new: Option<PathBuf>Scaffold a new concept at PATH (requires –type); refuses to overwrite.
init: boolScaffold a bundle root index.md (declaring okf_version) if absent.
index: bool(Re)generate index.md for –base from the concepts’ frontmatter.
log: Option<String>Prepend a dated entry to the bundle’s log.md (use –log-kind to label it).
set: Option<String>Set or update a frontmatter field on the –file concept: FIELD=VALUE.
script: Option<PathBuf>Run a .ctb script of new/set/log/index/init items atomically: simulate the whole batch, write only if every op succeeds.
dry_run: boolWith –script: simulate and print the plan, but write nothing.
fence: Option<String>With –script: the directive prefix for script lines (default “#%”).
type_: Option<String>The concept type for –new; also filters –list to this type.
title: Option<String>With –new: the concept title.
description: Option<String>With –new: the concept description (one sentence).
tag: Vec<String>With –new: tags (comma-separated); also filters –list to concepts carrying all given tags.
log_kind: Option<String>With –log: the entry label (e.g. Update, Creation). Default: Update.
file: Option<PathBuf>With –set: the concept file to edit.
strict: boolWith –validate / –links: also treat broken bundle-relative links as failures.
question: Option<String>Question this check answers, framing it as a test; printed as a “== … ==” banner unless –quiet.
expect: Option<String>Verdict expectation over the violation count: any|none|N|=N|+N|-N. Default: none (every concept conforms / no broken links).
emit: Option<String>Template written to stdout after a check. Tokens: {RESULT} {QUESTION} {COUNT} {TOTAL} {BASE} {MATCHES} ({COUNT} is the violation count).
emit_stderr: Option<String>Template written to stderr after a check (same tokens as –emit).
quiet: boolSuppress informational output; report via exit status (and –emit, which still fires).
json: boolEmit a structured JSON result instead of text.
json_pretty: boolLike --json, but pretty-printed (indented).
timeout: Option<f64>Abort with exit 2 if the run exceeds SECS seconds (fractional allowed).
heartbeat: HeartbeatOpts§explain: Option<Format>Print agent usage docs (md or json) and exit.
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.