Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Irmin is a distributed database that follows the same design principles as Git
OCaml Other
branch: master

Merge pull request #200 from avsm/example-typos

fix typos in example command line binaries
latest commit ae42dab34d
@samoht samoht authored


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 is to run everywhere, from Linux to Xen unikernels.

Build Status docs


Irmin is packaged with opam:

opam install irmin git cohttp

The git and cohttp packages are needed to compile and install the irmin command-line tool.


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
open Irmin_unix
let store = Irmin.basic (module Irmin_git.FS) (module Irmin.Contents.String)
let config = Irmin_git.config ~root:"/tmp/irmin/test" ~bare:true ()
let prog =
  Irmin.create store config task >>= fun t ->
  Irmin.update (t "Updating foo/bar")  ["foo"; "bar"] "hi!" >>= fun () ->
  Irmin.read_exn (t "Reading foo/bar") ["foo"; "bar"] >>= fun x ->
  Printf.printf "Read: %s\n%!" x;
let () = prog

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

$ ocamlfind ocamlopt -o example -package lwt,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.

Something went wrong with that request. Please try again.