xiaozhi-client 1.9.3 → 1.9.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +2 -2
  2. package/dist/WebServerLauncher.js +2 -100
  3. package/dist/backend/WebServerLauncher.js +100 -0
  4. package/dist/backend/WebServerLauncher.js.map +1 -0
  5. package/dist/backend/cli.js +129 -0
  6. package/dist/backend/cli.js.map +1 -0
  7. package/dist/{package.json → backend/package.json} +21 -9
  8. package/dist/cli.js +2 -129
  9. package/dist/docs/404/index.html +19 -0
  10. package/dist/docs/404.html +19 -0
  11. package/dist/docs/_next/static/JZ0ESgtaHnsqkxSabOqqU/_buildManifest.js +1 -0
  12. package/dist/docs/_next/static/JZ0ESgtaHnsqkxSabOqqU/_ssgManifest.js +1 -0
  13. package/dist/docs/_next/static/chunks/112-c9cbd8401d35f825.js +4 -0
  14. package/dist/docs/_next/static/chunks/2a9bc5d7-4c434acf20ba934a.js +1 -0
  15. package/dist/docs/_next/static/chunks/782-c26ca6c69e488d48.js +1 -0
  16. package/dist/docs/_next/static/chunks/799-fe0d35806fd12012.js +1 -0
  17. package/dist/docs/_next/static/chunks/9b1cb2c3-cc9ed703e6aef1a2.js +1 -0
  18. package/dist/docs/_next/static/chunks/app/[[...mdxPath]]/page-48f5c8f3210e0a8a.js +1 -0
  19. package/dist/docs/_next/static/chunks/app/_not-found/page-2e38866a1cbb77e4.js +1 -0
  20. package/dist/docs/_next/static/chunks/app/layout-e8f420537fd59e8d.js +1 -0
  21. package/dist/docs/_next/static/chunks/framework-b73126dabbf07067.js +1 -0
  22. package/dist/docs/_next/static/chunks/main-75dc65850b89d90d.js +1 -0
  23. package/dist/docs/_next/static/chunks/main-app-3303134270964ce6.js +1 -0
  24. package/dist/docs/_next/static/chunks/pages/_app-e698a68d07c8993d.js +1 -0
  25. package/dist/docs/_next/static/chunks/pages/_error-189a41ab5833da03.js +1 -0
  26. package/dist/docs/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  27. package/dist/docs/_next/static/chunks/webpack-10e2bf7d852ddb6e.js +1 -0
  28. package/dist/docs/_next/static/css/2d82b615fcca1590.css +1 -0
  29. package/dist/docs/_next/static/css/b03484a3c350cf6e.css +1 -0
  30. package/dist/docs/_next/static/css/b289318ef4b60b0a.css +1 -0
  31. package/dist/docs/changelog/index.html +585 -0
  32. package/dist/docs/changelog/index.txt +1079 -0
  33. package/dist/docs/images/coze-workflow/get-parameter.png +0 -0
  34. package/dist/docs/index.html +22 -0
  35. package/dist/docs/index.txt +41 -0
  36. package/dist/docs/quickstart/index.html +64 -0
  37. package/dist/docs/quickstart/index.txt +185 -0
  38. package/dist/docs/reference/command/index.html +20 -0
  39. package/dist/docs/reference/command/index.txt +42 -0
  40. package/dist/docs/usage/as-mcp/index.html +36 -0
  41. package/dist/docs/usage/as-mcp/index.txt +101 -0
  42. package/dist/docs/usage/coze-workflow/index.html +35 -0
  43. package/dist/docs/usage/coze-workflow/index.txt +120 -0
  44. package/dist/docs/usage/docker/index.html +40 -0
  45. package/dist/docs/usage/docker/index.txt +154 -0
  46. package/dist/docs/usage/modelscope/index.html +32 -0
  47. package/dist/docs/usage/modelscope/index.txt +109 -0
  48. package/dist/docs/usage/multi-endpoint/index.html +32 -0
  49. package/dist/docs/usage/multi-endpoint/index.txt +118 -0
  50. package/dist/frontend/assets/form-utils-h64o2Nyg.js.map +1 -0
  51. package/{apps/frontend/dist → dist/frontend}/assets/index-88NfCOo9.js.map +1 -1
  52. package/dist/frontend/assets/radix-ui-BA32w1ww.js.map +1 -0
  53. package/dist/frontend/assets/react-vendor-DrjkXih1.js.map +1 -0
  54. package/dist/frontend/assets/utils-CiPelQLP.js.map +1 -0
  55. package/dist/frontend/assets/vendor-DK9yaMt3.js.map +1 -0
  56. package/dist/shared-types/index.js +36 -0
  57. package/dist/shared-types/index.js.map +1 -0
  58. package/package.json +21 -9
  59. package/apps/frontend/README.md +0 -169
  60. package/apps/frontend/dist/assets/form-utils-h64o2Nyg.js.map +0 -1
  61. package/apps/frontend/dist/assets/radix-ui-BA32w1ww.js.map +0 -1
  62. package/apps/frontend/dist/assets/react-vendor-DrjkXih1.js.map +0 -1
  63. package/apps/frontend/dist/assets/utils-CiPelQLP.js.map +0 -1
  64. package/apps/frontend/dist/assets/vendor-DK9yaMt3.js.map +0 -1
  65. package/dist/WebServerLauncher.js.map +0 -1
  66. package/dist/cli.js.map +0 -1
  67. package/docs/arch/cache.mdx +0 -885
  68. package/docs/changelog.mdx +0 -645
  69. package/docs/development/architecture.mdx +0 -71
  70. package/docs/development/docker-build.mdx +0 -256
  71. package/docs/development/todo__release-guide.md +0 -563
  72. package/docs/development/todo__setting-manager.md +0 -122
  73. package/docs/docs.json +0 -55
  74. package/docs/getting-started/install.mdx +0 -191
  75. package/docs/getting-started/intro.mdx +0 -11
  76. package/docs/getting-started/quickstart.mdx +0 -108
  77. package/docs/mcp-tool-calling.md +0 -363
  78. package/docs/python-dependencies.md +0 -216
  79. package/docs/reference/command.mdx +0 -15
  80. package/docs/usage/add-mcp-server.mdx +0 -6
  81. package/docs/usage/as-a-mcp-server.mdx +0 -76
  82. package/docs/usage/coze-workflow.mdx +0 -73
  83. package/docs/usage/docker.mdx +0 -99
  84. package/docs/usage/modelscope.mdx +0 -74
  85. package/docs/usage/use-multi-xiaozhi-mcp-endpoints.mdx +0 -77
  86. package/docs/usage/web-control.mdx +0 -6
  87. /package/dist/{WebServerLauncher.d.ts → backend/WebServerLauncher.d.ts} +0 -0
  88. /package/dist/{cli.d.ts → backend/cli.d.ts} +0 -0
  89. /package/dist/{templates → backend/templates}/default/mcpServers/calculator.js +0 -0
  90. /package/dist/{templates → backend/templates}/default/mcpServers/datetime.js +0 -0
  91. /package/dist/{templates → backend/templates}/default/package.json +0 -0
  92. /package/dist/{templates → backend/templates}/default/xiaozhi.config.json +0 -0
  93. /package/dist/{templates → backend/templates}/hello-world/mcpServers/calculator.js +0 -0
  94. /package/dist/{templates → backend/templates}/hello-world/mcpServers/datetime.js +0 -0
  95. /package/dist/{templates → backend/templates}/hello-world/package.json +0 -0
  96. /package/dist/{templates → backend/templates}/hello-world/xiaozhi.config.json +0 -0
  97. /package/dist/{templates → backend/templates}/json5/mcpServers/calculator.js +0 -0
  98. /package/dist/{templates → backend/templates}/json5/mcpServers/datetime.js +0 -0
  99. /package/dist/{templates → backend/templates}/json5/package.json +0 -0
  100. /package/dist/{templates → backend/templates}/json5/xiaozhi.config.json5 +0 -0
  101. /package/dist/{templates → backend/templates}/jsonc/mcpServers/calculator.js +0 -0
  102. /package/dist/{templates → backend/templates}/jsonc/mcpServers/datetime.js +0 -0
  103. /package/dist/{templates → backend/templates}/jsonc/package.json +0 -0
  104. /package/dist/{templates → backend/templates}/jsonc/xiaozhi.config.jsonc +0 -0
  105. /package/dist/{templates → backend/templates}/modelscope/xiaozhi.config.json +0 -0
  106. /package/{docs/images/coze-workflow/get-parameter.png → dist/docs/_next/static/media/get-parameter.62eee93d.png} +0 -0
  107. /package/{docs → dist/docs}/images/add-to-cherry-studio/step-1.png +0 -0
  108. /package/{docs → dist/docs}/images/add-to-cherry-studio/step-2.png +0 -0
  109. /package/{docs → dist/docs}/images/add-to-cherry-studio/step-3.png +0 -0
  110. /package/{docs → dist/docs}/images/add-to-cherry-studio/step-4.png +0 -0
  111. /package/{docs → dist/docs}/images/add-to-cherry-studio/step-5.png +0 -0
  112. /package/{docs → dist/docs}/images/add-to-cursor/step-1.png +0 -0
  113. /package/{docs → dist/docs}/images/add-to-cursor/step-2.png +0 -0
  114. /package/{docs → dist/docs}/images/add-to-cursor/step-3.png +0 -0
  115. /package/{docs → dist/docs}/images/coze-workflow/config-workflow-step-1.png +0 -0
  116. /package/{docs → dist/docs}/images/coze-workflow/config-workflow-step-2.png +0 -0
  117. /package/{docs → dist/docs}/images/coze-workflow/config-workflow-step-3.png +0 -0
  118. /package/{docs → dist/docs}/images/integrate-to-cherry-studio.png +0 -0
  119. /package/{docs → dist/docs}/images/integrate-to-cursor.png +0 -0
  120. /package/{docs → dist/docs}/images/modelscope/step-1.png +0 -0
  121. /package/{docs → dist/docs}/images/modelscope/step-2.png +0 -0
  122. /package/{docs → dist/docs}/images/modelscope/step-3.png +0 -0
  123. /package/{docs → dist/docs}/images/modelscope/step-4.png +0 -0
  124. /package/{docs → dist/docs}/images/preview.png +0 -0
  125. /package/{docs → dist/docs}/images/use-multi-xiaozhi-mcp-endpoints/step-1.png +0 -0
  126. /package/{docs → dist/docs}/images/use-multi-xiaozhi-mcp-endpoints/step-2.png +0 -0
  127. /package/{docs → dist/docs}/images/use-multi-xiaozhi-mcp-endpoints/step-3.png +0 -0
  128. /package/{docs → dist/docs}/images/use-multi-xiaozhi-mcp-endpoints/step-4.png +0 -0
  129. /package/{docs → dist/docs}/images/use-multi-xiaozhi-mcp-endpoints/step-5.png +0 -0
  130. /package/{docs → dist/docs}/images/web-ui-preview.png +0 -0
  131. /package/{apps/frontend/dist → dist/frontend}/assets/form-utils-h64o2Nyg.js +0 -0
  132. /package/{apps/frontend/dist → dist/frontend}/assets/index-88NfCOo9.js +0 -0
  133. /package/{apps/frontend/dist → dist/frontend}/assets/index-P6Zq3MZF.css +0 -0
  134. /package/{apps/frontend/dist → dist/frontend}/assets/radix-ui-BA32w1ww.js +0 -0
  135. /package/{apps/frontend/dist → dist/frontend}/assets/react-vendor-DrjkXih1.js +0 -0
  136. /package/{apps/frontend/dist → dist/frontend}/assets/utils-CiPelQLP.js +0 -0
  137. /package/{apps/frontend/dist → dist/frontend}/assets/vendor-DK9yaMt3.js +0 -0
  138. /package/{apps/frontend/dist → dist/frontend}/index.html +0 -0
