Skip to main content

EnvCommand

Enum EnvCommand 

Source
pub enum EnvCommand {
    Status,
    Banner {
        mode: Option<String>,
        width: Option<usize>,
    },
    Export {
        shell: String,
        banner: bool,
        mode: Option<String>,
        bridge: bool,
    },
    Enter {
        shell: String,
        mode: Option<String>,
        no_banner: bool,
        no_bridge: bool,
        no_runtime: bool,
        wait: u64,
    },
    Explain {
        field: Option<String>,
    },
    Preflight {
        compact: bool,
        full: bool,
    },
}
Expand description

The subcommands of majordomus env.

Variants§

§

Status

The whole snapshot, resolved in full: what the layer holds is counted, and the cache the banner reads is written

§

Banner

Render the snapshot for a terminal. Goes to standard error, never standard output, because direnv reads standard output as the environment it is setting

Fields

§mode: Option<String>

How much to show: auto, full, compact or off. Without it, MAJORDOMUS_BANNER decides, and without that, auto — which is silent when nothing is watching, shows the whole box when the repository has something new to say, and the two-line form when it does not

§width: Option<usize>

Draw as if the terminal were this wide, whatever it is

§

Export

The variable assignments a shell in this repository benefits from, for eval. Assignments only: no command, no side effect

Fields

§shell: String

The shell to write for: direnv, bash, zsh, sh, ksh or fish

§banner: bool

Also draw the banner, to standard error, from the same snapshot. What an adapter asks for: one process on the path a shell takes on every entry, rather than two that each pay for a git status

§mode: Option<String>

With –banner, how much to show; MAJORDOMUS_BANNER decides without it

§bridge: bool

Also refresh the workflow bridge under .ai/local/cache/ when a declaration behind it has changed. A few stat calls when nothing has; never a build, never a network call

§

Enter

Enter the repository: the assignments a shell here benefits from on standard output, the banner on standard error, the workflow bridge refreshed when a declaration behind it moved, and the runtime ensured — the whole of what entering this repository is, as one call, so that no person and no agent has to remember a sequence. Never builds, never reaches a remote network, and never waits for a server it started to answer

Fields

§shell: String

The shell to write for: direnv, bash, zsh, sh, ksh or fish

§mode: Option<String>

How much banner to draw; MAJORDOMUS_BANNER decides without it

§no_banner: bool

Do not draw the banner

§no_bridge: bool

Do not refresh the workflow bridge

§no_runtime: bool

Do not ensure the runtime: export, draw and refresh only. What MAJORDOMUS_RUNTIME=off says, as an argument

§wait: u64

Wait this many seconds for a server this call started to answer. Zero — the default, and what a shell prompt asks for — returns as soon as one has been started, and the entry file’s watch over the lease brings the address in when it is published

§

Explain

Where each value came from: the file, command or constant that decided it, the resolver that read it, and how far it can be trusted

Fields

§field: Option<String>

One field in dotted form (vcs.branch, layer.objects), or a prefix; every field when absent

§

Preflight

Whether Majordomus is in force in this checkout, claim by claim, with the evidence behind each verdict: git, the episode and its briefing, the task and handover, the policy, rules and ADRs, the shared server and the surfaces it serves, the peer board, recorded test runs, rule enforcement, provider projections and the deployment. A verdict that asserts something is in force always names its evidence. Resolves fast, from the rule tally a --full run cached; the HTTP route /api/v1/environment/preflight and the MCP tool majordomus_preflight answer the same value

Fields

§compact: bool

The short form entering the repository draws: one line of claims and the most urgent thing to look at

§full: bool

Build the index and count the rule proofs now, and leave the tally for entry to read

Trait Implementations§

Source§

impl Debug for EnvCommand

Source§

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

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

impl FromArgMatches for EnvCommand

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 EnvCommand

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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