- Nix with flakes enabled
- That's it — Nix handles the rest
# Enter the dev shell (includes Rust toolchain, cargo, etc.)
nix develop
# Build
cargo build
# Run
cargo run -- --helpdarn/
├── darn_core/ # Library crate (workspace management, file types, sync logic)
└── darn_cli/ # Binary crate (CLI commands, interactive prompts, theme)
See cargo doc --open for detailed module documentation.
Logs are silent by default for a clean UI.
# Enable debug logs
RUST_LOG=debug cargo run -- init .
# Enable logs for specific crates
RUST_LOG=darn_core=debug,darn_cli=info cargo run -- init .
# Or use the verbose flag (forces debug level)
cargo run -- -v init .# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run a specific test
cargo test test_name| Task | Command |
|---|---|
| Build | cargo build |
| Build release | cargo build --release |
| Run clippy | cargo clippy |
| Format code | cargo fmt |
| Check formatting | cargo fmt --check |
| Build docs | cargo doc --open |
| Watch for changes | cargo watch -x check |
darn requires an Ed25519 signer at ~/.config/darn/signer/signing_key.ed25519.
To re-trigger the first-run setup flow:
rm -rf ~/.config/darn
cargo run -- init .~/.config/darn/signer/— Ed25519 keypair viasubduction_core::MemorySigner~/.config/darn/peers/— Peer configurations (shared across workspaces)~/.config/darn/workspaces.json— Auto-healing workspace registry~/.config/darn/workspaces/<id>/— Per-workspace manifest + sedimentree storage (layout managed bysedimentree_fs_storage)- Override with
DARN_CONFIG_DIRenv var
.darnJSON marker file at workspace root (not a directory)- Contains workspace ID, ignore patterns, and attribute overrides
- Manifest and storage live under
~/.config/darn/workspaces/<id>/
Files are stored as Automerge documents with the Patchwork schema:
- Text files →
TextCRDT (character-level merging) - Binary files →
Bytes(last-writer-wins)