# OMP

Source: https://docs.aiand.com/ja/integrations/omp/

[OMP](https://github.com/can1357/oh-my-pi) は、ターミナルで動作する AI
コーディングエージェントです。ai& は組み込み provider として含まれています。

<Aside type="note">
  [モデルカタログ](/ja/models/catalog/)から `tool_calling` 対応モデルを選んでください。
</Aside>

## 1. OMP をインストール

<Tabs syncKey="os">
<TabItem label="macOS / Linux">

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

</TabItem>
<TabItem label="Windows (PowerShell)">

```powershell
irm https://omp.sh/install.ps1 | iex
```

</TabItem>
</Tabs>

Bun 1.3.14 以降でもインストールできます:

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

## 2. API キーを設定

[ai& console](https://console.aiand.com/api-keys) でキーを作成し、shell
に設定します:

<Tabs syncKey="os">
<TabItem label="macOS / Linux">

```bash
export AIAND_API_KEY="sk-your-aiand-api-key"
```

</TabItem>
<TabItem label="Windows (PowerShell)">

```powershell
$env:AIAND_API_KEY = "sk-your-aiand-api-key"
```

</TabItem>
</Tabs>

## 3. OMP を実行

ai& のモデルを指定して OMP を起動します:

```bash
omp --model aiand/<model-id>
```

モデル名は `aiand/<model-id>` 形式で指定してください。

## 動作確認

one-shot prompt を実行します:

```bash
omp --print --model aiand/<model-id> "reply with only: ok"
```

Unauthorized request が表示された場合は、同じ shell に `AIAND_API_KEY`
が設定されているか確認してください。
