Set it with a flag or in config. The flag wins when both are set.
git
Every write becomes a git commit in the knowledge base’s own repository. The writer’s identity becomes the commit author: theX-Actor header over REST, or the actor argument over MCP. Writes without an actor are attributed to anonymous over REST and mcp-agent over MCP.
Terminal
git log, git blame, git diff, and git revert all work. Edits made directly on disk are picked up by the file watcher and committed the same way.
Batched commits
Under heavy write load, KiwiFS batches commits. Writes from the same actor that land within the batch window share one commit; a different actor always starts a new commit, so authorship never mixes.
A batched commit with several files lists every path in its message, so
git log stays useful.
cow
Copy-on-write keeps a snapshot of a file in.versions/<path>/ before each overwrite and before a delete. Older snapshots beyond max_versions per file are pruned.
.kiwi/config.toml
501.
none
Writes overwrite files in place, and the history endpoints return empty results. The write pipeline, search index, and live events still run.Optimistic locking
Every read returns anETag: the git blob hash of the content. Send it back in If-Match and the write fails with 409 Conflict if someone changed the file since you read it. This works under every strategy, because the hash is computed from the content itself.
Terminal
kiwi_read as if_match to kiwi_write.
Moves and restructuring
Renames, moves, and merges go through the refactor engine. Every wiki link and markdown link that pointed at the old path is rewritten, and the move plus every relinked page land in a single commit, so onegit revert undoes the whole change. See Refactor.
Read history
- REST
- MCP
- Web UI
Terminal
Related
Versioning API
Parameters and responses for history, diff, and blame.
Draft spaces
Stage a batch of edits on a branch before merging.
Backup and sync
Push the repository to a git remote on a schedule.
Files as truth
Why the files, not the index, are the record.