open-index/open-npm huggingface dataset:
npm package: @ootc/yah
Description: - Node.js 20+
Latest version: 0.0.11

# @ootc/yah

## Quick Start (3 Steps)

### Prerequisites

- Node.js 20+

### Step 1: Run setup

Do this:

```bash
npx @ootc/yah setup openai
```

Why:
This single command does first-time setup:
- applies provider preset
- asks for your API key
- writes the key into env file

You should see:
- prompt: `Enter OPENAI_API_KEY:`
- then a success message with env file path

If you use a different preset, use the matching env key:

| Preset | Env key |
| --- | --- |
| `openai` | `OPENAI_API_KEY` |
| `zai` | `ZAI_API_KEY` |
| `deepseek` | `DEEPSEEK_API_KEY` |
| `moonshot` | `MOONSHOT_API_KEY` |

### Step 2: Start server

Do this:

```bash
npx @ootc/yah start
```

Why:
Starts the local API server and web UI.

You should see:
- Terminal: `Server running on http://127.0.0.1:11111` (host/port can differ by config).
- Browser opens automatically unless `YAH_OPEN_BROWSER=0` or `false`.

Open:
- `http://127.0.0.1:11111`
- Go to `/search` and run a query.

### Step 3: Verify generation

1. Open `/search`.
2. Enter a simple query (for example: `laplace transform table`).
3. Confirm preview articles appear.
4. Open one article and confirm content starts generating.

## Troubleshooting

If yah says no API key is found:

1. Re-run setup:
```bash
npx @ootc/yah setup openai
```
2. Start again:
```bash
npx @ootc/yah start
```

If setup cannot run interactively, use manual mode:

```bash
npx @ootc/yah config preset openai
npx @ootc/yah env edit
```

If you are not sure which env file yah reads, run:
```bash
npx @ootc/yah env location
```

## Advanced Commands

```bash
npx @ootc/yah config list
npx @ootc/yah config get <key>
npx @ootc/yah config set <key> -v <value>
npx @ootc/yah setup <openai|zai|deepseek|moonshot> --api-key <value>
```