Installation

Python library

Requirements

  • Python 3.10 or later.

  • pygit2 – Python bindings for libgit2 (pip install pygit2).

  • git-bug (v0.10 or later) must be on your $PATH if you want to create or modify bugs, or to use the fast CLI-cache listing path. Reading existing bugs only needs pygit2. ezgb is tested with git-bug v0.10.1 and v0.12.0.

Install from source

Clone the repository and install in editable mode:

git clone https://git.kernel.org/pub/scm/utils/ezgb/ezgb.git
cd ezgb
pip install -e .

To also install the development tools (pytest, mypy, ruff, pyright, and ty), which live in a PEP 735 [dependency-groups] table:

# with uv (installs the project and the dev tools)
uv sync

# or with pip 25.1 or later
pip install -e . --group dev

Verify

Open a Python shell and check that the import works:

>>> import ezgb
>>> ezgb.GitBugRepo
<class 'ezgb.GitBugRepo'>

If you plan to create or modify bugs, make sure git-bug is available:

$ git bug version
git-bug v0.12.0 4ea4534b3a2e go1.27.3 linux amd64

Lua library

The Lua library is read-only and uses luagit2 for git object access.

Requirements

  • Lua 5.1 or later (including LuaJIT).

  • luagit2 (lua-git2) – libgit2 bindings for Lua.

  • luaossl – OpenSSL bindings (for SHA-256 operation hashing).

  • lua-cjson or lua-json – JSON parsing.

Install with luarocks

First install lua-git2 from source. The rockspecs on luarocks.org cannot be used, because they fetch from a git:// URL that GitHub no longer serves. You need the libgit2 development headers (for example libgit2-devel on Fedora):

git clone https://github.com/libgit2/luagit2
cd luagit2
luarocks make rockspecs/lua-git2-scm-0.rockspec

The lua-git2 rockspec only allows Lua versions below 5.5. It builds and works on Lua 5.5 too; to install it there, add --deps-mode=none to the luarocks make command.

Then, from the ezgb source tree:

cd ezgb
luarocks make lua-ezgb-scm-1.rockspec

This installs ezgb.lua to the standard Lua module path (typically /usr/share/lua/5.4/ or ~/.luarocks/share/lua/5.4/), together with lua-cjson and luaossl. If luarocks cannot find the OpenSSL headers when it builds luaossl, tell it where they are, for example with CRYPTO_DIR=/usr OPENSSL_DIR=/usr.

Verify

$ lua -e 'local ezgb = require("ezgb"); print("ok")'
ok