> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jjhub.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the JJHub CLI

# Installing the JJHub CLI

The JJHub CLI (`jjhub`) is a Bun-compiled binary (TypeScript) that operates in two modes:

* **Local mode**: Uses the `jj` CLI directly for repository operations
* **Remote mode**: Communicates with the JJHub API for cloud operations

## Prerequisites

The JJHub CLI requires **Jujutsu (jj)** to be installed and available on your `PATH`.

* **macOS**: `brew install jj`
* **Linux/Other**: `cargo install jj-cli` or see the [jj installation guide](https://jj-vcs.github.io/jj/latest/install-and-setup/).

## macOS and Linux

The JJHub CLI provides a unified installation script that automatically detects your operating system and architecture (x86\_64 or arm64).

```bash theme={null}
curl -fsSL https://get.jjhub.tech/cli | bash
```

## Verify Installation

```bash theme={null}
jjhub --version
jjhub auth status
```

## Configuration

The CLI reads configuration from:

1. `JJHUB_TOKEN` environment variable (for authentication)
2. `~/.config/jjhub/config.toon` (for defaults)
3. `.jjhub/config.toon` (repository-level settings)

## Shell Completion

```bash theme={null}
# bash
jjhub completion bash >> ~/.bashrc

# zsh
jjhub completion zsh >> ~/.zshrc

# fish
jjhub completion fish > ~/.config/fish/completions/jjhub.fish
```
