Skip to main content

Installation

Nightly build

Ki is under heavy development, so we recommend downloading the most recent nightly build from github.

VS Code Extension

Ki is also available as a Visual Studio Code extension, at https://marketplace.visualstudio.com/items?itemName=ki-editor.ki-editor-vscode.

Build from source with Nix

This is the most reliable installation method as all required dependencies, including system dependencies, will be included automatically.

  1. Ensure that Nix: the package manager is installed.
  2. Clone the project:
git clone https://github.com/ki-editor/ki-editor.git
  1. Run installation:
nix develop --command just install

Build from source without Nix

  1. Ensure the Rust toolchain is installed using rustup.rs.
  2. Use Rust 1.89.0:
rustup default 1.89.0
  1. Clone the project:
git clone https://github.com/ki-editor/ki-editor.git
  1. Run installation:
cd ki-editor
cargo install --locked --path .
  1. The ki binary should be installed.

Use nix flake 1

1. Install ki package

  • with nix profile:
nix profile add github:ki-editor/ki-editor
  • or as part of nix configuration, e.g.:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
ki-editor.url = "github:ki-editor/ki-editor";
};

outputs = { nixpkgs, ki-editor, ... }: {
nixosConfigurations."«hostname»" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ environment.systemPackages = [ ki-editor.packages.x86_64-linux.default ] }
./configuration.nix
];
};
};
}

2. Build tree-sitter grammars

This step is optional as most of the Tree-sitter grammars are already linked at build time.

ki @ grammar fetch && ki @ grammar build

Footnotes

  1. This flake also provides a basic development environment for Ki Editor which can be enabled by nix develop command.