# Install

Install Critias on macOS or Windows, add a model key and ask your first pricing question.

Critias runs on your own computer. You need about ten minutes and a key for the model provider you choose.

Prefer to stay in the AI agent you already use? Add the [Pricing Plugin](/plugin) instead.

## What you need

- macOS or Windows
- Node.js 22.19 or later, and Python 3.12
- An API key and a model ID from one of: OpenAI, OpenRouter, Google AI Studio (Gemini) or Anthropic
- Internet access for installation and model requests

Model requests use your key and can incur charges from your provider.

## Install with npm

On macOS or Windows, with Node.js 22.19 or later and Python 3.12 (and Git for Windows on Windows):

```bash
npm install -g critias
```

Create a file named `.env` inside a `.critias` folder in your home folder (`~/.critias/.env`, or `%USERPROFILE%\.critias\.env` on Windows) with the key and the model for your provider, for example:

```text
ANTHROPIC_API_KEY=your-key
ANTHROPIC_MODEL=claude-sonnet-5-5
```

The others are `OPENAI_*`, `OPENROUTER_*` and `GEMINI_*`. List the models for a provider with `critias models anthropic`. Then start Critias with a folder for your business files:

```bash
critias ~/CritiasWorkspace
```

The first start creates a Python environment in `~/.critias/venv`, which takes a minute and needs a network. Open the link it prints. `npx critias` works without a global install, and `npm install -g critias` again updates it. The clone steps below do the same thing from source.

## macOS from a clone

```bash
git clone https://github.com/critias-ai/critias-pricing-agent.git
cd critias-pricing-agent/pricing-harness
bash scripts/setup-macos.sh
cp .env.example .env
```

Open `.env` and set the key and the model for your provider, for example `ANTHROPIC_API_KEY` and `ANTHROPIC_MODEL`. The others are `OPENAI_*`, `OPENROUTER_*` and `GEMINI_*`. Keep this file out of Git.

## Windows from a clone

You also need Git for Windows. Critias runs its analysis commands in Git Bash. Install Python 3.12 with the `py` launcher.

In PowerShell:

```powershell
git clone https://github.com/critias-ai/critias-pricing-agent.git
cd critias-pricing-agent\pricing-harness
powershell -ExecutionPolicy Bypass -File scripts\setup-windows.ps1
copy .env.example .env
```

Open `.env` and set the key and the model for your provider, for example `ANTHROPIC_API_KEY` and `ANTHROPIC_MODEL`. The others are `OPENAI_*`, `OPENROUTER_*` and `GEMINI_*`. Keep this file out of Git.

## Choose a model

Critias uses the first provider in `.env` that has both a key and a model, in this order: OpenAI, OpenRouter, Gemini, Anthropic. It never switches model on its own. A saved ChatGPT login also works: set only `OPENAI_MODEL`. To list the models for a provider (`openai`, `openrouter`, `google` or `anthropic`) without making a request, run this from the `pricing-harness` folder, in bash or PowerShell:

```bash
npm run models -- anthropic
```

In the app, the thinking level is chosen beside Send, and starts at medium.

## Start Critias

Start it with a folder for your business files. The folder is created if it does not exist.

```bash
bash scripts/start-macos.sh "$HOME/CritiasWorkspace"
```

On Windows, in PowerShell:

```powershell
powershell -ExecutionPolicy Bypass -File scripts\start-windows.ps1 "$HOME\CritiasWorkspace"
```

Then open `http://127.0.0.1:4317`. Stop it with Ctrl+C.

## Ask your first question

Attach a sales export and ask, for example: "Which products contributed most to the change in gross margin between these years?" Confirm the column meanings, currency, calendar and cost treatment when Critias asks. Confirmed facts are saved in `.pricing/context.md` inside your workspace and reused next time.

## Update

Pull the latest release and run the setup script again:

```bash
git pull
bash scripts/setup-macos.sh
```

On Windows, run `scripts\setup-windows.ps1` again in the same way as during installation.
