Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Install

kanri is a single static-ish binary, no runtime beyond what’s listed per method below. Pick your OS.

Status: apt, NixOS, and building from source all work today, against the real v0.1.1 tag. Neither AUR nor COPR is published yet (see those sections) — both packages are ready, submission just needs an aur.archlinux.org account and a Fedora Account System account respectively.

One line, any distro

curl -fsSL https://kanri.management/install.sh | sh

Reads /etc/os-release and runs the same commands documented in each section below for your distro — nothing it does isn’t also written out plainly somewhere on this page. Prints every command before running it. Atomic/immutable Fedora images (Bazzite, Silverblue, Kinoite, other uBlue-style builds) get routed to Nix automatically instead of rpm-ostree, since layering a dev toolchain onto those isn’t the right call — see the Fedora section below for why.

If you’d rather not pipe a script into a shell — a completely reasonable thing to not want to do — every section below is the same thing, by hand.

Arch Linux

yay -S kanri

(Coming soon — not yet published to the AUR. Until then, build from source below, or use the PKGBUILD directly:)

git clone https://git.kanri.management/jaghack/kanri.git
cd kanri/packaging/aur
makepkg -si

Ubuntu / Debian

curl -fsSL https://kanri.management/apt/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/kanri.gpg
echo "deb [signed-by=/usr/share/keyrings/kanri.gpg] https://kanri.management/apt stable main" | sudo tee /etc/apt/sources.list.d/kanri.list
sudo apt update && sudo apt install kanri

Verified working end-to-end on a real Debian 13 system, including the apt update/apt install steps exactly as written above — not just a built .deb, the actual hosted, signed repository. Only tested on Debian specifically; Ubuntu should work identically but hasn’t been checked.

Fedora (COPR)

sudo dnf copr enable jaghack/kanri
sudo dnf install kanri

(Coming soon — not yet published to COPR; needs a Fedora Account System account this repo/VPS can’t create on its own. Until then, the real, verified spec builds and installs directly:)

git clone https://git.kanri.management/jaghack/kanri.git
cd kanri
mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS
git archive --format=tar.gz --prefix=kanri-0.1.1/ v0.1.1 -o ~/rpmbuild/SOURCES/kanri-0.1.1.tar.gz
cp packaging/fedora/kanri.spec ~/rpmbuild/SPECS/
rpmbuild -bb ~/rpmbuild/SPECS/kanri.spec
sudo dnf install ~/rpmbuild/RPMS/x86_64/kanri-0.1.1-1*.rpm

Verified end-to-end against a real rpmbuild -bb (see packaging/fedora/kanri.spec’s own header comment) — no Fedora box was available to test on, but rpmbuild itself doesn’t care what distro runs it, and the resulting RPM’s file layout and binary were confirmed correct by hand. Targets COPR rather than Fedora’s own official repos on purpose: Commons Clause isn’t an OSI/Fedora-approved license, which COPR (a personal-project hosting service, not the distro’s own repo) is fine with and Fedora proper wouldn’t be.

On an atomic/immutable Fedora image (Bazzite, Silverblue, Kinoite, or another uBlue-style build): don’t use either of the above. rpm-ostree install layers packages onto your base image and needs a reboot to take effect — a heavy way to get one CLI tool — and these images frequently don’t ship cargo/clang at all, so rpmbuild won’t even get that far. Use Nix instead (see below) — it installs under its own /nix prefix and never touches the base image, so it works exactly the same here as on any other distro:

NIXPKGS_ALLOW_UNFREE=1 nix run --impure git+https://git.kanri.management/jaghack/kanri.git

NixOS (flake)

kanri’s license (Apache-2.0 + the Commons Clause — see License) isn’t “free” in nixpkgs’ own sense (it restricts selling the software), so Nix needs an explicit opt-in the same way it would for any other restricted-license package:

NIXPKGS_ALLOW_UNFREE=1 nix run --impure git+https://git.kanri.management/jaghack/kanri.git

That runs it once, nothing persisted. To install it for real via environment.systemPackages, don’t just add kanri.packages.${system}.default as an input and set nixpkgs.config.allowUnfreePredicate in your own config — that looks right but doesn’t actually work: kanri’s flake constructs its own pkgs internally (import nixpkgs { inherit system; }), a separate instance from the one your NixOS config’s nixpkgs.config applies to, so your predicate never reaches it and you’ll hit the same “Refusing to evaluate package… unfree license” error regardless. (Confirmed by actually hitting this building kanri into a real host config, not theoretical.) Build it against your own pkgs instead, using the flake only as a source:

{ config, pkgs, lib, ... }:
let
  kanriSrc = builtins.getFlake "git+https://git.kanri.management/jaghack/kanri.git?rev=<commit-of-the-tag-you-want>";
in
{
  environment.systemPackages = [
    (pkgs.rustPlatform.buildRustPackage {
      pname = "kanri";
      version = "0.1.1";
      src = kanriSrc;
      cargoLock.lockFile = "${kanriSrc}/Cargo.lock";
      nativeBuildInputs = with pkgs; [ pkg-config llvmPackages.clang ];
      LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
      meta.license = { free = false; };
    })
  ];
  # Then either set this (simplest), or scope allowUnfreePredicate to
  # just "kanri" the way the flake-consumption snippet above tried to —
  # scoping works fine here, since this *is* the pkgs instance it's
  # checked against:
  nixpkgs.config.allowUnfree = true;
}

Use a real commit hash for rev (a mutable ?ref=v0.1.1 forces --impure on every future nixos-rebuild switch), e.g. via git ls-remote https://git.kanri.management/jaghack/kanri.git v0.1.1.

Build from source (any distro, works today)

Needs a Rust toolchain (edition 2024, so a reasonably recent one) and libclang (one dependency’s build script needs it for bindgen). Don’t have either already? rustup gets you cargo — it installs to ~/.cargo/~/.rustup, no root or system package manager involved — but libclang itself does need a system package (clang/llvm or your distro’s equivalent), which rustup won’t provide.

git clone https://git.kanri.management/jaghack/kanri.git
cd kanri
cargo build --release
./target/release/kanri

Or with Nix, no system Rust or libclang install needed at all — the one path that works unmodified even on an atomic/immutable distro (Bazzite, Silverblue, Kinoite, other uBlue-style images) where neither is preinstalled and layering them on isn’t the right call:

nix develop   # or: nix-shell
cargo run

After installing

kanri works with zero config. Some features need one-time, deliberate setup you do yourself (kanri never grants privilege on its own) — see wireguard.md for WireGuard status/control and capture.md for packet capture. Everything else (network devices, processes, memory, disk, hardware, Tailscale) works out of the box.

See config.md for configuration and keybindings.md for the full keybinding reference.