Skip to main content

Cli

Struct Cli 

Source
pub struct Cli {
Show 18 fields pub workspace: Option<PathBuf>, pub log_file: Option<PathBuf>, pub log_level: LogLevel, pub no_color: bool, pub theme: ThemePreference, pub registry: String, pub policies: String, pub index_path: String, pub _home_expanded: bool, pub report: Option<Vec<ReportTypeCli>>, pub format: OutputFormatCli, pub workspace_filter: Option<String>, pub rebuild_index: bool, pub quiet: bool, pub validate_config: bool, pub export_audit: Option<Vec<String>>, pub web: bool, pub web_bind: String,
}
Expand description

Platform operator console for agentic asset governance.

§Exit codes

0  Success — no violations
1  Compliance failures (violations, content drift, stale threshold, gate failures)
2  Operational error (invalid config, missing registry, bad flags)
3  Partial catalog failure (catalog dir exists but files corrupted)

Fields§

§workspace: Option<PathBuf>

Path to the workspace root (auto-detected if omitted).

§log_file: Option<PathBuf>

Path to the log file for audit output.

§log_level: LogLevel

Logging verbosity level.

§no_color: bool

Disable colored output (also honoured via NO_COLOR env var).

§theme: ThemePreference

Color theme mode: auto (detect terminal background), dark, or light.

§registry: String

Path to the workspace registry TOML file. Bug #3: Tilde (~) expanded after clap processing via expand_home_paths().

§policies: String

Path to the policy rules TOML file. Bug #3: Tilde (~) expanded after clap processing via expand_home_paths().

§index_path: String

Path to the SQLite index file. Bug #3: Tilde (~) expanded after clap processing via expand_home_paths().

§_home_expanded: bool

Internal marker: whether home expansion has been applied to default paths.

§report: Option<Vec<ReportTypeCli>>

Produce a headless report instead of launching the TUI.

Supported types: coverage, violations, drift, stale, gates, integrity, versions, dependencies, lifecycle, summary, all.

§format: OutputFormatCli

Output format for headless mode.

Supported formats: json (default), markdown, table.

§workspace_filter: Option<String>

Restrict headless operations to workspaces matching this glob pattern.

§rebuild_index: bool

Force a complete index rebuild from a fresh filesystem scan.

§quiet: bool

Suppress progress output; emit only the final structured report.

§validate_config: bool

Parse all configuration files, report errors, and exit without running.

§export_audit: Option<Vec<String>>

Export the audit log. Format: <format> <output-path> (e.g. json /tmp/audit.json).

§web: bool

Start the embedded web server (stretch goal, Req 33).

§web_bind: String

Web server bind address (only used when –web is active).

Implementations§

Source§

impl Cli

Source

pub fn expand_home_paths(&mut self)

Expand home directory (~) in default paths. This should be called after parsing to resolve ~ to the user’s home.

Source

pub fn is_no_color(&self) -> bool

Returns true when color output should be disabled.

Color is disabled when either --no-color was passed or the NO_COLOR environment variable is set to any value (per no-color.org, Req 29.1 / 29.3). This only affects formatting; it never alters report data (Req 27.4).

Source

pub fn report_types(&self) -> Vec<ReportType>

Convert the CLI --report list into models::ReportType values.

Source

pub fn output_format(&self) -> OutputFormat

Convert the CLI --format into models::OutputFormat.

Trait Implementations§

Source§

impl Args for Cli

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for Cli

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Cli

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Cli

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Cli

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnsafeUnpin for Cli

§

impl UnwindSafe for Cli

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more