# oh-my-pi

> Run oh-my-pi (omp) on NotHoly models with notholy run omp, or add NotHoly as a provider in its models.yml, on Windows, macOS and Linux.


`notholy run omp` needs the NotHoly CLI, installed and signed in ([Install the CLI](/en/cli/install)), and oh-my-pi itself. Its project lists several installers; with Bun, on any system:

```bash
bun install -g @oh-my-pi/pi-coding-agent
notholy run omp
```

`run` gives oh-my-pi a temporary copy of its config folder with the `notholy` provider added, starts it with `--model` set to a NotHoly model, and deletes the copy when oh-my-pi exits. Your own folder stays as it was, and sessions saved during that run are deleted with the copy. `run` sets the key for that process, so no variable is needed.

## Where oh-my-pi keeps its config

oh-my-pi reads `models.yml`, `config.yml` and `mcp.json` from one folder, the same on every system:

| System | Folder |
|---|---|
| macOS | `~/.omp/agent` (`/Users/<you>/.omp/agent`) |
| Linux | `~/.omp/agent` |
| Windows | `%USERPROFILE%\.omp\agent` |

On macOS it is not under `~/Library` or `~/.config`. On Linux and macOS, `XDG_DATA_HOME`, `XDG_STATE_HOME` and `XDG_CACHE_HOME` move sessions and caches after `omp config init-xdg`, never these three files. `PI_CODING_AGENT_DIR` replaces the folder and `PI_CONFIG_DIR` renames `.omp`.

A profile changes the folder. With `--profile <name>`, or `OMP_PROFILE` or `PI_PROFILE` set, oh-my-pi reads `~/.omp/profiles/<name>/agent` and ignores `PI_CODING_AGENT_DIR`. To see the folder the `omp` you start will read, run:

```bash
omp config path
```

## Write the configuration

`notholy connect omp` writes three files in `~/.omp/agent`:

- `models.yml`: the `notholy` provider with every public model. If oh-my-pi still has a `models.json` it has not migrated, `connect` writes that file instead
- `config.yml`: `modelRoles.default` set to a NotHoly model
- `mcp.json`: the `notholy` MCP server

Each file is backed up first, and `notholy connect omp --undo` puts the backups back. `PI_CONFIG_DIR` and `PI_CODING_AGENT_DIR` move the folder, and `connect` follows them the way oh-my-pi does.

`run` and `connect` work with the default profile only. If `omp config path` prints a folder under `profiles`, unset `OMP_PROFILE` and `PI_PROFILE` for that command, or set the profile up by hand with the steps below in the folder it prints.

After `connect`, oh-my-pi reads the key from `NOTHOLY_API_KEY`. Set it as shown in step 3 below, then start `omp`.

## Manual setup

1. Find the folder with `omp config path`. The steps below use `~/.omp/agent`; use the folder it printed if it is another one.

2. Add the provider to `models.yml` in that folder. Keep any providers you already have under the same `providers` key:

```yaml
providers:
  notholy:
    baseUrl: https://api.notholy.com/v1
    api: openai-completions
    apiKey: NOTHOLY_API_KEY
    authHeader: true
    models:
      - { id: notholy-specter, name: "NotHoly Specter", reasoning: true, input: [text], contextWindow: 1048576, maxTokens: 131072 }
      - { id: notholy-pulse, name: "NotHoly Pulse Flash", reasoning: true, input: [text, image], contextWindow: 1048576, maxTokens: 131072 }
      - { id: notholy-vector, name: "NotHoly Vector Flash 1017", reasoning: true, input: [text, image], contextWindow: 1048576, maxTokens: 131072 }
      - { id: notholy-wisp, name: "NotHoly Wisp Flash", reasoning: true, input: [text, image], contextWindow: 1048576, maxTokens: 131072 }
```

`apiKey` names the environment variable that holds the key, not the key itself. Write it without `$`.

3. Set the key in the shell you start oh-my-pi from. If the variable is missing, oh-my-pi sends its name as the key and the API answers 401.

```bash
export NOTHOLY_API_KEY="nh_live_..."
```

```powershell
$env:NOTHOLY_API_KEY = "nh_live_..."
setx NOTHOLY_API_KEY "nh_live_..."
```

`export` lasts until the terminal closes. To keep it, add the line to `~/.zshrc` on macOS, where zsh is the default shell, or to `~/.bashrc` on Linux, and open a new terminal. In PowerShell, `$env:` sets the key for the current window and `setx` saves it for windows you open later.

4. Check that oh-my-pi sees the provider:

```bash
omp models notholy
```

It lists the NotHoly models. An empty list means oh-my-pi reads another folder (go back to step 1) or `models.yml` has a YAML error, which oh-my-pi prints.

5. Pick the model. To make NotHoly the default, set the role in `config.yml` in the same folder:

```yaml
modelRoles:
  default: notholy/notholy-specter
```

Or pick the model for one session with `omp --model notholy/notholy-specter`, or with `/model` inside oh-my-pi.

6. Start `omp`. If it was already open, close it and start it again.

You do not need `omp --config`. That flag loads an extra settings file shaped like `config.yml` for one run: it can carry `modelRoles`, but not providers, so a `models.yml` passed to it adds no models. The provider has to be in `models.yml` in the folder from step 1.

## Add CKE 2.0 and the tools

The provider above is inference only. `connect` and `run` also add the `notholy` MCP server, which gives oh-my-pi CVE lookup and search, package advisories, CKE 2.0 search, the skills registry, passive network intel, and dark web search when you ask for it. Web search and page reading stay with oh-my-pi's own tools. To add the server by hand, put it in `mcp.json` in the same folder:

```json
{
  "mcpServers": {
    "notholy": { "type": "stdio", "command": "notholy", "args": ["mcp", "--security-data"] }
  }
}
```

The server runs through the NotHoly CLI and uses its login, so install the CLI first. See the [MCP guide](/en/mcp/connect).

## Test

Ask oh-my-pi to list the files in the current directory. A tool call and an answer mean the connection works. `notholy doctor` checks the account and whether the NotHoly tools connect.

oh-my-pi 19.1.1 was run end to end on Windows with CLI 1.0.3: `notholy run omp` answered with the default model and with `--model`. It was not run on macOS or Linux. The folders, the profile rule, the key lookup and `--config` above come from oh-my-pi 19.1.1's source. CLI 1.0.2 wrote `contextWindow` and `maxTokens` in a form oh-my-pi rejects with "must be a number". If you ran `notholy connect omp` on 1.0.2, update and run it again. The format is documented in oh-my-pi's [models.md](https://github.com/can1357/oh-my-pi/blob/main/docs/models.md) and [mcp-config.md](https://github.com/can1357/oh-my-pi/blob/main/docs/mcp-config.md).

## Next

- [Connect and run](/en/cli/connect-and-run)
- [Pi](/en/integrations/pi)
