Skip to main content

IdentityCommand

Enum IdentityCommand 

Source
pub enum IdentityCommand {
    Show {
        json: bool,
    },
    List {
        json: bool,
    },
    Publish {
        nick: String,
        relay: Option<String>,
        public_url: Option<String>,
        hidden: bool,
        json: bool,
    },
    Destroy {
        name: String,
        force: bool,
        json: bool,
    },
    Create {
        name: Option<String>,
        anonymous: bool,
        local: bool,
        json: bool,
    },
    Persist {
        name: String,
        as_name: Option<String>,
        json: bool,
    },
    Demote {
        name: String,
        json: bool,
    },
}

Variants§

§

Show

Print the current character (DID-derived, the only name). Equivalent to wire whoami --short but scoped here for grouping.

Fields

§json: bool
§

List

List all identities on this machine — one row per session, with each session’s character, DID, federation handle, and cwd. Same shape as wire session list, scoped here for the v0.7+ noun- CLI surface.

Fields

§json: bool
§

Publish

Promote this identity to FEDERATION lifecycle: claim your persona on the relay so peers can wire dial <persona>@<relay-domain> you. Re-claims with current display fields so the relay always serves the latest signed card. Equivalent to wire claim.

v0.13.1: hidden — wire up publishes your persona for you, and the nick is vestigial (one-name rule). Kept callable for re-publish.

Fields

§nick: String

Vestigial: ignored; your handle is your DID-derived persona.

§relay: Option<String>

Override the relay URL. Defaults to the session’s bound relay from wire init --relay <url>. Public relay if unset.

§public_url: Option<String>

Public-facing URL for the agent-card location (when the relay is behind a CDN with a different public domain).

§hidden: bool

Skip listing in the relay’s public phonebook. The card is still claimable + reachable; just doesn’t appear in wireup.net/phonebook for stranger-discovery.

§json: bool
§

Destroy

Destroy a session entirely — keys, agent-card, relay state, daemon. Equivalent to wire session destroy <name>, scoped here for the noun-CLI surface. Requires --force (the underlying command does).

Fields

§name: String

Session name to destroy (use wire identity list to see).

§force: bool

Bypass the confirmation prompt.

§json: bool
§

Create

Create an identity in an EXPLICIT lifecycle state (vs. the implicit wire init + wire claim flow). v0.7.0-alpha.20 closes the v0.7+ identity-first noun-CLI.

--anonymous puts the identity in a tmpdir (auto-cleanup on next reboot). In-memory semantics not yet supported — the pragmatic shape is “tmpdir + sentinel + register-for-cleanup.” For pure-RAM identities, see v1.0 vision.

--local is the explicit form of today’s default; identity persists to the machine-wide sessions root.

Fields

§name: Option<String>

Session name. Defaults to derived from cwd (anonymous mode uses a random name).

§anonymous: bool

Create an ANONYMOUS identity (tmpdir-backed, dies on reboot, no federation). Mutually exclusive with –local.

§local: bool

Create a LOCAL identity (machine-persistent, no federation). Default — explicit flag for clarity.

§json: bool
§

Persist

Promote an ANONYMOUS identity to LOCAL — move from tmpdir to the machine-wide sessions root + register in the cwd map. After persist, the identity survives reboot. v0.7.0-alpha.20.

Fields

§name: String

The anonymous identity’s name (from wire identity list).

§as_name: Option<String>

Optional rename during persist. Default: keep the anon name.

§json: bool
§

Demote

Demote an identity ONE level in the lifecycle: federation → local: removes the relay slot binding but keeps the keypair + agent-card. Operator can later re-publish with wire identity publish. v0.7.0-alpha.20.

(local → anonymous is not exposed; the safer flow is destroy + recreate, since “demoting” a persistent identity to ephemeral has surprising semantics — what about the keypair? what about pinned peers? Better to be explicit with destroy.)

Fields

§name: String

Session name to demote.

§json: bool

Trait Implementations§

Source§

impl Debug for IdentityCommand

Source§

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

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

impl FromArgMatches for IdentityCommand

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 IdentityCommand

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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