Core ideas in five minutes

Core ideas in five minutes

In loot, who can read a file is decided by the file, not by the repository. Everything else on this page follows from that.

One repo, several audiences

In git the repository is the unit of access: whoever can clone it reads every file, so a secret needs a second repo or a secrets manager beside the first. In loot each path carries its own visibility tier, declared in .lootattributes and versioned with the tree, so the policy travels to every clone. loot explain tells you which line decided a path.

printf '.env restricted=alice\n*.md internal\n' > .lootattributes
loot explain .env
# .env โ€” restricted=alice
#   decided by .lootattributes line 1: `.env restricted=alice`

There are four tiers. Internal, the default, is readable by anyone with access to the repo. Restricted is readable only by named identities. Embargoed is readable by nobody until a reveal time. Published is readable by the world, and a first publication needs --allow-publish. See Visibility.

Reading is holding a key

Every object is sealed, Internal included, and addressed by the hash of its ciphertext. A clone and a relay carry sealed objects alike. What differs is which content keys each one holds, so reading a file means holding its key. Your identity is the keypair loot init mints. See Sealed objects, the content-addressed store and Identity.

Access changes are key handoffs

Sharing a restricted file later is a grant: its key, sealed to one identity and signed by you. Cutting someone off is a maroon: the path is re-sealed under a new key for everyone else, and the marooned identity keeps the versions it already holds. Neither needs a new repo or rewritten history. See Grants and Change a path visibility.

Work you cannot read still travels

A snapshot is visibility-aware. A path you cannot open is carried forward unchanged, never read as a deletion. When histories converge, the peers holding a path's key merge it, and the others relay its ciphertext. A collaborator without the key cannot drop or expose it by accident. See Changes and the change DAG.

Hosts store what they cannot read

A relay stores Restricted content, and Embargoed content before its reveal, without ever holding the keys. It can read Internal content, because those keys ride in every sync bundle. An embargo's key is withheld by the relay until the reveal time. See Relays and hosts, Embargo, and the trust matrix for each reader, tier by tier.

What is not sealed

loot seals content, not the shape of your history. Path names, change messages, author keys and the DAG are readable by a relay, a forge and any collaborator. If a filename is itself the secret, sealing the bytes does not hide it. See What a host can read.

Mistakes have a gate and a remedy

loot refuses to seal a secret-shaped file such as .env as Internal when no rule names it, and tells you how to declare it. If a secret reaches finalized history anyway, loot burn destroys its bytes in your store and asks each host it reached to drop them. That is complete only if you never pushed, so rotate the secret too.

Coming from another tool? Read Coming from git or Coming from jj.