Skip to content
Clojure library for querying Apache TinkerPop graphs
Clojure Java Groovy
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
src/clojure/clojurewerkz/ogre Bump to TinkerPop 3.4.4 Mar 5, 2020
.gitignore Get Ogre working with TinkerPop 3.2.6 Sep 8, 2017
.travis.yml Use openjdk8 rather than oracle for travis builds Mar 5, 2020 Bumped to TinkerPop 3.4.6 Mar 5, 2020 Bumped to TinkerPop 3.4.6 Mar 5, 2020
gremlin-ogre.png Add gremlin-ogre image May 23, 2016
ogre-head.png Add ogre logos Sep 14, 2016
ogre-test-gen.groovy A whole new Ogre that attempts to achieve Gremlin Language Variant co… May 1, 2016
ogre.png Add ogre logos Sep 14, 2016
project.clj Bumped to Mar 5, 2020


Ogre is a Clojure Gremlin Language Variant of the Gremlin graph traversal language from Apache Tinkerpop. Like Gremlin, it can be used to query any graphs that are TinkerPop-enabled.

Project Goals

  • Provide an API that enhances the expressivity of Gremlin when working in Clojure.
  • Expose the features of TinkerPop as it makes sense in Clojure.
  • Don't introduce any significant amount of performance overhead.


Questions related to Ogre can be asked on the clojure-titanium mailing list.

To subscribe for announcements of releases, important changes and so on, please follow @ClojureWerkz on Twitter.

Project Maturity

Despite being first released in 2014, Orge is a relatively young project that regained active development in 2016. Most of Ogre's features are driven by changes to Apache TinkerPop (specifically the Traversal API) which has largely stabilized itself in over the course of the 3.2.x line of code. As a result, Ogre tends to be fairly stable with its implementation of that API. Ogre also implements the TinkerPop Process Test Suite, which helps validate that Ogre is compliant with Gremlin.

Ogre currently targets TinkerPop 3.4.x.


Orge artifacts are released to Clojars. Maven users should add the following repository definition to your pom.xml:


The Most Recent Release

With Leiningen:

[clojurewerkz/ogre ""]

With Maven:


Documentation & Examples

You'll need to choose a TinkerPop-enabled graph database and add that to your project's dependencies. Here we use the in-memory graph database implementation provided by org.apache.tinkerpop/tinkergraph-gremlin, e.g.:

With Leiningen:

[org.apache.tinkerpop/tinkergraph-gremlin "3.4.6"]

With Maven:


REPL examples:

user=> (load "clojurewerkz/ogre/core")
user=> (in-ns 'clojurewerkz.ogre.core)
#object[clojure.lang.Namespace 0x2bcfe59c "clojurewerkz.ogre.core"]
clojurewerkz.ogre.core=> (def graph (open-graph {(Graph/GRAPH) (.getName org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph)}))
clojurewerkz.ogre.core=> (def g (traversal graph))
clojurewerkz.ogre.core=> (org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerFactory/generateModern graph)
clojurewerkz.ogre.core=> (traverse g V (match
                    #_=>   (__ (as :a) (out :created) (as :b))
                    #_=>   (__ (as :b) (has :name "lop"))
                    #_=>   (__ (as :b) (in :created) (as :c))
                    #_=>   (__ (as :c) (has :age 29)))
                    #_=>   (select :a :c) (by :name)
                    #_=>   (into-seq!))
({"a" "marko", "c" "marko"} {"a" "josh", "c" "marko"} {"a" "peter", "c" "marko"})

Ogre has more complete documentation here.

Supported Clojure Versions

Orge requires Clojure 1.8+. The most recent stable release is always recommended.

Continuous Integration

Build Status


Orge uses Leiningen 2. Once installed and run tests using:

lein test


Copyright (C) 2014-2017 Zack Maril, and the ClojureWerkz team. Copyright (C) 2017 Stephen Mallette, Zack Maril, and the ClojureWerkz team.

Licensed under the Eclipse Public License (the same as Clojure).


Joe Lee illustrated the "Gremlin Ogre" image based on the original Clojurewerkz Ogre logo and Apache TinkerPop's Gremlin character developed Ketrina Yim.

You can’t perform that action at this time.