Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A git query language

Project description

Gitql is a Git query language.

Gitql is written in Golang by cloudson originally, I reimplemented by python language, and with some enhancements.


pip install gitql


pip install git+


python install


usage: gitql [-h] [-i] [-p PATH] [-s] [-t {table,json}] [-f] [-v] [SQL]

Git query language

positional arguments:
  SQL                   A query to run

optional arguments:
  -h, --help            show this help message and exit
  -i, --interactive     Enter to interactive mode
  -p PATH, --path PATH  The path to run gitql (default ".")
  -s, --show-tables     Show all tables
  -t {table,json}, --type {table,json}
                        The output type format (default "table")
  -f, --format-json     Format the json output
  -v, --version         Show the version of gitql

Compare to Gitql

  • tables, fields, keywords case-insensitive

    Select * From COMMITS wherE author='bob';
  • field message -> summary, full_message -> message changed in commits table

  • * can combined with other fields

    select *, name, full_name from tags;
  • a table footer added similar to mysql

  • keyword NOT added

    select * from tags where not 'RC' in name;
  • limit -1 for all records

    select * from tags limit -1;
  • offset added to limit

    select * from tags limit 5, 5;


    select * from tags limit 5 offset 5;
  • tailing ; is optional

    select * from tags


    select * from tags;
  • value type limitation in where clause removed

    select summary, date from commits where '2016-12-28' < date;


    select * from commits where 1 and 2;

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gitql, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size gitql-1.0.5-py2.py3-none-any.whl (23.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size gitql-1.0.5.tar.gz (21.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page