Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# AGENTS.md

## Cursor Cloud specific instructions

### What this repo is

Single-package **Nuxt 3** documentation site for MemOS (`memos-docs`). There is no backend API or Docker stack in this repo—only the docs app.

### Package manager

Use **pnpm 10.12.1** (see `packageManager` in `package.json`). Enable via Corepack if needed:

```bash
corepack enable && corepack prepare pnpm@10.12.1 --activate
```

### Common commands

See `README.md` and `package.json` scripts. Typical workflow:

| Task | Command |
|------|---------|
| Install | `pnpm install` |
| Dev server | `NUXT_ENV_CONFIG=dev pnpm dev` → http://localhost:3000 |
| Lint | `pnpm exec nuxt prepare` then `pnpm run lint` |
| Typecheck | `pnpm run typecheck` |
| Static build | `NUXT_ENV_CONFIG=dev pnpm run generate` (or `pnpm run publish`) |
| Preview build | `pnpm preview` |

`NUXT_ENV_CONFIG` selects `envConfig/config.{dev,pre,prod}.ts`. Use **`dev`** locally so `envConfig/config.dev.ts` points domains at `http://localhost:3000`.

### Dev server notes

- First `pnpm dev` parses all markdown under `content/` (can take ~10–20s before the server is ready).
- **Nuxt Content** uses in-process **SQLite** via `better-sqlite3` (native module; listed in `pnpm.onlyBuiltDependencies`).
- Optional floating **AI assistant** calls `https://apigw.memtensor.cn` (`runtimeConfig.public.apiBase`); docs browsing and search work without it.

### Lint / typecheck caveats

- ESLint imports `.nuxt/eslint.config.mjs`; run **`nuxt prepare`** once after install (or before lint) so `.nuxt` exists.
- `pnpm run lint` and `pnpm run typecheck` may report **pre-existing** issues in the repo; they do not block `pnpm dev` or `pnpm run generate`.

### Maintenance scripts (not required for dev)

- `pnpm run sync-api` / `sync-releases` — need network; releases may use `GITHUB_TOKEN`.
- CI auto-translate uses `OPENAI_*` env vars (see `.github/workflows/auto-translate.yml`).

### i18n

English is default; Chinese content lives under `content/cn/`. Routing uses `@nuxtjs/i18n` with `prefix_except_default`—check `nuxt.config.ts` for locale paths if `/cn` behavior differs between SSR and client navigation.