connor / loot

connor/loot

README.md

loot

A from-scratch source-control system.

Thesis: visibility and permissions belong to content and changes, not to the repository. Commit your .env. Keep files private inside a shared repo. Embargo a security fix: merge it, cut the release, reveal the source later.

Security

loot's cryptography is written from scratch and has never been independently reviewed. What each reader (a relay, a forge, a collaborator, the anonymous internet, the git mirror, anyone holding your .loot/ directory) can read is stated tier by tier at https://loot.build/trust. Read it before you put anything in a loot repo whose disclosure would hurt you. In particular, the default tier is one a relay reads by design, and path names are never encrypted at any tier.

Report a vulnerability to <security@loot.build>, not to the public Discord. One maintainer, best effort, expect days rather than hours. This repo is private (ADR 0045/0064), so /trust is the published route.

What works today

The CLI's full verb list, from loot --help (one line per verb; loot <verb> --help has the detail, loot help --json the same index as data):

abandon absorb adopt apply apply-patch archive attest bisect blame bundle buoy
burn cat
cherry-pick clean clone completions config conflicts converge count-objects
describe diff doctor duplicate edit embargo-status evolog explain ferry
fetch format-patch gates gc grant grant-status grants grep heads id init keygen
lane lanes lock log login manifest maroon merge migrate move new notes op peer pipeline
propose pull
pull-grants purges push range-diff rehome relay remote resolve restore revert runner runners seek serve
shortlog show split squash status surface tag telemetry ticket tickets tutorial undo unlock verify
view whoami

loot <verb> --help prints any verb's usage without running it.

Try it: private .env in a shared repo

cargo build --release
export PATH="$PWD/target/release:$PATH"

cd $(mktemp -d)
printf 'TOKEN=supersecret\n' > .env
printf '# My Project\n'      > README.md
printf '.env restricted=alice\n*.md public\n' > .lootattributes

loot init --identity alice
loot status -m "initial work"
loot surface              # alice: restores both README.md and .env

# switch to a non-keyholder to prove it
printf mallory > .loot/identity
rm -f .env README.md
loot surface              # mallory: README.md appears; .env stays sealed

The .env ciphertext stays in .loot/. Mallory cannot decrypt it, and if she snapshots and re-syncs, the sealed file is carried forward untouched.

Sync over a relay

A relay stores and forwards ciphertext it cannot read. Restricted keys never travel in a sync bundle (ADR 0003).

# Terminal 1: run a relay
loot serve --dir /tmp/relay --addr 127.0.0.1:4000

# Terminal 2: alice pushes
loot remote add origin http://127.0.0.1:4000
loot push

# Terminal 3: bob pulls (bob only sees public content)
loot clone http://127.0.0.1:4000 ./bob-repo --identity bob

Grants: sharing a content key

# alice knows bob's public key (from `loot whoami` on bob's machine)
loot peer add bob "ssh-ed25519 AAAA..."

# deliver a sealed grant via the relay
loot grant --relay origin .env bob

# bob fetches and applies it
loot pull-grants           # verifies alice's signature, checks peer registry
loot surface               # now bob can read .env

Embargo: timed reveals

# mark a file as embargoed until unix timestamp 1800000000
echo "VULN_DETAILS=CVE-2025-XXXX" > security-fix.txt
printf 'security-fix.txt embargoed=1800000000\n' >> .lootattributes

loot status -m "patch for CVE-2025-XXXX"
loot push                  # relay holds the ciphertext; key withheld until reveal_at

At reveal_at, the next read promotes the key out of escrow, so anyone who pulls can read it.

Layout

The engine is crates/loot-core, the loot binary is crates/loot-cli, and the relay and forge deployables are crates/loot-relayd and crates/loot-forge. CONTEXT.md is the domain glossary and docs/adr/ holds the decisions.

Build & test

cargo build
cargo test                # includes HTTP relay integration tests
cargo test -p loot-core   # fast, no I/O

Files

.cargo/1 entry · 0 published
.claude/23 entries · 0 published
.github/5 entries · 0 published
agent-host/35 entries · 0 published
ci/8 entries · 0 published
crates/534 entries · 0 published
docs/1740 entries · 0 published
issues/17 entries · 0 published
mcp/10 entries · 0 published
sdk/66 entries · 0 published
site/529 entries · 0 published
tickets/8426 entries · 0 published
tools/3 entries · 0 published
.gitattributesinternal
.gitignoreinternal
.lootattributesinternal
.lootignoreinternal
.lootpipelineinternal
.vercelignoreinternal
AGENTS.mdinternal
Cargo.lockinternal
Cargo.tomlinternal
CONTEXT.mdinternal
dist-workspace.tomlinternal
LICENSE-APACHEpublished
LICENSE-MITpublished
README.mdpublished
rust-toolchain.tomlinternal