kons is a package manager and build system for Scheme, inspired by Cargo.
- No complicated setup to point out where libraries are; kons discovers
define-libraryand R6RSlibraryforms with akons.scmmanifest and a transitivekons.lock. - One tool across many Schemes: drive the manager with Capy, Gauche, GNU Guile, or Chibi Scheme, and run target packages on Chez Scheme, Sagittarius, STklos, Kawa, Loko, Skint, Cyclone, MIT/GNU Scheme, Mosh, and IronScheme when the dialect matches.
- Translate straightforward R7RS
define-libraryfiles into generated R6RS.slsfiles so R7RS packages run on R6RS-only implementations. - Consume packages out of the box from the kons registry, Akku.scm archives, and Snow snowballs, plus local paths, Git, and system deps — no separate tool needed.
- Workspaces, features, build hooks, vendoring, and signed registry metadata for repeatable, offline-capable builds.
kons itself needs a Scheme implementation that can run its manager
library. It is developed and tested with Capy, Gauche, GNU Guile, and
Chibi Scheme. Network operations use curl, and Git sources use git
when available. Target packages can target a much wider set of
implementations (see below); kons only needs one of the manager
implementations installed to drive them.
kons can run itself on:
kons can drive target packages on:
- Capy
- Chez Scheme
- Gauche
- GNU Guile
- Chibi Scheme
- Sagittarius
- STklos
- Kawa
- Loko
- Skint
- Cyclone
- MIT/GNU Scheme
- Mosh
- IronScheme
From this repository:
./install.sh --kons-home "$HOME/.kons" --scheme capy --non-interactiveAdd kons to your shell:
echo '. "$HOME/.kons/env"' >> ~/.bashrc
echo '. "$HOME/.kons/env"' >> ~/.zshrc
echo 'source "$HOME/.kons/env.fish"' >> ~/.config/fish/config.fishPick a default Scheme:
export KONS_SCHEME=guileYou can also select a Scheme per command:
kons --scheme gosh testOther useful install.sh flags: --source DIR to install from a local
checkout, --tarball-url URL / --repo URL / --ref REF to control
where the source comes from, and --prefix DIR as an alias for
--kons-home.
How to get started with a new project:
- Run
kons new helloto create a new project from a template, thencd helloandkons run. For an existing folder, runkons init .. For a library-only package, runkons new my-lib --lib. - Run
kons add example/base --version ^1.2to add a registry dependency. Use--akkufor Akku packages,--snowfor Snow packages,--pathfor local packages,--gitfor Git sources, and--systemfor dependencies provided by the Scheme implementation. - Run
kons updateto resolve dependencies and writekons.lock.kons update --upgradeselects newer compatible versions. Runkons fetchto download missing dependencies. - Run
kons run,kons test,kons bench,kons build,kons repl, orkons check. Pass arguments to your program after--, e.g.kons run -- --name Ada. - Run
kons build --locked,--offline, or--frozenfor repeatable CI builds.kons vendorcopies locked registry deps into a vendor tree for fully offline builds.
The default registry is https://kons.playxe.org. Configure alternate
registries and signing keys with kons registry ... or in
$KONS_HOME/config/registries.scm.
When you have a package you want to share, log in and publish:
kons login --registry local --token kons_...
kons package
kons publish --registry localMore details, including the full command list, manifest fields, workspaces, features, and build hooks, are in the docs:
kons speaks the Akku.scm and Snow formats directly and
fetches their packages out of the box. You do not need akku or a Snow
client installed. kons has its own readers, resolvers, and verified
materializers for each, kept in src/kons/akku/ and src/kons/snow/.
Akku.scm is a language package manager for Scheme that
distributes R6RS and R7RS libraries from https://archive.akkuscm.org/.
kons consumes Akku packages with --akku:
kons add --akku srfi-1 --version ^1.0
kons add --akku '(chibi match)' --version 0.7.0
kons add --akku srfi-1 --registry akkuAkku archive indexes are verified against trusted OpenPGP keyrings from
$KONS_HOME/config/akku/keys.d (bundled keys ship in
src/kons/akku/keys.d/). Source payloads are materialized from locked
metadata: URL tarballs are SHA-256 checked, Git sources are checked out
to the locked revision, and directory sources are copied only from safe
paths. Metadata and source caches live separately from the kons
registry under $KONS_HOME/store/akku/. kons consumes Akku packages
but does not publish to the Akku registry — that stays with akku publish.
Snow (snow-fort.org) is the long-running R7RS package repo at
https://snow-fort.org/s/repo.scm. kons consumes Snow packages with
--snow, using Scheme list names:
kons add --snow retropikzel/system --version ^1.0
kons add --snow '(chibi match)' --version 0.7.0
kons add --snow retropikzel/system --registry https://snow-fort.org/s/repo.scmSnow repository metadata is cached under $KONS_HOME/store/snow/metadata,
and snowballs are checksum-verified and extracted under
$KONS_HOME/store/snow/sources. Offline and frozen commands reuse those
caches. As with Akku, kons consumes Snow packages but does not publish
to Snow.
| kons | Akku.scm | Snow (snow-fort) | |
|---|---|---|---|
| Primary focus | Build system + package manager (Cargo-style) | Package manager + index | Package index (snowballs) |
| Package sources | kons registry, Akku, Snow, Git, path, system | Akku archive | Snow repo |
| Manifest | kons.scm (package/workspace) |
Akku.scm |
none (per-package metadata) |
| Lockfile | kons.lock, transitive |
akku.lock |
none |
| Transitive semver solving | yes | partial | no |
| Run/test/bench/build/repl | yes, per implementation | install into .akku, you run |
install snowballs, you run |
| R7RS → R6RS translation | yes, generated .sls |
yes (R7RS for R6RS impls) | no |
| Multi-implementation run targets | 14 runtimes | several, via .akku/env |
several |
| Workspaces, features, build hooks | yes | no | no |
| Vendoring / offline / frozen | yes | offline cache | cache only |
| Signed metadata | kons registry + Akku OpenPGP | OpenPGP | no |
| Publish target | kons registry | Akku registry | Snow (out of scope for kons) |
| Implementations that run the tool | Capy, Gauche, GNU Guile, Chibi Scheme | GNU Guile, Chez Scheme, Loko | snow-chibi via chibi-scheme |
Pros:
- One manifest + lockfile gives transitive solving, repeatable builds, and offline/vendored layouts.
- Drives 14 target runtimes from a single manager, with R7RS→R6RS translation for R6RS-only implementations.
- Reads Akku and Snow packages natively, so existing libraries work without a second tool.
- Workspaces, features, build hooks, signed registry metadata, and
kons vendorfor frozen CI.
Cons:
- The kons registry is newer and smaller than Akku or Snow; reach is built on top of those indexes for now.
- kons does not publish to Akku or Snow — use
akku publishor the Snow process for those. - The manager itself only runs on Capy, Gauche, GNU Guile, and Chibi Scheme (target packages can still use the wider set).
- R7RS→R6RS translation covers a portable subset; unsupported forms
such as
(scheme time),(scheme load), and(scheme repl)are reported, not silently broken.
Pros:
- Established R6RS/R7RS archive with OpenPGP-signed indexes.
- Converts R7RS libraries for R6RS implementations and exposes them to
many Schemes via
.akku/env. - Lockfile and per-project
.akkusandbox.
Cons:
- No Cargo-style workspaces, features, build hooks, or vendoring.
- Tooling runs only on GNU Guile, Chez Scheme, or Loko.
- No built-in run/test/bench/build command matrix across runtimes.
Pros:
- Long-running R7RS repository with broad implementation coverage.
- Simple snowball distribution that many Schemes can consume directly.
Cons:
- No manifest, lockfile, or transitive version solving.
- No signing, no build system, no run/test commands.
- No workspace, feature, or offline-vendoring story.
kons is written in portable R7RS (define-library) modules under
src/. The entry point is src/main.scm, which calls
(kons core); that delegates to (kons commands), which wires up every
subcommand. The tree is organized so each concern has its own library:
src/kons/core.sld,commands.sld,options.sld,ui.sld— command dispatch, argument grammar, and user-facing output.src/kons/commands/— one library per subcommand (add,build,check,fetch,install,publish,registry,run,test,vendor,verify, etc.), sharingframework.sld.src/kons/actions/— the work behind each command: dependency resolution, lockfile and manifest handling, library discovery, scanning, packaging, and publishing.actions/activation/covers build hooks, generated libraries, and R7RS→R6RS translation;actions/registry/covers registry HTTP routes, trust, and display.src/kons/manifest.sld,lock.sld,resolver.sld,semver.sld,features.sld,names.sld— manifest and lockfile data models, version solving, feature selection, and package-name handling.src/kons/registry.sld,library-discovery.sld,runner.sld,jobs.sld,util.sld,implementation.sld— registry client, source-tree library discovery, program runner, parallel jobs, shared utilities, and implementation detection.src/kons/implementation/— per-implementation adapters (chez,guile,gauche,chibi,capy,sagittarius,stklos,kawa,loko,skint,cyclone,mit,mosh,ironscheme).src/kons/dep/— dependency source backends:registry,akku,snow,git,path,system,workspace,store,shared.src/kons/akku/andsrc/kons/snow/— Akku and Snow metadata formats, resolvers, lock/manifest readers, and the Akku OpenPGP keyring underakku/keys.d/.src/kons/compat/— small compatibility shims forfiles,threads, andjsonacross manager implementations.
Add a new subcommand by dropping a library in commands/ and
actions/, then registering its maker in commands.sld.
- Email: adel.prokurov@gmail.com
- Telegram: @aprokurov
- IRC:
playXon#schemeat Libera.Chat. - kons on GitHub for issues and source.
- The default registry lives at
https://kons.playxe.org.
kons is free software released under the terms of the BSD 3-Clause license. See LICENSE for the full text. The license covers the source code of kons itself. Mere use of kons as a build tool does not place any restrictions on your source code, in the same way that CMake or GNU automake do not impose their licenses on the projects that use them.
If licensing is important to you, review the license of any packages
you install into your project. Kons reports package licenses via
kons license-scan and gathers copyright notices into a notices
directory, but this information may be incomplete.