pub enum Command {
Show 20 variants
Init,
New {
type_name: String,
title: String,
tags: String,
status: String,
features: String,
reason: Option<String>,
field: Vec<String>,
},
Import {
type_name: String,
file: String,
},
Show {
id: String,
refs: bool,
},
List {
type_name: Option<String>,
tag: Option<String>,
status: Option<String>,
field: Vec<String>,
format: ListFormat,
},
Tags {
keys: bool,
},
SetStatus {
ids: String,
status: String,
reason: Option<String>,
},
Tag {
ids: String,
add: Option<String>,
remove: Option<String>,
},
Retire {
ids: String,
reason: String,
},
Block {
ids: String,
by: String,
},
Unblock {
ids: String,
by: String,
},
Verify,
Sync,
Stats {
plain: bool,
},
Query {
sql: String,
plain: bool,
stdin: bool,
write: bool,
},
Close {
ids: String,
force: bool,
},
Renumber {
base: Option<String>,
},
Cleanup,
Config(ConfigCommand),
AgentRules {
tool: AgentTool,
stdout: bool,
},
}Variants§
Init
Bootstrap the inventory directory and config; print the CLAUDE.md snippet.
New
Create a document of a configured type with the next ID.
Fields
Comma-separated, kebab-case (required when the type requires tags).
Import
Bulk-create documents of one type from a JSONL file (one JSON object per
line), allocating sequential IDs and syncing once. Run verify after.
Fields
Show
Print a document.
Fields
List
Filtered listing.
Fields
tag: Option<String>Filter by tag. Matches an exact tag, or any tag with this key
(the head before : or =, e.g. --tag area matches
area:parsing and area=high).
field: Vec<String>Filter by custom field: key=value (repeatable). Matches when the field equals the value (or, for list fields, contains it).
format: ListFormatTags
List the distinct tags in the inventory, sorted, one per line.
Fields
SetStatus
Guarded status transition. The id may be a comma-separated list to move several documents at once (same status/reason applied to each).
Fields
Tag
Add/remove tags on one or more documents.
Fields
Retire
Delete one or more documents; each ID is logged and never reused.
Fields
Block
Mark one or more documents as blocked by another, linking both
directions. Each blocked document is auto-set to blocked if its type
has that status.
Fields
Unblock
Remove a blocker link added by block from one or more documents.
Fields
Verify
Integrity check (CI gate).
Sync
Reconcile references, linkify prose, and relocate docs to their layout path (after hand edits).
Stats
Render the configured [[stats]] sections. Styled for a terminal;
plain markdown when piped (or with --plain / NO_COLOR).
Query
Run a SQL query over the inventory and print the result table. Read-only
(SELECT) by default; --write allows INSERT/UPDATE/DELETE. Styled for a
terminal; plain markdown when piped (or with --plain / NO_COLOR).
Tables: docs(id, num, type, status, title, created, updated, body, path), tags(doc_id, seq, tag, key, value), relations(doc_id, field, seq, ref_id, ref_num, raw_value, title, struck), fields(doc_id, key, value), sections(doc_id, heading, kind, items, unchecked), blocks(doc_id, seq, heading, text), retired(id, num, title).
Fields
sql: StringThe SQL to run (- reads it from stdin). A SELECT by default;
INSERT/UPDATE/DELETE require --write.
stdin: boolBind a value read from stdin to $1 in the SQL — for large or
multi-line values (e.g. a section body) without SQL-escaping;
trailing whitespace is trimmed. Incompatible with sql = -.
write: boolAllow edit statements (INSERT/UPDATE/DELETE). Applied only if the
edit introduces no new verify problem — otherwise nothing is
written. Write the authoritative columns (docs.status/body/
created/updated, tags.tag, relations.raw_value,
fm_fields.value_yaml); derived ones are recomputed. Setting blocks.text splices a ## section back into the body.
Close
Finish a document of a type with a terminal status: delete the file and strike its title in every referencing doc (the struck reference reserves the ID forever).
Fields
Renumber
Resolve ID conflicts between branches: keep IDs that existed at the git merge-base with main/master and renumber the ones added on this branch.
Fields
Cleanup
Strip struck-through (closed) references from every document.
Config(ConfigCommand)
Project configuration (generate/inspect the universal opys.toml).
AgentRules
Generate the always-on agent rule file for a rules-based editor (Cursor/Windsurf/Cline/Copilot/Kiro) from the canonical rule.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
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>
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>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
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
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
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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