npm配置代理
npm config set https-proxy http://用户名:密码(特殊字符需转义)@IP:Port
npm config set proxy http://用户名:密码(特殊字符需转义)@IP:Port
power shell配置代理
env:HTTPS_PROXY = 'http://用户名:密码(特殊字符需转义)@IP:Port'
cmd配置代理
set PROXY = 'http://用户名:密码(特殊字符需转义)@IP:Port'
set HTTPS_PROXY = 'http://用户名:密码(特殊字符需转义)@IP:Port'
OpenCode配置代理
环境变量添加HTTP_PROXY和HTTPS_PROXY代理配置
模型库
ollama
设置镜像 set HUGGING_FACE_HUB_MIRROR=https://hf-mirror.com
查看模型api可访问性
curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d "{
\"model\": \"qwen2.5-coder-7b-fast\",
\"messages\": [{\"role\": \"user\", \"content\": \"hello\"}],
\"stream\": false
}"
OpenCode
1、模型配置,模型未运行会影响opencode启动
创建%userprofile%.config\opencode\config.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama": {
"name": "Ollama (local)",
"options": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"deepseek-coder:6.7b": {
"name": "deepseek-coder:6.7b",
"tools": true
}
}
}
},
"model": "deepseek-coder:6.7b"
}
2.oh-my-opencode配置
使用opencode GLM4.7运行按照以下说明为windows11上的OpenCode安装和配置 oh-my-opencode:https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/refs/heads/master/docs/guide/installation.md
config.json
{
"$schema": "https://opencode.ai/config.json",
"tui": {
"enableLLMRouter": true,
"streamOutput": false
},
"instructions": [
"You are an expert software engineer specializing in Python, Java, Vue3, Node.js, and TypeScript.",
"Generate production-ready code without redundant explanations.",
"Python: PEP8, Java: Alibaba规范, Vue3: Composition API, Node: v20+ best practices, TS: strict mode"
],
"autoupdate": false,
"plugin": [
"oh-my-opencode@3.1.8"
]
}
oh-my-opencode.json
{
"agents": {
"sisyphus": {
"enabled": true,
"model": "opencode/glm-4.7-free",
"description": "主开发Agent - 最强Agentic Coding能力"
},
"prometheus": {
"enabled": true,
"model": "opencode/glm-4.7-free"
},
"oracle": {
"enabled": true,
"model": "opencode/big-pickle",
"description": "代码审查 - 200K超大上下文适合审查大量代码"
},
"explore": {
"enabled": true,
"model": "opencode/big-pickle"
},
"librarian": {
"enabled": true,
"model": "opencode/big-pickle",
"description": "知识库管理 - 大上下文处理大量知识库内容"
},
"frontend-ui-ux-engineer": {
"enabled": true,
"model": "opencode/kimi-k2.5-free",
"description": "前端开发 - 多模态能力支持从设计稿生成代码"
},
"document-writer": {
"enabled": true,
"model": "opencode/big-pickle",
"description": "文档编写 - 128K输出限制适合长文档生成"
},
"atlas": {
"enabled": true,
"model": "opencode/minimax-m2.1-free",
"comment": "使用正确的 Anthropic 模型格式"
}
},
"fallback": {
"enabled": true,
"model": "opencode/minimax-m2.1-free",
"description": "MiniMax作为备用模型,适合多语言编程和移动开发"
},
"hooks": {
"auto-update-checker": {
"enabled": true
}
},
"mcps": {
"context7": {
"enabled": true
},
"grep-app": {
"enabled": true
}
}
}
3.superpowers
windows11环境opencode 1.1.44版本按https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md安装配置superpowers
SKILL
skill市场(https://skillsmp.com/),支持下载后离线安装
Mermaid
在线预览
导入Confluence方法:插入draw.io diagram-调整图形-插入-高级-mermaid
Trae
配置工程使用JDK、Maven、NodeJS
image.png
配置maven执行文件地址
image.png
配置maven setting配置工具级maven setting文件路径(推荐,存在读取全局配置报pom问题影响java方法在工具内跳转)
image.png
配置项目级maven setting文件路径
image.png
从vscode市场安装插件
Debugger for Java
Extension Pack for Java
Language Support for Java(TM) by Red Hat
Maven for Java
Project Manager for Java
Spring Boot Extension Pack
Spring Boot Tools
Spring Initializr Java Support
Spring Boot Dashboard
编译并install jar到本地maven仓库
maven视图install
image.png
命令行跳过测试
& "D:\Programs\apache-maven-3.9.13\bin\mvn.cmd" -s "D:\Programs\apache-maven-3.9.13\conf\settings.xml" clean install -D spring-boot.run.profiles=tst
通过Favorites分别开启终端运行指定profile的微服务(无法debug断点,但会在运行和调试出现debug进程)
image.png
打开新终端,运行以下命令启动springboot服务(工具内maven视图的plugin spring-boot 只能打开一个终端)
cd project_foler
& "D:\Programs\apache-maven-3.9.13\bin\mvn.cmd" -s "D:\Programs\apache-maven-3.9.13\conf\settings.xml" spring-boot:run -D spring-boot.run.profiles=tst
Debug微服务
视图内运行(推荐)配置launch.json
image.png
{
"type": "java",
"name": "pdms",
"request": "launch",
"mainClass": "com.fawvw.taf.pdms.PdmsApplication",
"projectName": "pdms",
"cwd": "${workspaceFolder}/taf-modules/pdms",
"args": ["--spring.profiles.active=tst"],
"console": "integratedTerminal",
"vmArgs": [
"-Xms512m",
"-Xmx1024m",
"-XX:+UseParallelGC"
],
"sourcePaths": [
"${workspaceFolder}/taf-modules/pdms/src/main/java"
]
}
通过运行与调试启动
image.png
也可通过Spring Dashboard启动
image.png
命令行运行
终端运行以下命令
cd project_foler
& "D:\Programs\apache-maven-3.9.13\bin\mvn.cmd" -s "D:\Programs\apache-maven-3.9.13\conf\settings.xml" spring-boot:run -D spring-boot.run.profiles=tst -D spring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
配置launch.json
image.png
{
"type": "java",
"name": "Debug PDMS",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
运行和调试,开始调试
image.png
找到调用堆栈暂停的线程,点击堆栈第1条,变量窗口可以查看及更改变量值
image.png











