Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 46 variants Status, Entity(Args), Relations(Args), Search(Args), List(Args), Context(Args), Overview(Args), Type(Args), Health(Args), Due(Args), Export(Args), Init(InitArgs), Quickstart(Args), Install(Args), Uninstall(Args), VerifyAnchors(Args), Link(LinkArgs), Publish(Args), Unpublish(Args), Domain { action: DomainAction, }, Admin { action: AdminAction, }, Login(Args), Logout(Args), Create(Args), Update(Args), Relate(Args), Delete(Args), Rename(Args), BatchUpdate(Args), BatchCreate(Args), BatchRelate(Args), Recover(Args), Anchors(Args), Changes(Args), Check(Args), ReviewMark(Args), Reload(Args), Fetch(FetchArgs), Pull(PullArgs), Push(PushArgs), BranchReset(BranchResetArgs), Mem { action: MemAction, }, MemRepo { action: MemRepoAction, }, Workspace { action: WorkspaceAction, }, Schema(Args), Projection(Args),
}

Variants§

§

Status

Node / edge counts, schema distribution, and per-binding projection state.

§

Entity(Args)

Read one entity as markdown.

§

Relations(Args)

List typed edges for an entity.

§

Search(Args)

Find entities by text or graph proximity.

§

List(Args)

Filter entities by metadata (no text match — use search for that).

§

Context(Args)

Read an entity’s community cluster.

§

Overview(Args)

All clusters with summaries and member lists. The full build renders the same rich content the MCP memstead_overview tool emits — both surfaces share the engine composer in memstead-engine.

§

Type(Args)

Describe one type, or list all types when no name given.

§

Health(Args)

Health summary (orphans, stubs, stale entities, missing fields).

§

Due(Args)

Render the due-brief: open entities whose schema-declared due date falls inside the window (default 90d), overdue first.

§

Export(Args)

Export the write mem as markdown (in place) or as a portable .mem archive.

§

Init(InitArgs)

Initialise a filesystem mem in the current (or named) folder. Strict: errors out when the target is not empty.

§

Quickstart(Args)

One-command cold start: workspace + default-schema mem + seed entity + MCP wiring for your agent(s), in the current (or named) folder. Tolerates dotfiles and README-grade files; derives the mem name from the folder. For the strict, script-safe variant use memstead init.

§

Install(Args)

Install a sealed .mem mem — either a local file, or <scope>/<name> from the memstead.io registry. Registers it as a workspace-level read-only mount; memstead uninstall is the symmetric removal. MEM-REPO WORKSPACES ONLY — refuses with UNSUPPORTED_WORKSPACE_SHAPE on the filesystem-mem workspace memstead quickstart produces; bootstrap with memstead mem-repo init instead when you intend to install mems.

§

Uninstall(Args)

Remove an installed read-mem’s workspace-level mount. The global cache copy survives by default; re-install re-registers it. MEM-REPO WORKSPACES ONLY (see install).

§

VerifyAnchors(Args)

Verify every anchor in a mem against its declared source — the standalone drift statement, no binding required. Read-only.

Link a filesystem mem to a registry-published dependency. memstead link <scope/name> fetches the archive into the workspace and records the dependency in the workspace config.

§

Publish(Args)

Publish a .mem archive to the registry. Triggers GitHub Device Flow on first use; subsequent runs are silent.

§

Unpublish(Args)

Unpublish (hard-delete) <scope>/<name> from the registry. Permitted to the original uploader and to admins. The same <scope>/<name> becomes immediately re-publishable.

§

Domain

Domain-authority publishing: generate the signing key for a domain you control and print the .well-known manifest to host. publish --scope <domain>:<handle> then signs with that key — no GitHub account needed.

Fields

§

Admin

Admin-only registry moderation: take a mem down or deny-list bytes. Gated server-side by the MEMSTEAD_ADMINS allowlist; every action is recorded in the registry’s append-only audit log.

Fields

§

Login(Args)

Authenticate with a registry via GitHub Device Flow. Optional — publish auto-triggers the same flow on first use.

§

Logout(Args)

Remove stored credentials for a registry.

§

Create(Args)

Create a new entity. Provide --title, --type, and the required section fields, or pass --from <file.json> with the full payload.

§

Update(Args)

Modify an existing entity. --expected-hash is required unless --auto-hash (refetch before write) or --force (skip check) is given.

§

Relate(Args)

Add or remove a typed relationship between two entities.

§

Delete(Args)

Delete an entity. Use --dry-run to preview impact first. Delete is hashless by design (no post-state to race on); race protection comes from HAS_INCOMING_REFS — and RESIDUAL_STUB_FOR_READONLY_REFERRERS for read-only-referrer cases.

§

Rename(Args)

Rename an entity (changes ID, file path, and every incoming wiki-link).

§

BatchUpdate(Args)

Update many entities in one atomic call. Input is a JSON file with a top-level updates: [...] array (one entry per entity, each with its own hash mode and mutation fields). All-or-nothing: if any entry fails (validation, hash mismatch, missing entity) the whole batch is refused and NOTHING is committed — fix the named entry and resubmit. On success the batch lands as one commit. Mirrors memstead update per entry. MEM-REPO WORKSPACES ONLY — refuses with UNSUPPORTED_WORKSPACE_SHAPE on the filesystem-mem workspace memstead quickstart produces; fall back to one memstead update per entity there.

