# Installation
`jan` is distributed as the Rust crate **`jan-cli`**. The binary on `PATH` is **`jan`**. You still need a **spec tree** on disk — the binary does not ship commands of its own.
## Prerequisites
- A Rust toolchain with `cargo` (stable, edition 2021) for install-from-source or crates.io
- Optional, depending on the tree you run:
- `bash` / `sh` / `zsh` for shell leaves
- `python3` and `uv` for `packages.uv`
- `node` and `pnpm` for `packages.pnpm`
- `java` / `gradle` / `kotlinc` for `packages.gradle` and `exec.kotlin`
- `python3` for `scripts/jan-install.sh` (bundle verification)
## From crates.io
```bash
cargo install jan-cli
jan --version
```
Then prefer a reviewed tree:
```bash
jan use /path/to/dotfiles/jan
jan --help
```
## From source (this monorepo)
```bash
cd jan-cli
cargo build --release
./target/release/jan use /path/to/dotfiles/jan
./target/release/jan --help
```
Project scripts (from the monorepo root):
```bash
m run jan-cli build
m run jan-cli test
m run jan-cli run
```
## Install a trusted spec bundle
Export a reviewed personal tree, then import it on another machine:
```bash
jan use /path/to/dotfiles/jan
jan bundle -o ~/scripts-jan.zip
bash /path/to/jan-cli/scripts/jan-install.sh ~/scripts-jan.zip
# → verifies archive structure and manifest hashes, then unpacks
# to ~/.config/jan/scripts/; this does not authenticate the publisher
# Review the extracted YAML before making it active.
jan use ~/.config/jan/scripts
jan --help
```
Or prefer a hosted HTTPS bundle when you already know its SHA-256:
```bash
jan use https://example.com/scripts-jan.zip --sha256 <64-hex>
```
Full flow: [Portable trees](PORTABLE_SCRIPTS.md).
## After install
| Binary | `jan --version` |
| Preference | `jan use --show` |
| Live commands | `jan --help` |
| Docs site (from this repo) | `./serve.sh` or `m run jan-cli docs-serve` |