CLI Reference
Local Lock Commands
Record editing intent inside one repository. These locks are local advisory metadata, not remote team coordination.
Not distributed enforcement
Lock records live in the local repository. Dits does not synchronize them, lease them from a server, or use them as multi-user authorization. Other programs—and Dits operations that do not consult this store—can still modify, rename, or delete the file.
| Command | Current behavior | Usage |
|---|---|---|
| lock | Create a local advisory lock record | dits lock [OPTIONS] <PATH> |
| unlock | Release a local lock record | dits unlock [OPTIONS] <PATH> |
| locks | List active local lock records | dits locks [OPTIONS] |
dits lock
Adds a path, owner, expiry time, and optional reason to .dits/locks.json. The owner is derived from Git's user.email when available, then from the local system user. The default time to live is eight hours.
# Create a local record with the default TTL
dits lock footage/scene01.mov --reason "Color pass"
# Choose a TTL in hours
dits lock footage/scene01.mov --ttl 2
# Replace an existing local record deliberately
dits lock footage/scene01.mov --forcedits locks
# List active records
dits locks
# Include full local record details
dits locks --verbose
# Filter by the stored owner identifier
dits locks --owner editor@example.comExpired records are omitted from listings. A list is a snapshot of one local lock file; it does not query another workstation or a service.
dits unlock
# Release a record owned by the current local identity
dits unlock footage/scene01.mov
# Override the owner check for this local record
dits unlock footage/scene01.mov --forceA lightweight local convention
These commands can help coordinate processes or people who deliberately share and honor the same repository metadata. For real multi-machine exclusivity, use an external coordination system until remote lock semantics are implemented.
See the status and roadmap for the remote-lock boundary and file commandsfor local staging and commits.