§

BatchCreate(Args)

Create many entities in one atomic call. Input is a JSON file with a top-level creates: [...] array — each entry the same shape as create --from, with its own provenance note. Intra-batch references resolve as real targets (cycles included where the schema permits), so a mutually-referencing set lands in a single pass with no stubs. All-or-nothing: any invalid entry refuses the whole batch and names EVERY failing entry. One commit per touched mem. MEM-REPO WORKSPACES ONLY — refuses with UNSUPPORTED_WORKSPACE_SHAPE on the filesystem-mem workspace memstead quickstart produces; fall back to one memstead create per entity there (losing atomicity and intra-batch reference resolution).

§

BatchRelate(Args)

Apply many edge changes in one atomic call. Input is a JSON file with a top-level relates: [...] array mixing additions and removals, applied in order — each entry mirrors relate (from / type / to, optional remove, description, per-entry note). All-or-nothing: any invalid entry refuses the whole batch and names EVERY failing entry. One commit per touched mem. MEM-REPO WORKSPACES ONLY — refuses with UNSUPPORTED_WORKSPACE_SHAPE on the filesystem-mem workspace memstead quickstart produces; fall back to one memstead relate per edge there.

§

Recover(Args)

Apply parse-time-drift recovery across writable mems. Walks PARSED_RELATION_INVALID warnings, re-renders affected source entities to drop the stale rows, and reports per-entry outcomes. Read-only-origin drops surface as skipped. MEM-REPO WORKSPACES ONLY (see install).

§

Anchors(Args)

Read provenance anchors (E3a): memstead anchors <id> lists an entity’s anchors + composition; memstead anchors --artifact <path> reverse-looks-up every entity whose anchor references that path (the query the check-realization hook consumes).

§

Changes(Args)

Diff a mem’s HEAD against a commit SHA. Pass --since = a prior commit_sha from a mutation, or the canonical empty-tree hash 4b825dc642cb6eb9a060e54bf8d69288fbee4904 for a first sync.

§

Check(Args)

Record a check: “entity E checked, verdict ok | failed, via method M” — an engine-recorded act carrying the session’s --role, never a mutation (entity markdown, hash, and mem commits untouched). Derived check state serves via memstead entity <id> --provenance.

§

ReviewMark(Args)

Read and move the per-mem review mark — the engine’s one pointer per mem to the last human-approved state. list shows every mem’s mark and head; set/clear move it (explicit target only); diff reports the unreviewed delta. Marks never gate writes.

§

Reload(Args)

Reload one writable mem’s slice of the in-memory store from its on-disk branch tip — or every writable mem when --mem is omitted. CLI parity with the MCP memstead_reload tool.

§

Fetch(FetchArgs)

Fetch a mem’s branch refs from a git remote into the mem-repo (no local branch moves — inspect first, then pull). Requires a git-branch-backed mem (INVALID_INPUT on folder mounts); refuses UNKNOWN_REMOTE when the remote is not configured.

§

Pull(PullArgs)

Fast-forward a mem’s branch to its fetched remote counterpart and reload the in-memory store. Refuses LOCAL_DIVERGENCE when the local branch is not an ancestor of the remote — reconcile via branch-reset, or resolve on another clone and push.

§

Push(PushArgs)

Push a mem’s branch to a git remote. --force uses force-with-lease semantics; without it, non-fast-forward pushes refuse (NON_FAST_FORWARD). Refuses UNKNOWN_REMOTE when the remote is not configured.

§

BranchReset(BranchResetArgs)

Reset a mem’s branch pointer to a target ref/SHA. Refuses to discard commits reachable from any remote ref (PUSHED_COMMITS_PROTECTED).

§

Mem

Mem lifecycle commands.

Fields

§action: MemAction
§

MemRepo

Mem-repo-git lifecycle commands.

Fields

§

Workspace

Introspect and configure workspace policy — dump reads the effective config; allow-create/revoke-create/allow-delete/ revoke-delete/grant-cross-link/revoke-cross-link/set-mutations write the mem-lifecycle allowlist, cross-mem link grants, and mutation policy.

Fields

§

Schema(Args)

Author-time schema tooling. memstead schema validate <path> checks a schema package directory against the engine’s loader without touching a workspace.

§

Projection(Args)

Pipeline tooling — one versioned v2 binding per pipeline, sources inline. memstead projection brief <binding> renders a binding’s run-brief (the Markdown prompt an agent consumes); memstead projection init scaffolds a fresh v2 record non-interactively; memstead projection migrate converts every prior on-disk generation (gen-1 root folders, the four-primitive store, the v1 three-file store) into v2 records in place; memstead projection advance records disposition-gated sync-baseline advances; memstead projection enable <build|sync|verify> <binding> adds a missing operation block.

Implementations§

Source§

impl Command

Source

pub fn verb(&self) -> &'static str

The subcommand’s user-facing verb name, as typed on the command line — the verb field the friction ledger records on a typed refusal. Nested action groups report their top-level noun (mem, mem-repo, workspace, domain, admin): per-verb counts at that granularity already answer the design questions, and nothing payload-shaped can leak through a static name.

Trait Implementations§

Source§

impl Debug for Command

Source§

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

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

impl FromArgMatches for Command

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 Command

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Fruit for T
where T: Send + Downcast,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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: Sized + 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<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