Weave
AgentFS and Mirror
AgentFS and mirror commands in the Weave CLI: mount, mirror, watch, and reconcile local-first agent filesystems.
Purpose
Main Weave CLI and TUI covering strand, dSocial, Locus, Lens, Nexus, DHT, AgentFS, mirror, config, forum, gnosis, and basis commands.
This page follows the real source shape for Weave and explains the workflow a developer is likely to use first.
Developer workflow
Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.
Primary types to know
App— tools/weave/src/tui/app.rsCli— tools/weave/src/cli.rsNetworkConfig— tools/weave/src/config.rsPeerInfo— tools/weave/src/tui/app.rsStorageConfig— tools/weave/src/config.rsTuiConfig— tools/weave/src/config.rsWeaveConfig— tools/weave/src/config.rsAgentFsCommand— tools/weave/src/cli.rsBasisCommand— tools/weave/src/cli.rsCommand— tools/weave/src/cli.rsConfigCommand— tools/weave/src/cli.rsDhtCommand— tools/weave/src/cli.rs
Example shape
# 'weave agentfs' wires the local AgentFS to a Locus drive and 'weave mirror'
# drives content-addressed mirroring against a remote peer.
# Initialize the on-disk AgentFS root for an agent identity.
weave agentfs init --root ~/agentfs/ops-bot --identity did:l1fe:agent:ops-bot
# Pair it with a Locus drive so files are content-addressed onto the strand.
weave agentfs link --root ~/agentfs/ops-bot --drive workspace
# Mirror an upstream drive into the local Locus, applying NewerWins on conflict.
weave mirror sync workspace \
--from did:l1fe:agent:upstream \
--conflict newer-wins \
--dry-run
# Watch mode keeps the mirror live until interrupted.
weave mirror watch workspace --debounce-ms 250 --include "**/*.md"
# Inspect the last sync report.
weave mirror status workspace