Git database adapter for Fulcro RAD.
Agent-scoped, git-backed storage. Entities are EDN files in directories, commits are the transaction log. Designed for agent communication and knowledge persistence via the mementum protocol.
Hybrid engine: JGit in-process is the primary path for most read and write operations (10-50x faster than CLI shell-outs). The git CLI is used as a fallback and for worktree operations JGit 7.x does not support. Repository objects are cached in a pool — call close-jgit-repos! at shutdown.
Main functions:
Git database adapter for Fulcro RAD. Agent-scoped, git-backed storage. Entities are EDN files in directories, commits are the transaction log. Designed for agent communication and knowledge persistence via the mementum protocol. Hybrid engine: JGit in-process is the primary path for most read and write operations (10-50x faster than CLI shell-outs). The git CLI is used as a fallback and for worktree operations JGit 7.x does not support. Repository objects are cached in a pool — call close-jgit-repos! at shutdown. Main functions: - start-repositories: Initialize git repos from config - stop-repositories: Shut down repos - wrap-env: Pathom env middleware to inject repos - generate-resolvers: Auto-generate resolvers from RAD attributes - wrap-git-save: Form save middleware (EDN write + git commit) - wrap-git-delete: Form delete middleware (file remove + git commit)
Add a new worktree with a new branch. Returns {:success :path :branch}.
Add a new worktree with a new branch. Returns {:success :path :branch}.
Build the file path for a scoped child entity inside a parent directory.
Build the file path for a scoped child entity inside a parent directory.
Close all cached JGit Repository objects. Call at shutdown.
Close all cached JGit Repository objects. Call at shutdown.
Stage and commit only the entity file — nothing else in the index. Uses git commit --only. Returns {:success bool, :commit string}.
Stage and commit only the entity file — nothing else in the index.
Uses git commit --only. Returns {:success bool, :commit string}.Stage and commit multiple files atomically — one commit for all paths. Each file-spec: {:path string, :action :add|:delete}. Returns {:success bool, :commit string}.
Stage and commit multiple files atomically — one commit for all paths.
Each file-spec: {:path string, :action :add|:delete}.
Returns {:success bool, :commit string}.Remove a file and commit only the deletion. Returns {:success bool}.
Remove a file and commit only the deletion.
Returns {:success bool}.Delete a branch. Use after remove-worktree!. Returns {:success bool}.
Delete a branch. Use after remove-worktree!. Returns {:success bool}.
Recursively delete an entity directory and all its contents.
Recursively delete an entity directory and all its contents.
Returns true if git-embed is installed and accessible on the PATH. git-embed provides semantic similarity search over git repository content.
Returns true if git-embed is installed and accessible on the PATH. git-embed provides semantic similarity search over git repository content.
Remove embeddings for deleted files. Returns {:success bool}.
Remove embeddings for deleted files. Returns {:success bool}.
Install git-embed hooks (post-commit, post-merge, post-checkout). After installation, embeddings auto-update on every commit.
Install git-embed hooks (post-commit, post-merge, post-checkout). After installation, embeddings auto-update on every commit.
Semantic search across indexed content. Returns [{:score :path}] or nil. Requires git-embed. See (embed-available?).
Semantic search across indexed content. Returns [{:score :path}] or nil.
Requires git-embed. See (embed-available?).Find files similar to a given file. Returns [{:score :path}] or nil. Index-only operation (~6ms, no model load). Requires git-embed.
Find files similar to a given file. Returns [{:score :path}] or nil.
Index-only operation (~6ms, no model load). Requires git-embed.Get embedding index status. Returns {:model :indexed :total :dims :ref :hooks} or nil.
Get embedding index status. Returns {:model :indexed :total :dims :ref :hooks} or nil.
Remove git-embed hooks from a repo. Returns {:success bool}.
Remove git-embed hooks from a repo. Returns {:success bool}.
Index all unindexed text files in HEAD. Returns {:success :message}.
Index all unindexed text files in HEAD. Returns {:success :message}.
Remove and close a specific JGit Repository from the pool.
Remove and close a specific JGit Repository from the pool.
Add a worktree branching from a specific commit. Returns {:success :path :branch}.
Add a worktree branching from a specific commit. Returns {:success :path :branch}.
Run git garbage collection. Returns {:success bool}.
Run git garbage collection. Returns {:success bool}.
Generate all Pathom 2 resolvers for the given git-backed schema (the default).
Arguments:
Returns: sequence of Pathom 2 resolver maps.
For Pathom 3, use generate-resolvers-pathom3 (requires pathom3 on the
classpath).
Generate all Pathom 2 resolvers for the given git-backed schema (the default). Arguments: - attributes: collection of RAD attributes - schema: schema keyword (e.g. :knowledge) Returns: sequence of Pathom 2 resolver maps. For Pathom 3, use `generate-resolvers-pathom3` (requires pathom3 on the classpath).
Generate all resolvers as Pathom 3 resolvers for the given git-backed schema.
Same shape as generate-resolvers, but returns pathom3 Resolver objects.
Requires pathom3 on the classpath (loaded lazily; not a hard dependency).
Generate all resolvers as Pathom 3 resolvers for the given git-backed schema. Same shape as `generate-resolvers`, but returns pathom3 Resolver objects. Requires pathom3 on the classpath (loaded lazily; not a hard dependency).
Returns true if git is installed and accessible on the PATH.
Returns true if git is installed and accessible on the PATH.
Build the full path to a directory entity's index file.
Build the full path to a directory entity's index file.
Derive the index filename for a directory entity. E.g. "experiment" + ".edn" → "experiment.edn".
Derive the index filename for a directory entity. E.g. "experiment" + ".edn" → "experiment.edn".
Initialize a bare git repository. Returns canonical path.
Initialize a bare git repository. Returns canonical path.
Invalidate the branch name cache for a repo directory.
Invalidate the branch name cache for a repo directory.
List all branch names. Returns set of strings. Cached per repo-dir.
List all branch names. Returns set of strings. Cached per repo-dir.
List child entity files in a subdirectory of a parent directory entity.
List child entity files in a subdirectory of a parent directory entity.
List directory entities — each subdirectory is an entity instance.
List directory entities — each subdirectory is an entity instance.
List entity files sorted by caller-provided function. Returns sorted vector of {:id :path :entity}.
List entity files sorted by caller-provided function.
Returns sorted vector of {:id :path :entity}.List all worktrees. Returns seq of {:path :head :branch}.
List all worktrees. Returns seq of {:path :head :branch}.
Prune stale worktree references. Returns {:success bool}.
Prune stale worktree references. Returns {:success bool}.
Remove a worktree, keeping the branch. Returns {:success bool}.
Remove a worktree, keeping the branch. Returns {:success bool}.
Re-attach a worktree to an existing branch on restart. Prunes stale metadata first. Returns {:success :path :branch}.
Re-attach a worktree to an existing branch on restart.
Prunes stale metadata first. Returns {:success :path :branch}.Build the full path to a named file within a directory entity.
Build the full path to a named file within a directory entity.
Stage and commit a file within a worktree. Returns {:success :commit}.
Stage and commit a file within a worktree. Returns {:success :commit}.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |