Getting started

How to install and use Genji

Prerequisites

Genji requires at least Go 1.12.

Installation

To install the Genji database, run this command:

go get github.com/genjidb/genji

Golang API documentation

To learn how to embed Genji in your Go code, follow the instructions in the Go package documentation.

Try it out!

To try Genji without writing code, you can use the Genji command-line shell.

First, install it:

go get github.com/genjidb/genji/cmd/genji

To open an in-memory database, simply type:

genji

You can then enter your SQL queries directly in the shell.

It is also possible to create an on-disk database, using either BoltDB or Badger.

On-disk database using BoltDB

Run the genji command followed by the name of the database file of your choice.

genji my.db

On-disk database using Badger

Run the following command by replacing pathToDBDir by the directory of your choice.

genji --badger pathToDBDir

Next step

Once Genji is setup, follow the Genji SQL chapter to learn how to run queries.