Skip to content
This repository

Creates Datomic dbs from git repos

branch: master

Upgrade Datomic. Fixes issue #18.

Issue #18 is due to a change in the index format introduced in version
0.9.4699.  Peers and transactors must upgrade to this version
simultaneously. Please see
for details.
latest commit de60a9d2df
Bobby Calderwood bobby authored March 26, 2014
Octocat-spinner-32 doc added design doc October 01, 2012
Octocat-spinner-32 examples Clean before creating uberjar in clojure-and-contrib example March 12, 2013
Octocat-spinner-32 src Merge pull request #4 from lxmonk/repo-name January 11, 2013
Octocat-spinner-32 test initial import September 28, 2012
Octocat-spinner-32 .gitignore Make examples more self-contained January 31, 2013
Octocat-spinner-32 Link to REST url /data in README January 18, 2013
Octocat-spinner-32 epl-v10.html initial import September 28, 2012
Octocat-spinner-32 project.clj Upgrade Datomic. Fixes issue #18. March 26, 2014


codeq ('co-deck') is Clojure+Datomic application designed to do code-aware imports of your git repos into a Datomic db


Clone the codeq repo. Then (in it) run:

lein uberjar

Get Datomic Free

Unzip it, then start the Datomic Free transactor. Follow the instructions for running the transactor with the free storage protocol

cd theGitRepoYouWantToImport

java -server -Xmx1g -jar whereverYouPutCodeq/target/codeq-0.1.0-SNAPSHOT-standalone.jar datomic:free://localhost:4334/git

This will create a db called git (you can call it whatever you like) and import the commits from the local view of the repo. You should see output like:

Importing repo: as: clojure
Adding repo
Importing commit: e54a1ff1ac0d02560e80aad460e77ac353efad49
Importing commit: 894a0c81075b8f4b64b7f890ab0c8522a7a9986a
Importing commit: c1884eaca8ffb7aff2c3d393a9d5fa3306cf3f33
Importing commit: 01b4cb7156f0b378e70020d0abe293bffe35b031
Importing commit: 6bbfd943766e11e52a3fe21b177d55536892d132
Import complete!

Running analyzer: :clj on [.clj]
analyzing file: 17592186045504
analyzing file: 17592186045496
Analysis complete!

The import is not too peppy, since it shells to git relentlessly, but it imports e.g. Clojure's entire commit history in about 10 minutes, plus analysis.

You can import more than one repo into the same db. You can re-import later after some more commits and they will be incrementally added.

You can then (or during) connect to the same db URI with a peer. Or, just start the Datomic REST service and poke around:

cd whereverYouPutDatomicFree
bin/rest -p 8080 free datomic:free://localhost:4334/

Browse to localhost:8080/data/. You should see the free storage and the git db within it.

The schema diagram will help you get oriented.

More info

See the intro blog post and the wiki


Copyright © 2012 Metadata Partners, LLC and Contributors. All rights reserved.

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.