> For the complete documentation index, see [llms.txt](https://docs.githud.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.githud.net/command-interface/installing-the-cli.md).

# Installing the CLI

## Installing the CLI

The `githud` CLI is a small Rust binary (crate name `githud`, currently at `v0.1.5`) built on [`clap`](https://docs.rs/clap) for argument parsing and [`ed25519-dalek`](https://docs.rs/ed25519-dalek) for all cryptographic operations. It has three jobs:

1. Generate and store your Ed25519 identity locally.
2. Sign and send the handful of Githood-specific API calls (registration, repo creation).
3. Transparently forward every other Git command to your system's real `git` binary.

Pick your platform below.

> ℹ️ **Note:** The install script and release URLs below (`githud.net/install.sh`, `githud.net/download`, `github.com/githudnet/githud-cli`) are placeholders following this project's existing domain conventions (`docs.githud.net`, `github.com/githudnet`). Swap them for your actual release/hosting locations before publishing.

### macOS

The simplest path is via a Homebrew-style install script, or building from source if you already have Rust installed.

**Option A — Install script**

```bash
curl -fsSL https://githud.net/install.sh | bash
```

**Option B — Build from source (requires the Rust toolchain)**

```bash
git clone https://github.com/githudnet/githud-cli.git
cd githud-cli
cargo install --path .
```

Verify:

```bash
githud --version
```

> 💡 **Tip:** If `githud: command not found` after a `cargo install`, make sure `~/.cargo/bin` is on your `PATH`. Add `export PATH="$HOME/.cargo/bin:$PATH"` to your shell profile if it isn't.

### Linux

```bash
curl -fsSL https://githud.net/install.sh | bash
```

The install script detects your architecture, downloads the appropriate prebuilt binary, and places it on your `PATH` (typically `/usr/local/bin` or `~/.local/bin`). If you'd rather build from source, the same `cargo install --path .` flow from the macOS section works identically on Linux — the CLI has no platform-specific dependencies beyond the Rust standard library and `reqwest`'s `rustls-tls` backend (so no system OpenSSL requirement).

### Windows

1. Download the latest `.zip` release from the [downloads page](https://githud.net/download).
2. Extract it to a folder of your choice (e.g. `C:\Tools\githud\`).
3. Add that folder to your `PATH`:
   * Open **System Properties → Environment Variables**.
   * Under **User variables**, select `Path` → **Edit** → **New**.
   * Add the path to the extracted folder.
4. Open a new terminal (PowerShell or Command Prompt) and verify:

```powershell
githud --version
```

> ⚠️ **Warning:** Windows Defender or corporate antivirus software may flag a freshly downloaded, unsigned CLI binary. If `githud.exe` is blocked, right-click the file → **Properties** → check **Unblock** at the bottom of the **General** tab.

### Building From Source (Any Platform)

If you're contributing to the CLI itself, or want a completely reproducible build:

```bash
git clone https://github.com/githudnet/githud-cli.git
cd githud-cli
cargo build --release
```

The compiled binary will be at `target/release/githud` (or `target\release\githud.exe` on Windows). Copy it anywhere on your `PATH`.

### Confirming Everything Works

```bash
githud --help
```

You should see the top-level command groups:

```
Usage: githud <COMMAND>

Commands:
  auth  Authentication commands
  repo  Repository commands
  clone Clone a repository
  help  Print this message or the help of the given subcommand(s)
```

If that output looks right, move on to generate your first identity.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.githud.net/command-interface/installing-the-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
