# How to Install Tuicr: 7 Methods from Official Script to Source Build

> Install Tuicr quickly with our official script or explore 7 advanced methods. Get the latest release effortlessly and secure your setup. Start using Tuicr today!

- Repository: [Almog Gavra/tuicr](https://github.com/agavra/tuicr)
- Tags: getting-started
- Published: 2026-08-01

---

**The fastest way to install Tuicr is to run `curl -fsSL tuicr.dev/install.sh | sh`, which downloads the latest release, verifies its SHA-256 digest, and atomically swaps the binary into place using the logic in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs).**

Tuicr is a Rust-based CLI tool hosted at `agavra/tuicr` that enables terminal-driven code review workflows. Whether you need a one-line installer for CI pipelines or a package manager integration for development machines, this guide covers every installation method backed by the actual source code implementation.

## Official Install Script (macOS & Linux)

The recommended method uses the official install script:

```bash
curl -fsSL tuicr.dev/install.sh | sh

```

This script delegates to Tuicr's built-in updater. According to the source code in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs) (lines 24-55), the installer fetches the release asset, verifies its SHA-256 digest, extracts the binary using `extract_binary`, and performs an atomic `swap_executable` to replace the running process without leaving the system in a broken state.

## Package Manager Installation

### Homebrew (macOS and Linux)

Install via the official tap:

```bash
brew install agavra/tap/tuicr

```

Homebrew tracks versions initially, but subsequent updates leverage Tuicr's self-update mechanism in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs) rather than Homebrew's native upgrade path.

### Cargo (Rust Toolchain)

Install from crates.io:

```bash
cargo install tuicr

```

This compiles the entry point defined in [`src/lib.rs`](https://github.com/agavra/tuicr/blob/main/src/lib.rs) (lines 1-4), which re-exports the public API including the `update` functionality.

### Mise

For version management with Mise:

```bash
mise use github:agavra/tuicr

```

Mise places the binary on your PATH; subsequent updates delegate to `tuicr update`.

### Nix

Temporary execution without installation:

```bash
nix run github:agavra/tuicr

```

Persistent installation:

```bash
nix profile install github:agavra/tuicr

```

The Nix package builds from source using [`src/lib.rs`](https://github.com/agavra/tuicr/blob/main/src/lib.rs) as the library entry point.

## Manual Installation Methods

### Pre-built Binaries

Download release assets directly from the GitHub Releases page. After downloading:

```bash
chmod +x tuicr
./tuicr

```

The binary uses the same self-update path as the install script, located in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs).

### Build from Source

Clone and install locally:

```bash
git clone https://github.com/agavra/tuicr.git
cd tuicr
cargo install --path .

```

The CLI entry point resides in [`src/main.rs`](https://github.com/agavra/tuicr/blob/main/src/main.rs) (lines 1-5), which wires subcommands like `update`, `review`, and `pr`.

## How Tuicr Self-Updates Work

After installation, keep Tuicr current with:

```bash
tuicr update                # Update to latest

tuicr update 0.18.0        # Pin to specific version

```

The update logic detects your installation method via `detect_install_method` in [`src/update/installation.rs`](https://github.com/agavra/tuicr/blob/main/src/update/installation.rs). If a package manager (Homebrew, Cargo, Mise, or Nix) owns the executable, Tuicr delegates to it. Otherwise, it downloads the release asset, verifies the SHA-256 hash, and atomically swaps the binary using `update_installed` defined in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs).

Example of programmatic update usage:

```rust
use tuicr::update::install::update_installed;

fn main() -> Result<(), tuicr::TuicrError> {
    let outcome = update_installed()?;
    println!("{outcome}");
    Ok(())
}

```

## Summary

- **Fastest install**: `curl -fsSL tuicr.dev/install.sh | sh` uses the atomic swap logic in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs).
- **Package managers**: Homebrew, Cargo, Mise, and Nix all install the same binary but handle initial placement differently; updates still route through `tuicr update`.
- **Self-updating**: The `tuicr update` command detects your install method via [`src/update/installation.rs`](https://github.com/agavra/tuicr/blob/main/src/update/installation.rs) and either delegates to the package manager or performs a SHA-256 verified binary swap.
- **Source builds**: Compile from [`src/main.rs`](https://github.com/agavra/tuicr/blob/main/src/main.rs) for development or customization using `cargo install --path .`.

## Frequently Asked Questions

### Does Tuicr support automatic updates on all platforms?

Yes. The `tuicr update` command works across all installation methods. As implemented in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs), it verifies SHA-256 digests before extracting and atomically swapping the binary. If you installed via Homebrew, Cargo, Mise, or Nix, it delegates to those managers instead of self-modifying.

### Can I install Tuicr without root permissions?

Yes. The official install script and Cargo method install to user directories (`~/.cargo/bin` or `~/.local/bin` by default). The `swap_executable` function in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs) only requires write permissions to the directory containing the current binary, not system-wide access.

### How do I pin Tuicr to a specific version?

Use `tuicr update <version>` to install a known-good release. For example, `tuicr update 0.18.0` downloads and verifies that specific version using the same SHA-256 validation logic in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs). Package manager users can also use their native pinning (e.g., `brew pin agavra/tap/tuicr`).

### Is the install script safe to pipe into sh?

The script at [`tuicr.dev/install.sh`](https://github.com/agavra/tuicr/blob/main/tuicr.dev/install.sh) downloads the binary and immediately verifies its SHA-256 checksum using the verification routines in [`src/update/install.rs`](https://github.com/agavra/tuicr/blob/main/src/update/install.rs) (lines 24-55). However, if you prefer, you can download the script first with `curl -fsSL tuicr.dev/install.sh -o install.sh`, audit it, and then run `sh install.sh` manually.