inshellah/doc/building.md
2026-05-21 18:35:25 +10:00

2 KiB

building and installing

inshellah is a rust crate. it builds with stock cargo on any platform rust supports.

with nix

nix build

binary is at ./result/bin/inshellah.

development shell:

nix develop
cargo build --release
cargo test

with cargo

requires rust >= 1.85 (edition 2024).

cargo build --release
cargo test
sudo install -Dm755 target/release/inshellah /usr/local/bin/inshellah

arch linux

sudo pacman -S rust
cargo build --release
sudo install -Dm755 target/release/inshellah /usr/local/bin/inshellah

debian / ubuntu

sudo apt install cargo rustc
# or: rustup install stable
cargo build --release
sudo install -Dm755 target/release/inshellah /usr/local/bin/inshellah

fedora

sudo dnf install cargo rust
cargo build --release
sudo install -Dm755 target/release/inshellah /usr/local/bin/inshellah

post-install setup

index completions from your system prefix(es):

# typical linux system
inshellah index /usr /usr/local

# more workers / different timeout
inshellah index /usr /usr/local --workers 16 --timeout-ms 500

# check what was indexed
inshellah dump

wire up the nushell completer in ~/.config/nushell/config.nu:

$env.config.completions.external = {
    enable: true
    completer: {|spans|
        inshellah complete ...$spans
        | from json
    }
}

see nushell-integration.md for full completer details and runtime-completions.md for on-the-fly resolution of commands not covered by the upfront index.

re-indexing after package changes

inshellah index /usr /usr/local

on nixos, the system index regenerates on every nixos-rebuild. see nixos.md.

development

cargo build           # debug build, faster compile
cargo test            # full test suite
cargo clippy --release

a man binary is useful at runtime as a fallback for locating manpages outside the indexed prefixes — not required for indexing itself.