Qi - Package Manager for Common Lisp
Qi is a package manager for Common Lisp.
The State of Qi
Qi is a new project. There are still bugs. There are still missing features. It might not work sometimes. It has not been tested on multiple Lisp implementations (only SBCL). Pull-requests, issues, feedback are appreciated.
View the HTML version of this documentation here.
Qi has a few Common Lisp dependencies, but they are all bundled with
the repository to allow Qi to bootstrap itself (see
for a full list).
- Clone Qi anywhere:
git clone https://github.com/CodyReichert/qi.git
- Load Qi when SBCL starts by adding these lines to your
To test if Qi is installed correctly, run the following the a REPL:
See docs/TODO.org and
bin/ for some work that can/should be done
around this part.
Using Qi for a project
This section covers using Qi for a single project.
The only requirement to installing a systems dependencies with Qi,
qi.yaml specifies a projects dependencies. For an example of
what this looks like, checkout out Qi’s qi.yaml.
Two required pieces to the
qi.yaml are name and packages. So
a basic project would look like this:
name: my-project packages: - name: zlib branch: import-1.1.1 - name: clack url: https://github.com/fukamachi/clack/archive/master.tar.gz - name: postmodern url: https://github.com/marijnh/Postmodern.git tag: v1.19
Above there are three types of packages: Manifest, tarball, and git.
- Manifest: “Known” packages from the Qi manifest.
- Tarball: An HTTP URL to tarball.
- Git: A git repository.
- Mercurial: A link to a mercurial repository.
For manifest and git packages, you can optionally specify a tag, revision, or branch.
With the above qi.yaml in your project, you can run the following to install and load the systems:
* (load "myproject.asd") * (qi:install :myproject)
qi:install will also load the dependencies into the system for
you, using ASDF. If you don’t want Qi as a runtime dependency of
your application, you can alternatively add something like this to
(asdf:initialize-source-registry `(:source-registry :ignore-inherited-configuration (:tree (:here ".dependencies/packages/"))))
In addition to
qi:install, you can also install project
dependencies from the command-line:
qi --install path/to/qi.yaml # the path is unnecessary if qi.yaml is in the working directory
Qi takes care of any transitive dependencies and will let you know
of any that it could not install. In a case where Qi can not
install some dependencies, add direct links to those packages in
Using Qi for global packages
You can also manage global packages with Qi. This is useful for downloading and install packages that you want to always have available. There’s a simple interface, and two commands are the most useful:
* (qi:install-global :cl-project)
install-global installs the package into the global
package directory (
share/qi/packages). The installed package is
made available in the current session.
* (qi:up :cl-project)
up loads a package that’s in your global package
directory and makes it available in the current session.
Qi’s API is composed of a few commands, documented below:
Prints some information about Qi to standard-output. If this prints, Qi is installed correctly.
Installs a system and it’s dependencies. All dependencies are
installed local to the project’s
- For any dependencies that are not already available, Qi will try to download them from the Manifest. If all else fails, it will print to standard-output what packages could not be installed.
Installs a system to the global package directory
share/qi/packages. The system should be from the Manifest. The
system is made available in the current session.
(qi:install-global :system &optional version)
To make a global system available at any time, you can use =(qi:up :system)=
Have ASDF load a system to be available in the current session.
This is the equivalent of running =(asdf:load-system :system)=
Generate a new project scaffold.
Generate a qi.yaml for an existing project.
Publish a new package to the Qi Manifest
The Qi Manifest is a list of known packages - which makes it easy to simply install packages by their name. Qi’s Manifest was initially seeded by Quicklisp’s projects which means that any project you can find in Quicklisp can be found in Qi.
Adding a package to the Qi Manifest
Any and all packages are welcome in the Qi Manifest. The only requirement is that it is a lisp project that is asdf-loadable.
To add a package to the manifest, submit a pull-request at https://github.com/CodyReichert/qi-manifest, or send a patch file to email@example.com.
See docs/TODO.org for some work to be done in this
area. Ideally, we have
recipes/ that contains the information
about each Qi package. That way a new recipe can be added and the
Manifest can be updated.
The Qi CLI provides a few basic commands (more coming soon!). Make
bin is in your
$PATH, or move
bin/qi into your
$ qi --help For info on the available commands:
λ qi -h Qi - A simple, open, free package manager for Common Lisp. Usage: qi [-h|--help] [-u|--upgrade] [-m|--update-manifest] [-i|--install] [Free-Args] Available options: -h, --help Print this help menu. -u, --upgrade Upgrade Qi (pull the latest from git) -m, --update-manifest Update the Qi manifest -i, --install Install packages, named on the command-line or specified in qi.yaml If named on the command-line, packages will be installed globally into the Qi shared packages directory. If specified in a qi.yaml file, packages will be installed into the local project's .dependencies directory. Issues https://github.com/CodyReichert/qi
PRs and Issues are extremely welcomed and will likely all be merged or addressed. See the docs/TODO.org for a list of tasks that I’d like to see done. Make a PR or start a conversation if there’s anything you’d like to see.
If you can, add new tests to cover the changes you make! You can
run tests locally with Roswell (
run-prove) or with
bin/qi -i prove make t
With any PR, add your name to the
Contributors section below.
- Cody Reichert (firstname.lastname@example.org)
- Nicolas Lamirault (@nlamirault)
- Alex Dunn (@dunn)
Copyright (c) 2015 Cody Reichert (email@example.com)