pub(crate) enum Cmd {
Init {
name: String,
},
Validate,
Authorize {
request: String,
entities: Option<String>,
skip_audit: bool,
},
Sim {
request: String,
entities: Option<String>,
},
Delegate {
from: String,
to: String,
actions: Vec<String>,
resources: Vec<String>,
ttl: i64,
key_id: Option<String>,
key_file: Option<String>,
out: Option<String>,
},
Verify {
token: String,
keys: String,
},
ApiKey {
action: ApiKeyCmd,
},
Schema,
Log {
action: LogCmd,
},
Audit {
action: AuditCmd,
},
Gen {
description: String,
name: Option<String>,
provider: String,
model: String,
dry_run: bool,
confirm: bool,
},
Doctor,
}Variants§
Init
Initialize a new agentguard store in the current directory.
Validate
Validate policies against the schema.
Authorize
Run a single authorization check from a request file or stdin.
Fields
Sim
Simulate: same as authorize, but always reads from a file and pretty-prints.
Delegate
Mint a delegation token.
Fields
Verify
Verify and inspect a delegation token.
Fields
ApiKey
Manage standalone PDP API keys.
Schema
Inspect the schema.
Log
Tail/query the audit log.
Audit
Audit log operations (verify, export, SAR, erase, notarize).
Gen
Generate Cedar policy from a natural language description (requires OPENAI_API_KEY or ANTHROPIC_API_KEY env).
Fields
Doctor
Diagnose a deployment: schema, policies, audit log, chain, authorizer.
Trait Implementations§
Source§impl FromArgMatches for Cmd
impl FromArgMatches for Cmd
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>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for Cmd
impl Subcommand for Cmd
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Cmd
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnwindSafe for Cmd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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