l1fe-weave-cli · cli
Source declarations, signatures and documentation for cli.
Source: sigil/weave/tools/weave/src/cli.rs. SHA-256: deaba87e2fa537e8dd6365cb2bcbf04b9d7a63ad32273a6a5d15ea7de75df088.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
cli::Cli
#[derive(Debug, Parser)]
#[command(
name = "weave",
about = "The Weave CLI - Comprehensive data management for the agent-based web",
version,
author,
long_about = None,
)]
pub struct Cli {
/// Launch TUI mode
#[arg(short, long)]
pub tui: bool,
/// Agent DID to use for operations
#[arg(long, env = "WEAVE_AGENT_DID")]
pub agent: Option<String>,
/// Organization DID
#[arg(long, env = "WEAVE_ORG_DID")]
pub org: Option<String>,
/// Configuration file path
#[arg(short, long, env = "WEAVE_CONFIG")]
pub config: Option<PathBuf>,
/// Verbosity level
#[arg(short, long, action = clap::ArgAction::Count)]
pub verbose: u8,
/// Subcommand to execute
#[command(subcommand)]
pub command: Option<Command>
}Source line: 15.
cli::Command
#[derive(Debug, Subcommand)]
pub enum Command {
/// Strand operations
#[command(subcommand)]
Strand(StrandCommand),
/// Locus file system operations
#[command(subcommand)]
Locus(LocusCommand),
/// Lens database operations
#[command(subcommand)]
Lens(LensCommand),
/// Nexus view operations
#[command(subcommand)]
Nexus(NexusCommand),
/// DHT operations
#[command(subcommand)]
Dht(DhtCommand),
/// AgentFS operations
#[command(subcommand)]
Agentfs(AgentFsCommand),
/// Mirror/sync operations
#[command(subcommand)]
Mirror(MirrorCommand),
/// Configuration management
#[command(subcommand)]
Config(ConfigCommand),
/// Forum tuple space operations
#[command(subcommand)]
Forum(ForumCommand),
/// Gnosis knowledge graph operations
#[command(subcommand)]
Gnosis(GnosisCommand),
/// Basis vector store operations
#[command(subcommand)]
Basis(BasisCommand),
/// dSocial commands over WOVEN
#[command(subcommand)]
Dsocial(DsocialCommand),
/// Weft sharded blob publish/fetch (live DHT via weft_store)
#[command(subcommand)]
Weft(WeftCommand),
}Source line: 42.
cli::StrandCommand
Strand subcommands
#[derive(Debug, Subcommand)]
pub enum StrandCommand {
/// Create a new strand
Create {
/// Name for the strand
#[arg(short, long)]
name: Option<String>,
/// Agent DID (overrides global)
#[arg(long)]
agent: Option<String>,
},
/// Append to a strand
Append {
/// Strand DID
strand: String,
/// Data to append (or read from stdin)
data: Option<String>,
/// Read data from file
#[arg(short, long)]
file: Option<PathBuf>,
},
/// Read from a strand
Read {
/// Strand DID
strand: String,
/// Start index
#[arg(short, long)]
start: Option<u64>,
/// Length to read
#[arg(short, long)]
length: Option<u64>,
},
/// List strands
List {
/// Filter by agent
#[arg(long)]
agent: Option<String>,
},
/// Replicate a strand
Replicate {
/// Source strand DID
source: String,
/// Target location
#[arg(short, long)]
target: Option<String>,
/// Sparse replication
#[arg(long)]
sparse: bool,
/// Hex-encoded 32-byte writer public key (required for remote sparse open
/// when the source strand is not already local)
#[arg(long)]
source_pubkey: Option<String>,
/// Seconds to wait for dial / discovery / session evidence
#[arg(long, default_value_t = 8)]
wait_secs: u64,
},
}Source line: 98.
cli::DsocialCommand
dSocial subcommands backed by WOVEN events
#[derive(Debug, Subcommand)]
pub enum DsocialCommand {
/// Publish or update a profile
Profile {
/// Display name
display_name: String,
/// Optional bio
#[arg(long)]
bio: Option<String>,
/// Optional avatar Locus reference
#[arg(long)]
avatar: Option<String>,
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// WOVEN space
#[arg(long, default_value = "woven://dsocial/global")]
space: String,
},
/// Publish a post
Post {
/// Post text
text: String,
/// Attachment Locus reference
#[arg(long = "attachment")]
attachments: Vec<String>,
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// WOVEN space
#[arg(long, default_value = "woven://dsocial/global")]
space: String,
},
/// Reply to an event
Reply {
/// Parent WOVEN event ref
parent: String,
/// Reply text
text: String,
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// WOVEN space
#[arg(long, default_value = "woven://dsocial/global")]
space: String,
},
/// Follow a DID
Follow {
/// Target DID
target: String,
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// WOVEN space
#[arg(long, default_value = "woven://dsocial/global")]
space: String,
},
/// React to an event
React {
/// Target WOVEN event ref
target: String,
/// Reaction value
#[arg(default_value = "+")]
reaction: String,
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// WOVEN space
#[arg(long, default_value = "woven://dsocial/global")]
space: String,
},
/// Read a local dSocial feed
Feed {
/// Strand name
#[arg(long, default_value = "dsocial")]
strand: String,
/// Optional WOVEN space filter
#[arg(long)]
space: Option<String>,
/// Optional event kind filter
#[arg(long)]
kind: Option<String>,
/// Optional author filter
#[arg(long)]
author: Option<String>,
/// Maximum entries to print
#[arg(short, long)]
limit: Option<usize>,
},
}Source line: 170.
cli::LocusCommand
Locus file system subcommands
#[derive(Debug, Subcommand)]
pub enum LocusCommand {
/// Create directory
Mkdir {
/// Path to create
path: String,
/// Drive DID
#[arg(long)]
drive: String,
/// Create parent directories
#[arg(short, long)]
parents: bool,
},
/// Write file
Write {
/// File path
path: String,
/// Drive DID
#[arg(long)]
drive: String,
/// Data to write (or read from stdin)
data: Option<String>,
/// Read from file
#[arg(short, long)]
file: Option<PathBuf>,
},
/// Read file
Read {
/// File path
path: String,
/// Drive DID
#[arg(long)]
drive: String,
},
/// Delete file or directory
Rm {
/// Path to delete
path: String,
/// Drive DID
#[arg(long)]
drive: String,
/// Recursive delete
#[arg(short, long)]
recursive: bool,
},
/// List directory
Ls {
/// Directory path
#[arg(default_value = "/")]
path: String,
/// Drive DID
#[arg(long)]
drive: String,
/// Long format
#[arg(short, long)]
long: bool,
/// Show hidden files
#[arg(short = 'a', long)]
all: bool,
},
/// Get file statistics
Stat {
/// File path
path: String,
/// Drive DID
#[arg(long)]
drive: String,
},
}Source line: 286.
cli::LensCommand
Lens database subcommands
#[derive(Debug, Subcommand)]
pub enum LensCommand {
/// Put key-value pair
Put {
/// Key
key: String,
/// Value
value: String,
/// Database DID
#[arg(long)]
db: String,
},
/// Get value by key
Get {
/// Key
key: String,
/// Database DID
#[arg(long)]
db: String,
},
/// Delete key
Del {
/// Key
key: String,
/// Database DID
#[arg(long)]
db: String,
},
/// Range query
Range {
/// Start key
#[arg(long)]
start: Option<String>,
/// End key
#[arg(long)]
end: Option<String>,
/// Database DID
#[arg(long)]
db: String,
/// Limit results
#[arg(short, long)]
limit: Option<usize>,
},
/// List sub-databases
List {
/// Parent database DID
#[arg(long)]
db: String,
},
}Source line: 374.
cli::NexusCommand
Nexus view subcommands
#[derive(Debug, Subcommand)]
pub enum NexusCommand {
/// Create a nexus view
Create {
/// View name
name: String,
/// Input strands (comma-separated)
#[arg(long)]
inputs: String,
/// Ordering strategy
#[arg(long, default_value = "timestamp")]
ordering: String,
},
/// Add input to nexus
AddInput {
/// Nexus DID
nexus: String,
/// Strand DID to add
strand: String,
},
/// View nexus entries
View {
/// Nexus DID
nexus: String,
/// Start index
#[arg(short, long)]
start: Option<u64>,
/// Number of entries
#[arg(short, long)]
limit: Option<usize>,
},
}Source line: 437.
cli::DhtCommand
DHT subcommands
#[derive(Debug, Subcommand)]
pub enum DhtCommand {
/// Join the DHT network
Join {
/// Bootstrap nodes
#[arg(long)]
bootstrap: Vec<String>,
/// Local port
#[arg(short, long)]
port: Option<u16>,
},
/// Get DHT statistics
Stats,
/// List connected peers
Peers,
/// Announce content
Announce {
/// Content DID
did: String,
},
/// Find content
Find {
/// Content DID
did: String,
},
}Source line: 478.
cli::WeftCommand
Weft subcommands
#[derive(Debug, Subcommand)]
pub enum WeftCommand {
/// Publish bytes (literal) or a file path into live Weft DHT records
Publish {
/// Literal payload or file path
input: String,
/// Bootstrap nodes (optional; node config used if empty)
#[arg(long)]
bootstrap: Vec<String>,
/// Chunk size override
#[arg(long)]
chunk_size: Option<usize>,
},
/// Discover + fetch a Weft payload by root / weft-id (hex)
Fetch {
/// Weft root / weft-id (hex)
weft_id: String,
/// Output path
#[arg(short, long)]
out: Option<PathBuf>,
/// Bootstrap nodes (optional)
#[arg(long)]
bootstrap: Vec<String>,
},
}Source line: 511.
cli::AgentFsCommand
AgentFS subcommands
#[derive(Debug, Subcommand)]
pub enum AgentFsCommand {
/// Initialize AgentFS
Init {
/// Root directory
path: PathBuf,
/// Agent DID
#[arg(long)]
agent: Option<String>,
},
/// Mount AgentFS
Mount {
/// Root directory
path: PathBuf,
/// Mount point
#[arg(short, long)]
mount: Option<PathBuf>,
},
/// Sync with remote Locus
Sync {
/// Local path
local: PathBuf,
/// Remote Locus DID
remote: String,
/// Sync direction
#[arg(short, long, default_value = "bidirectional")]
direction: SyncDirection,
},
/// Check and report inconsistencies
Fsck {
/// Root directory
path: PathBuf,
},
}Source line: 543.
cli::MirrorCommand
Mirror subcommands
#[derive(Debug, Subcommand)]
pub enum MirrorCommand {
/// Start mirroring
Start {
/// Source (local path or DID)
source: String,
/// Target (local path or DID)
target: String,
/// Watch for changes
#[arg(short, long)]
watch: bool,
/// Sparse replication
#[arg(long)]
sparse: bool,
},
/// Show mirror status
Status {
/// Mirror ID
#[arg(long)]
id: Option<String>,
},
/// Stop mirroring
Stop {
/// Mirror ID
id: String,
},
}Source line: 586.
cli::ConfigCommand
Config subcommands
#[derive(Debug, Subcommand)]
pub enum ConfigCommand {
/// Show current configuration
Show,
/// Set configuration value
Set {
/// Key
key: String,
/// Value
value: String,
},
/// Get configuration value
Get {
/// Key
key: String,
},
/// Initialize configuration
Init {
/// Force overwrite
#[arg(short, long)]
force: bool,
},
}Source line: 620.
cli::SyncDirection
Sync direction for AgentFS
#[derive(Debug, Clone, Copy, ValueEnum)]
pub enum SyncDirection {
Push,
Pull,
Bidirectional,
}Source line: 649.
cli::ForumCommand
Forum tuple space subcommands
#[derive(Debug, Subcommand)]
pub enum ForumCommand {
/// Write a tuple to the space
Write {
/// Tuple data
tuple: String,
},
/// Read a tuple from the space
Read {
/// Tuple pattern
pattern: String,
},
/// Take a tuple from the space
Take {
/// Tuple pattern
pattern: String,
},
}Source line: 657.
cli::GnosisCommand
Gnosis knowledge graph subcommands
#[derive(Debug, Subcommand)]
pub enum GnosisCommand {
/// Add a triple to the graph
Add {
/// Subject
subject: String,
/// Predicate
predicate: String,
/// Object
object: String,
},
/// Query the graph
Query {
/// Subject
#[arg(long)]
subject: Option<String>,
/// Predicate
#[arg(long)]
predicate: Option<String>,
/// Object
#[arg(long)]
object: Option<String>,
},
/// Get neighbors of a node
Neighbors {
/// Node ID
node_id: String,
},
}Source line: 677.
cli::BasisCommand
Basis vector store subcommands
#[derive(Debug, Subcommand)]
pub enum BasisCommand {
/// Add a vector to the store
Add {
/// Vector ID
#[arg(long)]
id: Option<String>,
/// Vector data (comma-separated floats)
vector: String,
},
/// Search for nearest neighbors
Search {
/// Query vector (comma-separated floats)
vector: String,
/// Number of neighbors to return
#[arg(short, long, default_value = "10")]
k: usize,
},
/// Remove a vector from the store
Remove {
/// Vector ID
id: String,
},
}Source line: 708.