阅读建议:按需取用,别一次全装。文末打包了 .vscode/settings.json、.npmrc、.cursorrules 等现成配置,下载即用。
一、终端与 Shell:把命令行变成超能力
1. Warp — 智能终端(Mac/Win/Linux)
- 杀手锏:AI 命令生成(
Ctrl+ ` 自然语言变命令)、块状输出可展开/折叠、团队共享 Workflows
- 替代:Windows 推荐 WezTerm + Oh My Posh,Linux 原生 Ghostty
1 2
| brew install --cask warp
|
2. zoxide — cd 的智能替代品
1 2 3
| curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh echo 'eval "$(zoxide init zsh)"' >> ~/.zshrc
|
3. atuin — 云端同步的历史记录
- 加密存储、多端同步、Ctrl+R 交互式搜索、统计命令频次
1 2 3
| brew install atuin atuin import auto atuin sync
|
二、VS Code 必装插件(仅列「装完即爽」的 5 个)
| 插件 |
一句话理由 |
关键设置 |
| Error Lens |
把报错/警告直接内联在代码行尾,不用再盯着「问题」面板 |
"errorLens.enabled": true |
| GitLens |
行级 blame、提交搜索、可视化分支图,Git 历史变可读 |
默认即可 |
| i18n Ally |
t('key') 悬浮显示中文、一键提取、CSV/JSON 互转 |
"i18n-ally.localesPaths": ["locales"] |
| REST Client |
.http 文件写接口测试,告别 Postman 重型客户端 |
无需配置 |
| CodeSnap |
一键生成带渐变背景、行号、水印的代码片图,发技术群/朋友圈专用 |
"codesnap.backgroundColor": "#1e1e2e" |
一键同步:把下面 .vscode/settings.json 扔进项目根目录,团队成员克隆即同配置。
三、AI 辅助编程:别让大模型只会「写代码」
4. Cursor — 代码库级上下文的 IDE
@Codebase 搜全项目、Ctrl+K 行内重构、Cmd+L 聊天、.cursorrules 定制团队规范
.cursorrules 落盘即用(放项目根目录):
1 2 3 4 5 6 7 8 9
| # .cursorrules 你是资深前端工程师,遵循以下约束: - 框架:Vue 3 + TypeScript + Vite + Pinia + Vue Router - 代码风格:ESLint (standard) + Prettier + TypeScript strict - 组件:`<script setup>` + `defineProps/Emits` + 单文件组件 - CSS:Tailwind CSS + CSS Modules,禁用 inline style - 提交信息:Conventional Commits (feat/fix/chore/docs/refactor/test) - 禁止:any 类型、console.log、未使用的导入、魔法数字 - 测试:Vitest + Vue Test Utils,覆盖核心逻辑
|
5. GitHub Copilot Chat — 原生 VS Code 集成
@workspace 上下文、/explain /fix /tests 斜杠命令、内联建议
6. Sourcegraph Cody — 免费、支持本地模型(Ollama)
- 适合不想上传代码的私有项目,
cody chat + cody edit
四、包管理与构建:快、严、可复现
7. pnpm — 磁盘友好、严格依赖、Monorepo 原生支持
1 2 3 4 5 6
| engine-strict=true auto-install-peers=true shamefully-hoist=false strict-peer-dependencies=true resolution-mode=highest
|
1 2 3 4 5
| { "packageManager": "pnpm@9.6.0", "engines": { "node": ">=20.0.0" } }
|
8. Vite + esbuild + Rolldown — 开发毫秒级、生产最优
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| export default defineConfig({ build: { target: 'es2022', minify: 'esbuild', cssCodeSplit: true, rollupOptions: { output: { manualChunks: { vendor: ['vue', 'vue-router', 'pinia'] } } } }, esbuild: { drop: ['console', 'debugger'] }, server: { hmr: { overlay: false } } })
|
9. knip — 死代码/未用依赖/未导出类型一键清理
CI 加一步 knip,防止「依赖只增不减」。
五、调试与文档:让问题显形、让文档自写
- Long Animation Frames (LoAF):直接定位卡顿帧
- User Timing API:
performance.mark('fetch-start') / measure('fetch', 'fetch-start', 'fetch-end') 打点,火焰图里一眼看到业务耗时
11. TypeDoc + typedoc-vite-plugin — 类型即文档
1
| pnpm add -D typedoc typedoc-vite-plugin
|
1 2 3 4 5 6 7 8 9 10 11
| import typedoc from 'typedoc-vite-plugin'; export default defineConfig({ plugins: [typedoc({ entryPoints: ['src/**/*.ts'], out: 'docs/api', readme: 'README.md', excludeInternal: true, categorizeByGroup: true })] });
|
pnpm run build 同时产出 docs/api/index.html,部署到 GitHub Pages 即是组件库官网。
12. Repomix — 把整个代码库打包成单文件喂给大模型
1
| npx repomix --include "src/**/*" --output context.txt
|
- 自动剔除
node_modules、dist、锁文件
- 生成
context.txt 直接拖进 Cursor/Claude/ChatGPT,上下文全喂进去
六、配置文件打包下载(复制即用)
.vscode/settings.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "typescript.tsdk": "node_modules/typescript/lib", "vetur.validation.template": true, "vue.codeActions.enabled": true, "files.associations": { "*.vue": "vue" }, "emmet.includeLanguages": { "vue-html": "html" }, "search.exclude": { "**/node_modules": true, "**/dist": true, "**/.git": true }, "terminal.integrated.defaultProfile.osx": "zsh", "workbench.colorTheme": "One Dark Pro", "errorLens.enabled": true, "i18n-ally.localesPaths": ["src/locales"], "codesnap.backgroundColor": "#1e1e2e", "codesnap.containerPadding": "16px", "codesnap.roundedCorners": true }
|
.npmrc
1 2 3 4 5 6 7
| engine-strict=true auto-install-peers=true shamefully-hoist=false strict-peer-dependencies=true resolution-mode=highest save-exact=true prefer-frozen-lockfile=true
|
.prettierrc
1
| { "singleQuote": true, "semi": true, "printWidth": 100, "trailingComma": "es5", "vueIndentScriptAndStyle": true }
|
.eslintrc.cjs(Vue 3 + TS + Prettier 兼容)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| module.exports = { root: true, env: { browser: true, es2022: true, node: true }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended-type-checked', 'plugin:vue/vue3-recommended', 'prettier' ], parser: 'vue-eslint-parser', parserOptions: { ecmaVersion: 'latest', sourceType: 'module', project: './tsconfig.json', tsconfigRootDir: __dirname, extraFileExtensions: ['.vue'] }, plugins: ['vue', '@typescript-eslint', 'prettier'], rules: { 'prettier/prettier': 'error', 'vue/multi-word-component-names': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], '@typescript-eslint/consistent-type-imports': 'error' } };
|
tsconfig.json(严格模式)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| { "compilerOptions": { "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "preserve", "strict": true, "noUncheckedIndexedAccess": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "isolatedModules": true, "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, "types": ["vite/client", "vue", "vue-router", "pinia", "@types/node"], "baseUrl": ".", "paths": { "@/*": ["src/*"] } }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "exclude": ["node_modules", "dist"] }
|
七、一张表:工具 → 解决的痛点 → 替代品
| 痛点 |
首选工具 |
备选/补充 |
| 终端记不住目录 |
zoxide |
autojump / fasd |
| 历史命令找不到、多机不同步 |
atuin |
mcfly / fzf + history |
| 代码报错要跳「问题面板」 |
Error Lens |
内联诊断 |
| 提交历史看不懂谁改了啥 |
GitLens |
git log --oneline --graph |
| 接口调试不想开 Postman |
REST Client |
curl + jq / httpie |
| 截代码图丑、费劲 |
CodeSnap |
carbon.now.sh / ray.so |
| AI 不懂项目上下文 |
Cursor / Cody |
repomix + 任意 LLM |
| 依赖越积越多、死代码不敢删 |
knip |
depcheck / unused-files |
| 文档写完就过期 |
TypeDoc |
storybook / docusaurus |
| 构建慢、包大 |
Vite + esbuild + Rolldown |
rsbuild / turbopack |
| 生产 console 污染日志 |
esbuild drop |
terser / babel-plugin-transform-remove-console |
八、结语
工具是杠杆,不是目的。
- 先解决「痛点」再装工具,别为了装而装。
- 配置文件入库,新人克隆即同环境,杜绝「我机器上能跑」。
- 定期清理:每季度跑一次
knip、审视一次插件列表、更新一次 .cursorrules。
下一步:把本文附带的配置文件扔进你的脚手架模板(create-my-app / vite-preset),下次 pnpm create my-app 直接开干。
工具版本基于 2026-07 测试,文中配置已在生产项目(Vue 3 + TS + Vite 5 + pnpm 9)验证通过。
封面/配图:picsum.photos 随机生成,生产环境请替换为自有 CDN 资源。