Skip to main content

AgentCommand

Enum AgentCommand 

Source
pub enum AgentCommand {
    Plan {
        tag: Vec<String>,
        json: bool,
        output: Option<String>,
        vault: String,
    },
    Exec {
        only: Vec<String>,
        vault: String,
        command: Vec<String>,
    },
    Grant {
        name: String,
        only: Vec<String>,
        ttl: String,
        out: Option<String>,
        vault: String,
    },
    Init {
        name: String,
        only: Vec<String>,
        allow_tag: Vec<String>,
        ttl: String,
        out: Option<String>,
        vault: String,
    },
    Ls {
        json: bool,
        vault: String,
    },
    Revoke {
        name: String,
        rotate: bool,
        vault: String,
    },
    Connect {
        client: Option<String>,
        only: Vec<String>,
        allow_tag: Vec<String>,
        allow_exec: bool,
        ttl: String,
        name: String,
        vault: String,
    },
    Disconnect {
        client: Option<String>,
        rotate: bool,
        name: String,
        vault: String,
    },
}

Variants§

§

Plan

Emit schema-only context safe to paste into an AI agent prompt

Fields

§tag: Vec<String>

Filter by tag (repeatable)

§json: bool

Output as JSON

§output: Option<String>

Output file (prints to stdout if omitted)

§vault: String

Vault filename

§

Exec

Run a command with strict agent-safe defaults (clears the inherited environment, strips MURK_KEY, requires –only)

Fields

§only: Vec<String>

Inject these specific keys (required — agent mode fails closed)

§vault: String

Vault filename

§command: Vec<String>

Command and arguments to execute

§

Grant

Mint a short-lived ephemeral key that can read only the named secrets

Fields

§name: String

Grant name (used to revoke it later)

§only: Vec<String>

Keys this grant can read (required — fails closed)

§ttl: String

Time to live, e.g. 30m, 2h, 7d (advisory — see agent revoke)

§out: Option<String>

Where to write the agent key: a path, or - for stdout

§vault: String

Vault filename

§

Init

One-shot onboarding: optionally set the agent allow-list, mint a scoped grant, and print how to run the agent safely

Fields

§name: String

Grant name (used to revoke it later)

§only: Vec<String>

Keys the agent can read (required — fails closed)

§allow_tag: Vec<String>

Set the agent allow-list to these tags before granting (repeatable)

§ttl: String

Time to live, e.g. 30m, 2h, 7d (advisory — see agent revoke)

§out: Option<String>

Where to write the agent key: a path, or - for stdout

§vault: String

Vault filename

§

Ls

List active agent grants and their TTLs

Fields

§json: bool

Output as JSON

§vault: String

Vault filename

§

Revoke

Revoke an agent grant and rotate the keys it could read

Fields

§name: String

Grant name

§rotate: bool

Rotate the keys it could read in the same session

§vault: String

Vault filename

§

Connect

Wire murk mcp into an AI editor’s MCP config, minting a scoped grant. No CLIENT auto-detects installed editors; give one (claude, cursor, vscode, zed, gemini, omp, codex) to target it.

Fields

§client: Option<String>

Editor to configure; omit to auto-detect (claude, cursor, vscode, zed, gemini, omp, codex)

§only: Vec<String>

Keys the agent may read (required — fails closed)

§allow_tag: Vec<String>

Set the agent allow-list to these tags before granting (repeatable)

§allow_exec: bool

Also expose murk agent exec to the agent (adds –allow-exec)

§ttl: String

Grant time to live, e.g. 30m, 2h, 7d (advisory — see agent revoke)

§name: String

Grant name (used to disconnect/revoke it later)

§vault: String

Vault filename

§

Disconnect

Remove murk’s entry from an AI editor’s MCP config. No CLIENT clears every configured editor; --rotate also revokes the grant and rotates its keys.

Fields

§client: Option<String>

Editor to disconnect; omit for every configured editor

§rotate: bool

Revoke the grant and rotate the keys it could read

§name: String

Grant name to revoke with –rotate

§vault: String

Vault filename

Trait Implementations§

Source§

impl FromArgMatches for AgentCommand

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for AgentCommand

Source§

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

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

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

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

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, 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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V