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

# Install and Set Up the CLI

> Install the corestory command-line tool, add a model key, and index your first repository.

## Requirements

| Platform | Supported |
| - | - |
| **macOS** | 12 Monterey or later, Apple silicon |
| **Linux** | x64 |
| **Windows** | 10 or later, x64 |

Other platforms, including Intel Macs and Linux on Arm, are not supported yet.

You also need:

* **A model key** from OpenAI, Azure OpenAI, or Anthropic. Indexing makes model calls on that key, and you pay your provider for them.
* **A local repository.** A Git repository works best. A plain folder of source files also works.

> [!TIP]
>
> CoreStory also ships a desktop app for macOS and Linux that walks you through the same setup. The download page is [get.corestory.ai](https://get.corestory.ai). This page covers the command-line tool.

***

## Step 1: Install the CLI

### One-line install

```bash macOS / Linux theme={null}
curl -fsSL https://get.corestory.ai/install.sh | sh
```

```powershell Windows (PowerShell) theme={null}
irm https://get.corestory.ai/install.ps1 | iex
```

The installer finds the latest release, checks the download's SHA-256 checksum, and installs `corestory` to `~/.local/bin` on macOS and Linux or `%LOCALAPPDATA%\CoreStory\bin` on Windows. To install somewhere else, set `CORESTORY_INSTALL_DIR` before running the script.

On Windows, the installer adds its folder to your user `PATH`. On macOS and Linux, it tells you if the folder is not on your `PATH` and which startup file to add it to. Either way, open a new terminal afterward.

### Manual install

**1. Download the archive for your platform**

Open the [latest release](https://github.com/CoreStory-Frontier/release-dist/releases/latest) and download the command-line archive and its `.sha256` file:

| Platform | Archive |
| - | - |
| macOS (Apple silicon) | `corestory-cli-<version>-aarch64-apple-darwin.tar.gz` |
| Linux (x64) | `corestory-cli-<version>-x86_64-unknown-linux-musl.tar.gz` |
| Windows (x64) | `corestory-cli-<version>-x86_64-pc-windows-gnu.tar.gz` |

You do not need the `.app.tar.gz`, `.sig`, `desktop.json`, or `cli.json` files. Those are for the desktop app and the updater.

**2. Verify the checksum**

Compare the archive's SHA-256 hash with the first field of the `.sha256` file:

```bash theme={null}
shasum -a 256 corestory-cli-<version>-aarch64-apple-darwin.tar.gz
cat corestory-cli-<version>-aarch64-apple-darwin.tar.gz.sha256
```

`shasum -c` can fail on this file because it records a build path rather than the file name. Compare the two hashes by eye instead. Each archive also has a Sigstore signature (`.sigstore.json`) if you want to verify provenance.

**3. Put the binary on your PATH**

Extract the archive and move `bin/corestory` to a folder on your `PATH`, such as `~/.local/bin`.

### Check the install

```bash theme={null}
corestory --version
```

```text theme={null}
CoreStory CLI 0.1.0
```

***

## Step 2: Run setup

```bash theme={null}
corestory setup
```

Setup is interactive. It asks you to:

1. **Accept the [Terms of Use](https://app.corestory.ai/terms) and [Privacy Policy](https://app.corestory.ai/privacy).**
2. **Choose whether to share anonymous usage data.** This is optional, and you can change your answer later with `corestory setup --telemetry`.
3. **Add a model provider and key.** Choose OpenAI, Azure OpenAI, or Anthropic, then paste your key.

Other commands do not run until setup is complete.

Your settings are saved to `~/.config/corestory/config.toml`. To change providers or models later, run `corestory setup --models`.

> [!WARNING]
>
> **Run setup yourself, not through an agent.** Setup is where you accept the terms and decide where your code is sent. If you ask a coding agent to install CoreStory, it should stop and ask you to run `corestory setup` in your own terminal.

***

## Step 3: Index a repository

From the root of your repository:

```bash theme={null}
cd your-repo
corestory init
corestory ingest
```

`init` creates the corpus and prints its ID:

```text theme={null}
CorpusID 01a22cdb-bd58-7573-96f3-45c144e71bb1
```

`ingest` reads the repository, calls your model provider, and prints the ID of the ingest when it finishes:

```text theme={null}
IngestID 01a22cdb-bd6c-7456-9de3-5fb2f2f3b1f9
```

Ingest time and model cost grow with the size of the repository. A single small file takes well under a minute. A large codebase can take much longer and make many model calls, so try a small repository first to get a feel for the cost on your key.

Confirm the snapshot exists:

```bash theme={null}
corestory list
```

```text theme={null}
Snapshots
01a22cdb-bd76-74c0-a83d-3e7e1dc84c87 928769df71ff (created@2026-11-30 14:28:48 UTC)
```

### Keep the index out of Git

The index lives in a `.corestory/` folder at the repository root. It is a local database, and it can get large. Add it to `.gitignore`:

```bash theme={null}
echo ".corestory/" >> .gitignore
```

***

## Keeping the CLI up to date

```bash theme={null}
corestory update --check   # see whether a newer version is published
corestory update           # download, verify, and install it
```

`corestory update` verifies the new release's signature before it installs anything. See [`update`](https://docs.corestory.ai/cli/command-reference#update) for all options.

***

## Next steps

> [card] [Connect Your Agent](https://docs.corestory.ai/cli/connect-your-agent.md)
>
> Point Claude Code, Copilot, Cursor, or Codex at your index

> [card] [Command Reference](https://docs.corestory.ai/cli/command-reference.md)
>
> Search, inspect rules, and manage snapshots from the terminal


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.