← 返回目录

附录A 氛围编程中工具准备与常见操作

第 24 / 24 卷作者:伍斌日期:

附录A

氛围编程中工具准备与常见操作

附录A.1 安装或升级Trae国际版

要安装Trae国际版,可以登录Trae国际版官网,找到符合你的计算机操作系统的下载链接,点击之后即可下载。在下载目录双击下载的安装包,按照屏幕提示安

装即可。

要升级Trae国际版,在Trae国际版界面顶部的菜单中找到并点击“检查更新…”

即可,具体方法是:在macOS系统上选择“Trae”→“检查更新...”,在Windows 系统上选择“帮助”→“检查更新...”。

附录A.2 安装或升级Cursor

要安装Cursor,可以登录Cursor官网,找到符合你的计算机操作系统的下载链接,点击之后即可下载。在下载目录双击下载的安装包,按照屏幕提示安装即

可。

要升级Cursor,在Cursor界面顶部的菜单中找到并点击“检查更新…”即可,具体方法是:在macOS系统上选择“Cursor”→“检查更新...”,在Windows系统上

选择“帮助”→“检查更新...”。

附录A.3 安装或升级Windsurf

要安装Windsurf,可以登录Windsurf官网,然后找到符合你的计算机操作系统的下载链接,点击之后即可下载。在下载目录双击下载的安装包,按照屏幕提示安

装即可。

要升级Windsurf,在Windsurf界面顶部的菜单中找到并点击“检查更新…”即可,具体方法是:在macOS系统上选择“Windsurf”→“检查更新...”,在

Windows系统上选择“帮助”→“检查更新...”。

附录A.4 安装或升级微信开发者工具

要安装微信开发者工具,搜索“微信开发者工具”,找到“微信开发社区”下面的“微信开发者工具下载地址与更新日志”链接并点击,之后选择符合你的计算

机操作系统的“稳定版”链接,点击之后即可下载。在下载目录双击下载的安装包,按照屏幕提示安装即可。

要升级微信开发者工具,在微信开发者工具界面顶部的菜单中找到并点击“检查更新…”即可,具体方法是:在macOS系统上选择“微信开发者工具”→“检查更

新...”,在Windows系统上选择“帮助”→“检查更新...”。

附录A.5 安装或升级Visual Studio Code

要安装Visual Studio Code,可以登录Visual Studio Code官网,找到符合你的计算机操作系统的下载链接,点击之后即可下载。在下载目录双击下载的安装

包,按照屏幕提示安装即可。

要升级Visual Studio Code,在Visual Studio Code界面顶部的菜单中找到并点击“检查更新…”即可,具体方法是:在macOS系统上选择“Code”→“检查更

新...”,在Windows系统上选择“帮助”→“检查更新...”。

附录A.6 在Visual Studio Code中安装或升级Copilot插件

要在Visual Studio Code中安装Copilot插件,可以点击Visual Studio Code界面左侧边栏从上往下第5个名为“Extensions”的图标,在弹出的界面顶部搜索框中

输入“copilot”,找到“GitHub Copilot”插件并点击右下方的“Install”按钮安装。注意,安装此插件时会同时安装“GitHub Copilot Chat”插件,这两个

插件始终成对安装和卸载。

当Visual Studio Code的Copilot插件有新版本时,Visual Studio Code通常会在左侧边栏的“Extensions”图标上显示一个蓝色背景的数字。点击该图标,找到

“GitHub Copilot”插件,然后点击右下方的“Restart Extensions”按钮即可完成升级。

附录A.7 在Copilot中配置Linear MCP服务器

在Team中创建Project,最后在Project中创建issue。

接下来,打开Visual Studio Code,在其顶部菜单中找到并选择“Settings”菜单项即可,具体方法是:在macOS系统上选择“Code”→“Preferences”

→“Settings”,Windows/Ubuntu系统选择“File”→“Preferences”

→“Settings”。在右侧打开的“Settings”界面顶部的搜索框中输入“mcp”。

在下方搜索结果中,找到“Mcp”条目,点击其下方的“Edit in settings.json”链接,打开“settings.json”文件。最后,在该文件底部最后

一个“}”上方添加以下“mcp”内容:

// settings.json {

// ... settings.json文件底部

"mcp": {

"servers": {

"linear": {

"type": "stdio", "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.linear.app/sse"]

}

}

}

// ... settings.json文件内容结束

} //最后一个“{”

之后在Visual Studio Code中按快捷键(在macOS系统上用“Cmd+Shift+P”, Windows/Ubuntu系统上用“Ctrl+Shift+P”),在弹出的Command Palette搜索框

中搜索“MCP:list servers”。然后点击下面列出的“linear”(即上面 settings.json中配置的MCP服务器名),再点击“start server”。如果在浏览

器中出现“MCP CLI Proxy is requesting access”页面,点击下方的 “Approve”按钮。

Cmd+I”,在Windows/Ubuntu系统上用“Ctrl+Alt+I”)打开CHAT右侧边栏。在 CHAT界面左下角选择“Agent”模式,然后在提示词输入框中输入“请列出分配给

我的所有issue”,即可查看在Linear中分配给你的所有issue。

附录A.8 安装或升级Git

在安装Git前,可以先在计算机上打开终端(在macOS/Ubuntu系统上用Terminal,在Windows系统上用CMD),然后在其中输入以下命令检查Git版本号(也可以在之

后的安装和升级步骤后执行该命令以查看版本号):

