Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
wangle201210
wachat
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
wachat
/
setup.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
69 lines (53 loc) · 1.46 KB
main
Breadcrumbs
wachat
/
setup.sh
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
69 lines (53 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
# Wails Chat 快速安装脚本
set -e
echo "🚀 开始设置 Wails Chat..."
# 检查 Go
if ! command -v go &> /dev/null; then
echo "❌ Go 未安装。请先安装 Go 1.21 或更高版本"
echo " 访问: https://go.dev/dl/"
exit 1
fi
echo "✅ Go 已安装: $(go version)"
# 检查 Node.js
if ! command -v node &> /dev/null; then
echo "❌ Node.js 未安装。请先安装 Node.js 20.19.0 或更高版本"
exit 1
fi
echo "✅ Node.js 已安装: $(node --version)"
# 检查 pnpm
if ! command -v pnpm &> /dev/null; then
echo "📦 安装 pnpm..."
npm install -g pnpm
fi
echo "✅ pnpm 已安装: $(pnpm --version)"
# 检查 Wails CLI
if ! command -v wails &> /dev/null; then
echo "📦 安装 Wails CLI..."
go install github.com/wailsapp/wails/v2/cmd/wails@latest
# 确保 GOPATH/bin 在 PATH 中
export PATH=$PATH:$(go env GOPATH)/bin
fi
echo "✅ Wails CLI 已安装"
# 安装 Go 依赖
echo "📦 安装 Go 依赖..."
go mod tidy
# 安装前端依赖
echo "📦 安装前端依赖..."
cd frontend
pnpm install
cd ..
# 创建 .env 文件
if [ ! -f .env ]; then
echo "📝 创建 .env 文件..."
cp .env.example .env
echo "⚠️ 请编辑 .env 文件并添加你的 API Key"
fi
echo ""
echo "✨ 设置完成!"
echo ""
echo "下一步:"
echo " 1. 编辑 .env 文件配置 API Key (可选)"
echo " 2. 运行 'wails dev' 启动开发服务器"
echo " 3. 或运行 'wails build' 构建生产版本"
echo ""
You can’t perform that action at this time.