darn_cli-0.2.0 is not a library.
darn
Directory-based Automerge Replication Node
CLI for darn - sync directories over CRDTs.
Installation
Or from the workspace root:
Commands
Initialize a Workspace
Creates a .darn/ directory in the current folder. On first run, also sets up your global signer key at ~/.config/darn/signer/.
Track Files
Converts files to Automerge documents and stores them in .darn/storage/.
View Tracked Files
Shows all tracked files with state indicators:
Workspace: /home/user/project
src/main.rs
M src/lib.rs
! deleted_file.txt
3 tracked: 1 clean, 1 modified, 1 missing
| Indicator | Meaning |
|---|---|
(space) |
Clean - file matches stored version |
M |
Modified - file changed on disk |
! |
Missing - file deleted from disk |
Stop Tracking
Removes from manifest but keeps the local file.
Sync with Peers
# Sync with all peers
# Sync with specific peer
Automatically commits any local changes before syncing.
Manage Peers
Watch for Changes
(Not yet implemented) Auto-sync when files change.
Ignore Patterns
Create a .darnignore file (gitignore syntax):
.git/
# Build artifacts
target/
*.o
# Editor files
*.swp
*~
# Secrets
.env
*.key
The .darn/ directory is always ignored.
Environment Variables
| Variable | Purpose |
|---|---|
RUST_LOG |
Logging level (e.g., RUST_LOG=debug) |
Storage Layout
.darn/
├── manifest.cbor # Tracked file mappings
├── storage/
│ ├── blobs/ # Content-addressed blobs
│ └── trees/{id}/ # Per-document sedimentree
└── peers/ # Peer information (future)
~/.config/darn/
└── signer/
└── private.key # Ed25519 signing key
License
Apache-2.0 OR MIT