Canonical page: [Install](https://cloudflavor.io/aemon/docs/install/)
Source snapshot: https://github.com/cloudflavor/aemon/blob/a85ee1d024b81c6373acd86379fe12f15c26a7a5/docs/install.md

# Install

## Prebuilt binaries

Download from the [release page](https://github.com/cloudflavor/aemon/releases). Take
the archive and its `sha256` file from the same release; the URL carries the version, so
nothing here has to.

| platform | artifact | minimum |
|---|---|---|
| Linux x86_64 | `aemon-v<version>-x86_64-unknown-linux-gnu.tar.gz` | glibc 2.17 |
| Linux aarch64 | `aemon-v<version>-aarch64-unknown-linux-gnu.tar.gz` | glibc 2.17 |
| macOS Apple Silicon | `aemon-v<version>-aarch64-apple-darwin.dmg` and `.tar.gz` | macOS 11 |

Apple Silicon only: macOS Intel is not published, and source builds cover it. Which
platforms a given tag carries is listed on that release, not here.

Every archive contains the binary plus `LICENSE` and `NOTICE`, which Apache-2.0 §4
requires for binary redistribution.

```sh
# Linux x86_64. The checksums file name has no version in it, so it always works:
curl -LO https://github.com/cloudflavor/aemon/releases/latest/download/aemon-x86_64-unknown-linux-gnu-checksums.txt
# The archive name does, so take it from the release page and then:
sha256sum -c aemon-x86_64-unknown-linux-gnu-checksums.txt
tar -xzf aemon-v<version>-x86_64-unknown-linux-gnu.tar.gz
install -m755 aemon ~/.local/bin/
```

`releases/latest/download/<asset>` resolves to the newest release, but only for an exact
asset name: the checksums files qualify, the archives embed their version and do not.

Verify before installing: the checksum file covers the tarball beside it.

## macOS

Apple Silicon only; macOS Intel has no artifact. Download the `.dmg`, open it and drag
`aemon` out. Release images are ad-hoc signed rather than notarized — there is no
Developer ID identity in the pipeline yet — so macOS asks for approval on first run
unless a future release carries a stapled notarization ticket:

```sh
xattr -d com.apple.quarantine ~/.local/bin/aemon   # or: System Settings → Privacy & Security
```

Ad-hoc signing is also what a local `cargo build` produces; it is fine for your own
machine and not fine for redistribution.

## From source

Needs a stable Rust toolchain plus a C toolchain for the bundled SQLite and zstd:

```sh
cargo install --path .          # or: cargo build --release --locked
sh scripts/install-macos.sh     # macOS: toolchain check, ad-hoc sign, install
```

The crate ships without `.gitea/` and `scripts/ci/` (CI plumbing and runner-specific
recovery scripts); the corpus recipe (`sources/`, `docs/`) is included.

## First run

```sh
aemon doctor
```

`doctor` reports the database location (`~/.local/share/aemon/aemon.db` by default), the
number of corpora and libraries, the resolved model provider and the remote
configuration. Then build a corpus:

```sh
aemon devdocs add --all        # ~840 versioned corpora, ~4 GB
aemon crate serde@0.9          # one Rust crate, exact version
aemon audit                    # corpus shape, for LLM consumption
```

## Configuration files

All optional, all under `~/.config/aemon/`:

| file | purpose |
|---|---|
| `model.toml` | model providers and roles; see [providers](providers.md) |
| `stack` | libraries you work with, used as a preference by `--auto` (or `$AEMON_STACK`) |
| `remote` | default remote for `aemon --remote` (or `$AEMON_REMOTE`) |
| `token` | HTTP bearer token, mode 600; see [JSON API](json-api.md) |

## Uninstall

The binary is self-contained; the corpus lives in `~/.local/share/aemon/` and the
caches in `~/.cache/aemon/`. Delete those directories to free the space. Nothing
outside them and `~/.config/aemon/` is written.
