---
title: "安装"
description: "通过官方项目模板一键创建完整文档站点，或将 @movk/nuxt-docs 作为 Nuxt Layer 集成到现有 Nuxt 项目。支持 npm、pnpm、yarn、bun 四种包管理器，提供完整模板和精简的模块文档模板两种选择。"
seo_title: "Installation"
seo_description: "Create a Movk Nuxt Docs site with the official templates or integrate the Nuxt layer into an existing project using npm, pnpm, yarn, or bun."
canonical_url: "https://docs.mhaibaraai.cn/docs/getting-started/installation"
---
# 安装

> 通过官方项目模板一键创建完整文档站点，或将 @movk/nuxt-docs 作为 Nuxt Layer 集成到现有 Nuxt 项目。支持 npm、pnpm、yarn、bun 四种包管理器，提供完整模板和精简的模块文档模板两种选择。

## 快速入门

选择合适的安装方式：

### 完整文档站点（推荐）

包含 ESLint、TypeScript 检查等开发工具的完整模板。

```bash [npm]
npx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
cd my-docs
npm install
npm run dev
```

```bash [pnpm]
pnpm dlx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
cd my-docs
pnpm install
pnpm dev
```

```bash [yarn]
yarn dlx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
cd my-docs
yarn install
yarn dev
```

```bash [bun]
bunx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/default my-docs
cd my-docs
bun install
bun dev
```

### 模块文档站点（精简）

精简模板，适合 npm 包文档，内置 Release 页面。

```bash [npm]
npx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/module my-module-docs
cd my-module-docs
npm install
npm run dev
```

```bash [pnpm]
pnpm dlx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/module my-module-docs
cd my-module-docs
pnpm install
pnpm dev
```

```bash [yarn]
yarn dlx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/module my-module-docs
cd my-module-docs
yarn install
yarn dev
```

```bash [bun]
bunx nuxi init -t gh:mhaibaraai/movk-nuxt-docs/templates/module my-module-docs
cd my-module-docs
bun install
bun dev
```

启动后访问 [http://localhost:3000](http://localhost:3000){rel="[\"nofollow\"]"}。

## AI 助手 Skill

通过向您的 AI 助手（如 Claude Code、Cursor 等）添加专业知识，快速入门 Movk Nuxt Docs：

```bash [Terminal]
npx skills add https://docs.mhaibaraai.cn
```

这项技能通过为您的 AI 助手提供以下内容来帮助您更快地创建文档：

- 使用 Movk Nuxt Docs 编写文档的最佳实践
- 内置组件的使用和现成的模板
- 编写指南和内容结构模式
- 配置和自定义技巧

> \[\!TIP\]
> See: /docs/getting-started/skills
> 
> 您也可以从自己的文档站发布 Skills，了解 Agent Skills。

## 作为 Layer 使用

在现有 Nuxt 项目中集成：

```bash [npm]
npm install @movk/nuxt-docs @nuxt/content better-sqlite3 tailwindcss
```

```bash [pnpm]
pnpm add @movk/nuxt-docs @nuxt/content better-sqlite3 tailwindcss
```

```bash [yarn]
yarn add @movk/nuxt-docs @nuxt/content better-sqlite3 tailwindcss
```

```bash [bun]
bun add @movk/nuxt-docs @nuxt/content better-sqlite3 tailwindcss
```

> \[\!NOTE\]
> 
> @nuxt/content
> 
>  必须安装在应用自身的依赖中。它是 
> 
> @movk/nuxt-docs
> 
>  的 peerDependency：只有装在应用作用域，Nuxt 生成的内容集合类型增强才能解析到它，否则 server 端 
> 
> queryCollection
> 
>  等会得到 
> 
> never
> 
>  类型报错。

配置 Nuxt：

```diff [nuxt.config.ts]
export default defineNuxtConfig({
+  extends: ['@movk/nuxt-docs']
})
```


## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
