Skip to content

Commit 2b4c90f

Browse files
committed
feat(installer): 重构安装脚本并添加应用配置
重构安装脚本以支持从配置文件自动安装开发工具 添加 apps-config.json 配置文件定义各类包管理器应用 优化包管理器初始化逻辑和错误处理
1 parent 37949c9 commit 2b4c90f

2 files changed

Lines changed: 337 additions & 261 deletions

File tree

profile/installer/apps-config.json

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
{
2+
"packageManagers": {
3+
"choco": [
4+
{
5+
"name": "bat",
6+
"cliName": "bat",
7+
"description": "cat的替代品",
8+
"command": "choco install bat -y"
9+
},
10+
{
11+
"name": "twinkle-tray",
12+
"cliName": "twinkle-tray",
13+
"description": "一个调节屏幕亮度的软件,win10的亮度调节可太垃圾了。",
14+
"command": "choco install twinkle-tray -y",
15+
"skipInstall": true
16+
},
17+
{
18+
"name": "eartrumpet",
19+
"cliName": "eartrumpet",
20+
"description": "替代win10的音量调节",
21+
"command": "choco install eartrumpet -y",
22+
"skipInstall": true
23+
},
24+
{
25+
"name": "fd",
26+
"cliName": "fd",
27+
"description": "搜索用的命令行工具",
28+
"command": "choco install fd -y"
29+
},
30+
{
31+
"name": "lsd",
32+
"cliName": "lsd",
33+
"description": "代替linux的ls命令",
34+
"command": "choco install lsd -y"
35+
},
36+
{
37+
"name": "hyperfine",
38+
"cliName": "hyperfine",
39+
"description": "命令行跑分工具",
40+
"command": "choco install hyperfine -y"
41+
}
42+
],
43+
"scoop": [
44+
{
45+
"name": "fnm",
46+
"cliName": "fnm",
47+
"description": "nvm的rust替代,跨平台node版本管理",
48+
"command": "scoop install fnm"
49+
},
50+
{
51+
"name": "git",
52+
"cliName": "git",
53+
"description": "版本控制系统",
54+
"command": "scoop install git"
55+
},
56+
{
57+
"name": "sudo",
58+
"cliName": "sudo",
59+
"description": "win提权",
60+
"command": "scoop install sudo"
61+
},
62+
{
63+
"name": "starship",
64+
"cliName": "starship",
65+
"description": "跨平台shell提示符",
66+
"command": "scoop install starship"
67+
},
68+
{
69+
"name": "ffmpeg",
70+
"cliName": "ffmpeg",
71+
"description": "音视频处理工具",
72+
"command": "scoop install ffmpeg"
73+
},
74+
{
75+
"name": "fzf",
76+
"cliName": "fzf",
77+
"description": "go编写的模糊查找神器",
78+
"command": "scoop install fzf"
79+
},
80+
{
81+
"name": "ripgrep",
82+
"cliName": "rg",
83+
"description": "rust正则查找神器",
84+
"command": "scoop install ripgrep"
85+
},
86+
{
87+
"name": "cht",
88+
"cliName": "cht",
89+
"description": "命令行备忘单工具",
90+
"command": "scoop install cht"
91+
},
92+
{
93+
"name": "aria2",
94+
"cliName": "aria2c",
95+
"description": "多线程下载工具",
96+
"command": "scoop install aria2"
97+
},
98+
{
99+
"name": "vhs",
100+
"cliName": "vhs",
101+
"description": "录制终端操作到gif",
102+
"command": "scoop install vhs"
103+
},
104+
{
105+
"name": "caddy",
106+
"cliName": "caddy",
107+
"description": "golang的web服务器,类似nginx",
108+
"command": "scoop install caddy"
109+
},
110+
{
111+
"name": "jq",
112+
"cliName": "jq",
113+
"description": "命令行处理json",
114+
"command": "scoop install jq"
115+
},
116+
{
117+
"name": "tokei",
118+
"cliName": "tokei",
119+
"description": "rust git仓库代码统计",
120+
"command": "scoop install tokei"
121+
},
122+
{
123+
"name": "lazygit",
124+
"cliName": "lazygit",
125+
"description": "git的TUI界面",
126+
"command": "scoop install lazygit"
127+
},
128+
{
129+
"name": "lazydocker",
130+
"cliName": "lazydocker",
131+
"description": "docker的TUI界面",
132+
"command": "scoop install lazydocker"
133+
},
134+
{
135+
"name": "zoxide",
136+
"cliName": "z",
137+
"description": "更智能的cd",
138+
"command": "scoop install zoxide"
139+
},
140+
{
141+
"name": "scc",
142+
"cliName": "scc",
143+
"description": "代码行数统计工具",
144+
"command": "scoop install scc"
145+
}
146+
],
147+
"winget": [
148+
{
149+
"name": "eartrumpet",
150+
"cliName": "eartrumpet",
151+
"description": "替代win10的音量调节",
152+
"command": "winget install eartrumpet"
153+
}
154+
],
155+
"cargo": [
156+
{
157+
"name": "sccache",
158+
"cliName": "sccache",
159+
"description": "可以用于在不同的工作空间中共享已经构建好的依赖包,提升构建速度",
160+
"command": "cargo install sccache"
161+
},
162+
{
163+
"name": "sd",
164+
"cliName": "sd",
165+
"description": "linux sed命令行的rust实现,执行速度快2倍以上",
166+
"command": "cargo install sd"
167+
},
168+
{
169+
"name": "dust",
170+
"cliName": "dust",
171+
"description": "查看磁盘占用情况",
172+
"command": "cargo install du-dust"
173+
},
174+
{
175+
"name": "tokei",
176+
"cliName": "tokei",
177+
"description": "统计各种语言的代码行数",
178+
"command": "cargo install tokei"
179+
},
180+
{
181+
"name": "btm",
182+
"cliName": "btm",
183+
"description": "rust 版本的top,任务管理器bottom",
184+
"command": "cargo install bottom"
185+
},
186+
{
187+
"name": "tldr",
188+
"cliName": "tldr",
189+
"description": "rust版本tldr 太长不看帮助文档",
190+
"command": "cargo install tealdeer"
191+
},
192+
{
193+
"name": "grex",
194+
"cliName": "grex",
195+
"description": "根据用户输入生成正则表达式",
196+
"command": "cargo install grex"
197+
},
198+
{
199+
"name": "zoxide",
200+
"cliName": "z",
201+
"description": "更智能的cd",
202+
"command": "cargo install zoxide"
203+
},
204+
{
205+
"name": "pueue",
206+
"cliName": "pueue",
207+
"description": "命令行任务管理工具,它可以管理你的长时间运行的命令,支持顺序或并行执行。简单来说,它可以管理一个命令队列。",
208+
"command": "cargo install --locked pueue"
209+
},
210+
{
211+
"name": "watchexec",
212+
"cliName": "watchexec",
213+
"description": "监听到文件变动后执行命令",
214+
"command": "cargo install --locked watchexec-cli"
215+
},
216+
{
217+
"name": "cargo-watch",
218+
"cliName": "cargo-watch",
219+
"description": "监听变动执行cargo操作,和watchexec是同一个开发者",
220+
"command": "cargo install cargo-watch"
221+
},
222+
{
223+
"name": "broot",
224+
"cliName": "broot",
225+
"description": "文件目录管理",
226+
"command": "cargo install broot"
227+
},
228+
{
229+
"name": "hexyl",
230+
"cliName": "hexyl",
231+
"description": "终端查看16进制",
232+
"command": "cargo install hexyl"
233+
}
234+
],
235+
"homebrew": [
236+
{
237+
"name": "powershell",
238+
"cliName": "pwsh",
239+
"description": "powershell",
240+
"command": "brew install powershell",
241+
"supportOs": ["macOS"]
242+
},
243+
{
244+
"name": "pyenv",
245+
"cliName": "pyenv",
246+
"description": "python版本管理工具",
247+
"command": "brew install pyenv"
248+
},
249+
{
250+
"name": "xz",
251+
"cliName": "xz",
252+
"description": "xz压缩工具",
253+
"command": "brew install xz"
254+
},
255+
{
256+
"name": "go",
257+
"cliName": "go",
258+
"description": "golang",
259+
"command": "brew install go"
260+
}
261+
]
262+
}
263+
}

0 commit comments

Comments
 (0)