git --version 如果终端显示Git的版本号,例如“git version 2.49.0”,则表明计算机已安装Git,无须再次安装。如果版本较低,可以跳过安装步骤,直接查看

如何升级。

如果终端提示找不到Git命令,说明尚未安装Git,需要进行安装。建议使用包管理器安装,而非Git官网的安装包,因为包管理器可以更方便地进行Git的后续升

级。

1.在macOS系统上安装Git

要在macOS系统上安装Git,可以在终端运行下面的命令查看包管理器brew的版本号:

brew --version 若终端回复找不到brew命令,可以先安装macOS系统上的热门包管理器brew,即在浏览器中访问brew的主页,按照其中的提示进行安装。

安装好brew后,就可以在终端中运行下面的命令安装Git:

brew install git 2.在macOS系统上升级Git

要在macOS系统上升级Git,可以在macOS系统的终端中运行下面的命令:

# 从远程仓库获取最新的软件包信息,如果成功,那么升级Git到最新版本

brew update && brew upgrade git

# 列出安装后的Git在包管理器中的版本号

winget install --id Git.Git -e --source winget

# 列出安装后的Git在包管理器中的版本号

winget list git 4.在Windows系统上升级Git

要在Windows系统上升级Git,可以在Windows系统的终端中运行下面的命令:

winget upgrade --id Git.Git 5.在Ubuntu系统上安装Git

要在Ubuntu系统上安装Git,可以在终端运行包管理器apt进行安装:

sudo apt install git

# 列出安装后的Git在包管理器中的版本号

apt show git | grep Version 6.在Ubuntu系统上升级Git

要在Ubuntu系统上升级Git,可以在Ubuntu系统的终端中运行下面的命令:

sudo apt update && sudo apt upgrade git

附录A.9 在个人目录解压zip包

想在macOS/Ubuntu系统的个人目录(在macOS系统上一般是“Users”目录,在 Ubuntu系统上一般是“home”目录)中解压zip包,可以先把下载的zip包移动到

个人目录,然后在终端中运行下面的命令:

# 进入个人目录

cd

# 解压

unzip ./<zip包的文件名> 想在Windows系统的个人目录(一般是“C:\Users”目录)

中解压zip包,可以先把下载的zip包移动到个人目录,然后在命令提示符终端中运行下面的命令:

cd

# 用包管理器winget安装7zip winget install 7zip.7zip

# 临时把安装后的可执行文件的路径添加到当前CMD会话的PATH环境变量里

$env:PATH += ";C:\Program Files\7-Zip"

# 解压

7z x .\<zip包的文件名>

附录A.10 在Visual Studio Code内置终端运行npm命令

想在Visual Studio Code内置终端运行npm命令,可以在Visual Studio Code顶部菜单中选择“View”→“Terminal”。此时Visual Studio Code界面下方会出现

终端区域,可以在其中输入并运行npm命令。

附录A.11 解决在Visual Studio Code内置终端运行npm

install命令出错问题

要修复Visual Studio Code内置终端运行npm install命令(包括其他命令)出现的错误,可以先用鼠标选中内置终端中完整的出错命令行和错误消息,然后在

CHAT聊天窗口的提示词输入框(搭配Claude大模型,选择Ask模式)输入并提交以下提示词,Copilot就会解释错误原因并提供修复方案:

@terminal /explain #terminalSelection 之后就可以按照Copilot给出的解决方案进行修复。

配套资源验证码251727

Copyright Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’.

License This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also

available with a FAQ at: http://scripts.sil.org/OFL SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 PREAMBLE The goals of the

Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts

of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in

partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they

are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with

any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be

released under any other type of license. The requirement for fonts to remain under this license does not apply to any document

created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright

Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved

Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the

collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative

made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by

changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer,

programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby

granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify,

redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font

Software nor any of its individual components, in Original or

Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above

copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the

appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3)

No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the

corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of

the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified

Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit

written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this

license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply

to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are

not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT

LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,

TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY

GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

图 253-1
图 253-1

*文中代码字体版权说明

全站分卷索引 · 24 卷
  1. 1内容提要
  2. 2对本书的赞誉
  3. 3氛围编程:打开一扇软件开发的新大门
  4. 4氛围编程:极大释放整个社会的创新能力
  5. 5当自然语言成为编程语言时,软件世界将如何进化
  6. 6氛围编程让编程不再高冷
  7. 7当我看到编程真的像聊天一样简单
  8. 8前言
  9. 9致谢
  10. 10第一部分 基础
  11. 11第1章 颠覆传统的氛围编程
  12. 12第二部分 入门
  13. 13第2章 用扣子实现“减少AI幻觉”智能体
  14. 14第3章 用Windsurf等5款工具可视化数据
  15. 15第4章 用Claude和通义等分析Excel数据
  16. 16第三部分 快速
  17. 17第5章 用Trae实现微信小程序
  18. 18第6章 用bolt和Trae等4款工具快速实现Web产品原型
  19. 19第四部分 进阶
  20. 20第7章 用GitHub Copilot实现前后端分离的Web应用
  21. 21第8章 用Cursor保护代码逻辑不被破坏
  22. 22第五部分 攻略
  23. 23第9章 氛围编程攻略与工具和大模型选择指南
  24. 24附录A 氛围编程中工具准备与常见操作