package/docs/docs.json DELETED
@@ -1,55 +0,0 @@
1
- {
2
- "$schema": "https://mintlify.com/docs.json",
3
- "theme": "mint",
4
- "name": "Xiaozhi Client",
5
- "description": "用于聚合MCP Server的命令行工具",
6
- "colors": {
7
- "primary": "#3B82F6",
8
- "light": "#F8FAFC",
9
- "dark": "#0F172A"
10
- },
11
- "navigation": {
12
- "pages": [
13
- "getting-started/intro",
14
- "getting-started/quickstart",
15
- "usage/docker",
16
- "usage/modelscope",
17
- "usage/coze-workflow",
18
- "usage/use-multi-xiaozhi-mcp-endpoints",
19
- "usage/as-a-mcp-server",
20
- "reference/command",
21
- "development/docker-build",
22
- {
23
- "group": "开发",
24
- "pages": ["changelog"]
25
- }
26
- ]
27
- },
28
- "navbar": {
29
- "links": [
30
- {
31
- "icon": "github",
32
- "label": "GitHub",
33
- "href": "https://github.com/shenjingnan/xiaozhi-client"
34
- }
35
- ]
36
- },
37
- "footer": {
38
- "socials": {
39
- "github": "https://github.com/shenjingnan/xiaozhi-client"
40
- }
41
- },
42
- "integrations": {
43
- "telemetry": {
44
- "enabled": true
45
- }
46
- },
47
- "contextual": {
48
- "options": ["copy", "view"]
49
- },
50
- "errors": {
51
- "404": {
52
- "redirect": true
53
- }
54
- }
55
- }
@@ -1,191 +0,0 @@
1
- # CLI installation
2
-
3
- > Install the CLI to preview and develop your docs locally
4
-
5
- <img className="block dark:hidden my-0 pointer-events-none" src="https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=ffd8bc88d87fc00fe1919a33a292fa01" width="1184" height="320" data-path="images/installation/local-development-light.png" srcset="https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=280&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=511ef7cd18fd4fb900f2701d062ca11b 280w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=560&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=3d88dd1c1b9502ecf779bae2a125bfa0 560w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=840&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=b5c7231e4a48c366bc9fadc00ad67fc2 840w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=1100&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=43e8d5fa61bcd586ccece993dc0c3f4d 1100w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=1650&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=c06a3f73ae2ed6cc36cfc6a15a539baf 1650w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-light.png?w=2500&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=6a946dbec95af5df7dc3f71daf25fed5 2500w" data-optimize="true" data-opv="2" />
6
-
7
- <img className="hidden dark:block my-0 pointer-events-none" src="https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=ef0bb527eb258f8d720180d106ea6625" width="1184" height="320" data-path="images/installation/local-development-dark.png" srcset="https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=280&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=b6ab6647def97748df5303d2add7877c 280w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=560&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=83a49f961c12baf9aa9755d972160915 560w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=840&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=9f44e898560aaa47af54ff0f6079ca6e 840w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=1100&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=1bc3413b87f72bb848de2a518cf16c3a 1100w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=1650&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=9b79a51b960489e0d41ffd61b9d7120d 1650w, https://mintcdn.com/mintlify/Y6rP0BmbzgwHuEoU/images/installation/local-development-dark.png?w=2500&fit=max&auto=format&n=Y6rP0BmbzgwHuEoU&q=85&s=db35248ff88939a314d4ecc547ffd463 2500w" data-optimize="true" data-opv="2" />
8
-
9
- ## Installing the CLI
10
-
11
- <Note>
12
- **Prerequisite**: Please install [Node.js](https://nodejs.org/en) before proceeding.
13
- </Note>
14
-
15
- <Steps>
16
- <Step title="Install the CLI.">
17
- Run the following command to install the [CLI](https://www.npmjs.com/package/mint):
18
-
19
- <CodeGroup>
20
- ```bash npm
21
- npm i -g mint
22
- ```
23
-
24
- ```bash pnpm
25
- pnpm add -g mint
26
- ```
27
- </CodeGroup>
28
- </Step>
29
-
30
- <Step title="Preview locally.">
31
- Navigate to your docs directory (where your `docs.json` file is located) and execute the following command:
32
-
33
- ```bash
34
- mint dev
35
- ```
36
-
37
- A local preview of your documentation will be available at `http://localhost:3000`.
38
- </Step>
39
- </Steps>
40
-
41
- Alternatively, if you do not want to install the CLI globally, you can run a one-time script:
42
-
43
- ```bash
44
- npx mint dev
45
- ```
46
-
47
- ## Updates
48
-
49
- If your local preview is out of sync with what you see on the web in the production version, update your local CLI:
50
-
51
- ```bash
52
- mint update
53
- ```
54
-
55
- If this `mint update` command is not available on your local version, re-install the CLI with the latest version:
56
-
57
- <CodeGroup>
58
- ```bash npm
59
- npm i -g mint@latest
60
- ```
61
-
62
- ```bash pnpm
63
- pnpm add -g mint@latest
64
- ```
65
- </CodeGroup>
66
-
67
- ## Custom ports
68
-
69
- By default, the CLI uses port 3000. You can customize the port using the `--port` flag. To run the CLI on port 3333, for instance, use this command:
70
-
71
- ```bash
72
- mint dev --port 3333
73
- ```
74
-
75
- If you attempt to run on a port that is already in use, it will use the next available port:
76
-
77
- ```mdx
78
- Port 3000 is already in use. Trying 3001 instead.
79
- ```
80
-
81
- ## Previewing as a specific group
82
-
83
- If you use partial authentication to restrict access to your documentation, you can preview as a specific authentication group by using the `--group [groupname]` flag.
84
-
85
- For example, if you have a group named `admin`, you can preview as a member of that group with the command:
86
-
87
- ```bash
88
- mint dev --group admin
89
- ```
90
-
91
- ## Additional commands
92
-
93
- While `mint dev` is the most commonly used command, there are other commands you can use to manage your documentation.
94
-
95
- ### Finding broken links
96
-
97
- The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
98
-
99
- ```bash
100
- mint broken-links
101
- ```
102
-
103
- ### Checking OpenAPI spec
104
-
105
- You can use the CLI to check your OpenAPI file for errors using the following command:
106
-
107
- ```bash
108
- mint openapi-check <openapiFilenameOrUrl>
109
- ```
110
-
111
- You can pass in a filename (e.g. `./openapi.yaml`) or a URL (e.g. `https://petstore3.swagger.io/api/v3/openapi.json`).
112
-
113
- ### Renaming files
114
-
115
- You can rename and update all references to files using the following command:
116
-
117
- ```bash
118
- mint rename <oldFilename> <newFilename>
119
- ```
120
-
121
- ### Migrating MDX endpoint pages
122
-
123
- You can migrate MDX endpoint pages to autogenerated pages from your OpenAPI specification using the following command:
124
-
125
- ```bash
126
- mint migrate-mdx
127
- ```
128
-
129
- This command converts individual MDX endpoint pages to autogenerated pages defined in your `docs.json`, moves MDX content to the `x-mint` extension in your OpenAPI specification, and updates your navigation. See [Migrating from MDX](/api-playground/migrating-from-mdx) for detailed information.
130
-
131
- ## Formatting
132
-
133
- While developing locally, we recommend using extensions in your IDE to recognize and format `MDX` files.
134
-
135
- If you use Cursor, Windsurf, or VS Code, we recommend the [MDX VS Code extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
136
-
137
- If you use JetBrains, we recommend the [MDX IntelliJ IDEA plugin](https://plugins.jetbrains.com/plugin/14944-mdx) for syntax highlighting, and setting up [Prettier](https://prettier.io/docs/webstorm) for code formatting.
138
-
139
- ## Troubleshooting
140
-
141
- <AccordionGroup>
142
- <Accordion title="Error: Could not load the &#x22;sharp&#x22; module using the darwin-arm64 runtime">
143
- This may be due to an outdated version of node. Try the following:
144
-
145
- 1. Remove the currently-installed version of the mint CLI: `npm uninstall -g mint`
146
- 2. Upgrade to Node.js.
147
- 3. Reinstall the mint CLI: `npm install -g mint`
148
- </Accordion>
149
-
150
- <Accordion title="Issue: Encountering an unknown error">
151
- **Solution**: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again.
152
- </Accordion>
153
-
154
- <Accordion title="Error: permission denied">
155
- This is due to not having the required permissions to globally install node packages.
156
-
157
- **Solution**: Try running `sudo npm i -g mint`. You will be prompted for your password, which is the one you use to unlock your computer.
158
- </Accordion>
159
-
160
- <Accordion title="The local preview doesn't look the same as my docs do on the web">
161
- This is likely due to an outdated version of the CLI.
162
-
163
- **Solution:** Run `mint update` to get the latest changes.
164
- </Accordion>
165
-
166
- <Accordion title="mintlify vs. mint package">
167
- If you have any problems with the CLI package, you should first run `npm ls -g`. This command shows what packages are globally installed on your machine.
168
-
169
- If you don't use npm or don't see it in the -g list, try `which mint` to locate the installation.
170
-
171
- If you have a package named `mint` and a package named `mintlify` installed, you should uninstall `mintlify`.
172
-
173
- 1. Uninstall the old package:
174
-
175
- ```bash
176
- npm uninstall -g mintlify
177
- ```
178
-
179
- 2. Clear your npm cache:
180
-
181
- ```bash
182
- npm cache clean --force
183
- ```
184
-
185
- 3. Reinstall the new package:
186
-
187
- ```bash
188
- npm i -g mint
189
- ```
190
- </Accordion>
191
- </AccordionGroup>
@@ -1,11 +0,0 @@
1
- ---
2
- title: 介绍
3
- sidebarTitle: 介绍
4
- ---
5
-
6
- Xiaozhi Client 是一个开源的MCP聚合工具。
7
- 使用 Xiaozhi Client 你可以将多个 MCP 服务的工具聚合在一起提供给小智接入点。
8
-
9
- <Frame>
10
- <img src="/images/preview.png" />
11
- </Frame>
@@ -1,108 +0,0 @@
1
- ---
2
- title: 快速上手
3
- sidebarTitle: 快速上手
4
- ---
5
-
6
- 快速入门指南将会向你展示最快速的安装、配置、启动方式。
7
-
8
- 完成本指南后,你将拥有一个可以自由集成不同 MCP 的服务,允许你可有控制提供给小智的 MCP 工具。
9
-
10
- <Note>
11
- **前期准备**:
12
- 在开始之前,你至少需要有一个小智硬件设备,并已添加至小智官方服务端。
13
- </Note>
14
-
15
- ## 环境准备
16
-
17
- 请先安装好 node 与 pnpm。
18
-
19
- <Note>如果你已经准备好 node & pnpm 可以跳过此步骤</Note>
20
-
21
- <Steps>
22
- <Step title="安装Node">
23
- 请前往 [Node官方安装地址](https://nodejs.org/en/download) 进行安装,并验证安装是否成功。
24
-
25
- 以下为 node:22(LTS) + pnpm 的安装方式
26
- <CodeGroup>
27
- ```bash macos / linux
28
- # 下载并安装 nvm:
29
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
30
-
31
- # 重启shell
32
- \. "$HOME/.nvm/nvm.sh"
33
-
34
- # 下载并安装 Node.js:
35
- nvm install 22
36
-
37
- # 验证 Node.js 版本:
38
- node -v # 应该打印出 "v22.19.0".
39
-
40
- # 下载并安装 pnpm:
41
- corepack enable pnpm
42
-
43
- # 验证 pnpm 版本:
44
- pnpm -v
45
- ```
46
-
47
- ```bash windows
48
- # 下载并安装 Chocolatey:
49
- powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
50
-
51
- # 下载并安装 Node.js:
52
- choco install nodejs --version="22.19.0"
53
-
54
- # 验证 Node.js 版本:
55
- node -v # 应该打印出 "v22.19.0".
56
-
57
- # 下载并安装 pnpm:
58
- corepack enable pnpm
59
-
60
- # 验证 pnpm 版本:
61
- pnpm -v
62
- ```
63
- </CodeGroup>
64
-
65
- </Step>
66
-
67
- <Step title="安装 xiaozhi-client 命令行工具">
68
- <CodeGroup>
69
- ```bash pnpm
70
- pnpm install -g xiaozhi-client
71
- ```
72
-
73
- ```bash npm
74
- npm install -g xiaozhi-client
75
- ```
76
- </CodeGroup>
77
- </Step>
78
-
79
- <Step title="创建应用">
80
- ```bash
81
- # 创建应用
82
- xiaozhi create my-app
83
-
84
- # 进入应用目录
85
- cd my-app
86
-
87
- # 安装依赖
88
- pnpm install
89
- ```
90
- </Step>
91
-
92
- <Step title="设置小智接入点">
93
- 小智AI配置MCP接入点的 [使用说明](https://ccnphfhqs21z.feishu.cn/wiki/HiPEwZ37XiitnwktX13cEM5KnSb)
94
- ```bash
95
- xiaozhi config set mcpEndpoint "<从小智服务端获取到的接入点地址>"
96
- ```
97
- </Step>
98
-
99
- <Step title="启动服务">
100
- ```bash
101
- xiaozhi start
102
- ```
103
- </Step>
104
-
105
- <Step title="验证是否成功">
106
- 最后,请前往小智服务端,检查对应的接入点,刷新后是否能获取到工具列表
107
- </Step>
108
- </Steps>