Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Irmin is a distributed database that follows the same design principles as Git

Subscribe to updates I use irmin

Statistics on irmin

Number of watchers on Github 846
Number of open issues 46
Average time to close an issue 11 days
Main language OCaml
Average time to merge a PR 2 days
Open pull requests 10+
Closed pull requests 8+
Last commit over 2 years ago
Repo Created about 7 years ago
Repo Last Updated over 2 years ago
Size 8.3 MB
Organization / Authormirage
Latest Release1.3.3
Page Updated
Do you use irmin? Leave a review!
View open issues (46)
View irmin activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating irmin for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Irmin -- A distributed database that follows the same design principles as Git

Irmin is a library for persistent stores with built-in snapshot, branching and reverting mechanisms. It is designed to use a large variety of backends. Irmin is written in pure OCaml and does not depend on external C stubs; it aims to run everywhere, from Linux, to browsers and Xen unikernels.

Build Status docs


Irmin is a library to version-control application data. It has the following features:

  • on-disk format various formats are supported, including the Git format: Irmin on-disk repositories can be inspected and modified using the classic Git command-line tools.

  • wire format various formats are supported, including the Git protocol (only in client mode) or a simple JSON-based REST API (client and server).

  • dynamic behaviour Irmin allows the users to define custom merge functions, to use in-memory transactions (to keep track of reads as well as writes) and to define event-driven workflows using a notification mechanism.

These abstractions allow developers to create applications with concurrent behaviors which are both efficient and safe.

Bindings to other languages


Irmin ships with various backends. It provides the following OCamlfind pacakges:

  • irmin.mem is an in-memory backend.
  • irmin.git uses the Git format to persist data on disk.
  • irmin.fs uses bin_prot to persist data on disk.
  • irmin.http uses JSON over HTTP to speak with an Irmin server.

Other external backends are available as external OPAM packages (use opam install <pkg> to install):

  • irmin-chunk stores raw contents into a well-balanced rope where leafs are chunks of all the same size.
  • irmin-indexdb is a backend for a web browser's IndexedDB store.


  • merge-queues is an implementation of mergeable queues.
  • merge-ropes is an implementation of mergeable ropes.
  • diff-datatypes is a collection of automatic merge functions based on edit scripts. It is fairly generic but contains specific implementation for mergeable trees, stacks and queues.
  • irmin-datatypes is a collection of mergeable datatypes, including LWW registers, queues and sets.


Here a list of Irmin users:

  • Cuekeeper a version-controlled TODO list in the browser.
  • imaplet, a version-controlled IMAP server and client.
  • jitsu, a DNS server that automatically starts unikernels on demand. The database is persisted with Irmin.
  • Irmin+Xenstore, the Xenstore deamon rewritten to use Irmin to persist its data.
  • irmin-arp, a distributed ARP cache.
  • dog, a synchronisation tool.
  • irminFS, a prototype version-controlled file-system using Fuse.

Further Reading

Getting Started


Irmin is packaged with opam:

opam install irmin-unix # install all the optional depencies


Irmin comes with a command-line tool called irmin. See irmin --help for further reading. Use either irmin <command> --help or irmin help <command> for more information on a specific command.

To get the full capabilites of Irmin, use the API:

open Lwt.Infix
open Irmin_unix
module Store = Irmin_unix.Git.FS.KV (Irmin.Contents.String)

let config = Irmin_git.config ~bare:true "/tmp/irmin/test"
let info fmt = Irmin_unix.info ~author:"me <me@moi.com>" fmt

let prog =
  Store.Repo.v config >>= Store.master >>= fun t ->
  Store.set t ~info:(info "Updating foo/bar") ["foo"; "bar"] "hi!" >>= fun () ->
  Store.get t ["foo"; "bar"] >>= fun x ->
  Printf.printf "Read: %s\n%!" x;

let () = Lwt_main.run prog

To compile the example above, save it to a file called example.ml. Install irmin and git with opam (opam install irmin-unix) and run

$ ocamlfind ocamlopt example.ml -o example -package irmin.unix,lwt.unix -linkpkg
$ ./example
Read: hi!

The examples directory contains more examples. To build them, run

$ ./configure --enable-examples
$ make


Tutorials are available on the wiki.


To report any issues please use the bugtracker on Github.


See the LICENSE file.


Development of Irmin was supported in part by the EU FP7 User-Centric Networking project, Grant No. 611001.

irmin open issues Ask a question     (View All Issues)
  • over 3 years Issues with pulling/pushing remote repo
  • almost 4 years Documentation for `bare` repository unclear.
  • about 4 years Compiling the examples seem broken
  • over 4 years View.update is really expensive
  • over 4 years Error loading irmin.mirage from utop.
  • over 4 years Dependency problem with sexplib?
  • over 4 years Expose `/remotes/` branches for the Git backend
  • over 4 years Expose some kind of "mtime"
  • over 4 years Problem while trying to sync a remote using Irmin_mirage
  • over 4 years http: error format
  • over 4 years http: internal error, uncaught exception if too many connections
  • over 4 years Setting compression level to 0 in Irmin_git doesn't disable compression.
  • over 4 years Must `BC` require `HRW`?
  • almost 5 years Issue with recursive merging of deleted values
  • almost 5 years Better IO functions
  • almost 5 years Use Jsont
  • almost 5 years Use Fmt
  • almost 5 years rest api: /view/merge-path returns "ok": null on success
  • almost 5 years rest api: /view/create returns "-" separated string in json output
  • almost 5 years rest api: /view/create is /view/create/create
  • almost 5 years Implement `Irmin.compare_and_set`
  • almost 5 years REST API: JSON parse error when numbers are not in quotes
  • almost 5 years REST API: remove-rec without parameters deletes everything
  • almost 5 years Review `Task.uid`
  • almost 5 years Document the binary format of the REST API
  • almost 5 years More consistent types for params and results in the REST API
  • almost 5 years Review the error path of the REST API
  • almost 5 years Type the JSON fields
  • almost 5 years Document the `.irminconfig` file
  • almost 5 years The `-s` option of the irmin command-line is obscure
irmin open pull requests (View All Pulls)
  • Fix performance problem in lcas
  • First tentative for Ir_funview.
  • Convenience functors to to customize node metadata
  • ptime is used by the mirage backend only, so moving it to depopts
  • Test windows
  • remove unused META files
  • irmin-chunk: Fix content types
  • Use the new ocaml-git in irmin-git
  • Depend on cohttp 1.0.0
irmin list of languages used
irmin latest release notes

1.3.3 (2018-01-03)

  • complete support for OCaml 4.06 (#484, @samoht)
  • support cohttp 1.0 (#484, @samoht)

1.3.2 (2017-11-22)

  • support OCaml 4.06 where -safe-string is enabled by default (#477, @djs55)

1.3.1 (2017-08-25)

  • irmin-http: update to cohttp.0.99 (#467, @samoht)
Other projects in OCaml