devtools-hub-installer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DevTools Hub Installer

DevTools Hub 安装程序

Skill by ara.so — Devtools Skills collection.
DevTools Hub is a Windows desktop application and CLI for installing and managing developer tools. It provides a unified interface for provisioning development machines with version control, runtimes, package managers, editors, databases, containers, and system dependencies.
ara.so提供的Skill——Devtools Skills合集。
DevTools Hub是一款Windows桌面应用及CLI工具,用于安装和管理开发工具。它提供统一界面,可为开发机器配置版本控制工具、运行时环境、包管理器、编辑器、数据库、容器及系统依赖。

Installation

安装步骤

Download the latest release from GitHub Releases:
bash
undefined
GitHub Releases下载最新版本:
bash
undefined

Download and run the installer

下载并运行安装程序

DevTools Hub Setup 1.2.0.exe

The installer requires Windows 10/11 (x64). Most operations require administrator permissions for system-level tool installation and PATH updates.
DevTools Hub Setup 1.2.0.exe

安装程序要求Windows 10/11(x64)系统。大多数操作需要管理员权限,以完成系统级工具安装和PATH环境变量更新。

Desktop Application

桌面应用

Launch DevTools Hub from the Start menu or desktop shortcut. The GUI provides:
  • Tool Discovery: Browse available developer tools by category
  • Status Detection: Real-time installed/not-installed status from registry PATH
  • Batch Installation: Select multiple tools and install in parallel
  • Developer Profiles: One-click installation of curated tool sets
  • Install Logs: Troubleshooting output for failed installations
The app uses UAC elevation for install/uninstall operations and streams stdout progress in real-time.
从开始菜单或桌面快捷方式启动DevTools Hub。GUI提供以下功能:
  • 工具发现:按类别浏览可用的开发工具
  • 状态检测:通过注册表和PATH实时检测工具已安装/未安装状态
  • 批量安装:选择多个工具并并行安装
  • 开发者配置文件:一键安装预配置的工具集
  • 安装日志:查看安装失败时的故障排查输出
应用在执行安装/卸载操作时会使用UAC权限提升,并实时流式输出stdout进度。

CLI Usage

CLI 使用方法

After building the project, the CLI is available at
dist/cli/cli.js
. Link it globally or invoke directly:
bash
undefined
项目构建完成后,CLI可在
dist/cli/cli.js
路径下使用。可全局链接或直接调用:
bash
undefined

List all available tools

列出所有可用工具

devtoolshub list
devtoolshub list

Install single or multiple tools

安装单个或多个工具

devtoolshub install git devtoolshub install node python docker
devtoolshub install git devtoolshub install node python docker

Check installation status

检查安装状态

devtoolshub status
devtoolshub status

Show detailed diagnostics

显示详细诊断信息

devtoolshub diagnose
devtoolshub diagnose

Export current configuration

导出当前配置

devtoolshub export-config > devtools-config.json
devtoolshub export-config > devtools-config.json

Update installed tools (via winget)

更新已安装工具(通过winget)

devtoolshub update git devtoolshub update --all
devtoolshub update git devtoolshub update --all

Uninstall tools (UAC-elevated)

卸载工具(需UAC权限提升)

devtoolshub uninstall docker
undefined
devtoolshub uninstall docker
undefined

Available Tools

可用工具

DevTools Hub includes installers for:
Version Control
  • git
    ,
    github-desktop
    ,
    git-lfs
CLI Tools
  • github-cli
    ,
    codex-cli
    ,
    claude-cli
Runtimes
  • node
    ,
    python
    ,
    go
    ,
    rust
    ,
    deno
    ,
    bun
    ,
    java
Package Managers
  • yarn
    ,
    maven
    ,
    gradle
Editors
  • vscode
Databases
  • postgresql
    ,
    mongodb
    ,
    redis
    ,
    mysql
    ,
    mariadb
    ,
    sqlserver-express
DevOps
  • docker
    ,
    docker-compose
API Testing
  • postman
Web Server Stack
  • wampserver
    ,
    apache
    ,
    php
    ,
    phpmyadmin
    ,
    adminer
    ,
    xdebug
System Libraries
  • vcredist
    (Visual C++ Redistributables)
DevTools Hub包含以下类别的安装程序:
版本控制
  • git
    ,
    github-desktop
    ,
    git-lfs
CLI工具
  • github-cli
    ,
    codex-cli
    ,
    claude-cli
运行时环境
  • node
    ,
    python
    ,
    go
    ,
    rust
    ,
    deno
    ,
    bun
    ,
    java
包管理器
  • yarn
    ,
    maven
    ,
    gradle
编辑器
  • vscode
数据库
  • postgresql
    ,
    mongodb
    ,
    redis
    ,
    mysql
    ,
    mariadb
    ,
    sqlserver-express
DevOps工具
  • docker
    ,
    docker-compose
API测试
  • postman
Web服务器栈
  • wampserver
    ,
    apache
    ,
    php
    ,
    phpmyadmin
    ,
    adminer
    ,
    xdebug
系统库
  • vcredist
    (Visual C++ 可再发行组件)

Development Setup

开发环境搭建

Clone and build the project:
bash
undefined
克隆并构建项目:
bash
undefined

Clone repository

克隆仓库

Install dependencies

安装依赖

npm install
npm install

Run in development mode

以开发模式运行

npm run dev
npm run dev

Build renderer, main process, and CLI

构建渲染进程、主进程和CLI

npm run build
npm run build

Create distributable

创建可分发包

npm run dist

Requires Node.js >= 18.
npm run dist

要求Node.js版本 >= 18。

Project Structure

项目结构

src/
  cli/              # Command-line interface
  main/             # Electron main process and IPC handlers
  renderer/         # React application (Vite + Tailwind CSS)
  shared/           # Shared tool metadata and types
installers/
  windows/          # PowerShell installers (asar-unpacked)
resources/          # App icons and packaged assets
src/
  cli/              # 命令行界面
  main/             # Electron主进程和IPC处理器
  renderer/         # React应用(基于Vite + Tailwind CSS)
  shared/           # 共享工具元数据和类型定义
installers/
  windows/          # PowerShell安装脚本(asar-unpacked)
resources/          # 应用图标和打包资源

Adding New Tools

添加新工具

To add a new tool to the catalog:
  1. Update Tool Metadata (
    src/shared/tools.ts
    ):
typescript
export interface Tool {
  id: string;
  name: string;
  category: string;
  description: string;
  installer: string;  // PowerShell script filename
  wingetId?: string;  // For update support
}

export const tools: Tool[] = [
  // ... existing tools
  {
    id: 'newtool',
    name: 'New Tool',
    category: 'Runtimes',
    description: 'Description of the tool',
    installer: 'newtool.ps1',
    wingetId: 'Publisher.NewTool'
  }
];
  1. Create PowerShell Installer (
    installers/windows/newtool.ps1
    ):
powershell
undefined
如需向工具目录添加新工具,请遵循以下步骤:
  1. 更新工具元数据
    src/shared/tools.ts
    ):
typescript
export interface Tool {
  id: string;
  name: string;
  category: string;
  description: string;
  installer: string;  // PowerShell脚本文件名
  wingetId?: string;  // 用于支持更新
}

export const tools: Tool[] = [
  // ... 现有工具
  {
    id: 'newtool',
    name: 'New Tool',
    category: 'Runtimes',
    description: 'Description of the tool',
    installer: 'newtool.ps1',
    wingetId: 'Publisher.NewTool'
  }
];
  1. 创建PowerShell安装脚本
    installers/windows/newtool.ps1
    ):
powershell
undefined

newtool.ps1

newtool.ps1

param( [string]$InstallPath = "C:\Program Files\NewTool" )
Write-Host "Installing New Tool..."
try { # Download installer $url = "https://example.com/newtool-installer.exe" $installer = "$env:TEMP\newtool-installer.exe" Invoke-WebRequest -Uri $url -OutFile $installer
# Run installer
Start-Process -FilePath $installer -ArgumentList "/S" -Wait

# Add to PATH if needed
$currentPath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if ($currentPath -notlike "*$InstallPath*") {
    [Environment]::SetEnvironmentVariable(
        "Path",
        "$currentPath;$InstallPath",
        "Machine"
    )
}

Write-Host "New Tool installed successfully"
exit 0
} catch { Write-Error "Installation failed: $_" exit 1 }

3. **Update Tool Detection** (`src/main/detection.ts`):

```typescript
export async function detectInstalledTools(): Promise<Map<string, boolean>> {
  const installed = new Map<string, boolean>();
  
  for (const tool of tools) {
    try {
      // Check PATH, registry, or filesystem
      const isInstalled = await checkToolInstalled(tool.id);
      installed.set(tool.id, isInstalled);
    } catch {
      installed.set(tool.id, false);
    }
  }
  
  return installed;
}

async function checkToolInstalled(toolId: string): Promise<boolean> {
  // Check common installation indicators
  const checks = [
    () => checkPath(toolId),
    () => checkRegistry(toolId),
    () => checkFileSystem(toolId)
  ];
  
  for (const check of checks) {
    if (await check()) return true;
  }
  
  return false;
}
param( [string]$InstallPath = "C:\Program Files\NewTool" )
Write-Host "Installing New Tool..."
try { # 下载安装程序 $url = "https://example.com/newtool-installer.exe" $installer = "$env:TEMP\newtool-installer.exe" Invoke-WebRequest -Uri $url -OutFile $installer
# 运行安装程序
Start-Process -FilePath $installer -ArgumentList "/S" -Wait

# 如需添加至PATH
$currentPath = [Environment]::GetEnvironmentVariable("Path", "Machine")
if ($currentPath -notlike "*$InstallPath*") {
    [Environment]::SetEnvironmentVariable(
        "Path",
        "$currentPath;$InstallPath",
        "Machine"
    )
}

Write-Host "New Tool installed successfully"
exit 0
} catch { Write-Error "Installation failed: $_" exit 1 }

3. **更新工具检测逻辑**(`src/main/detection.ts`):

```typescript
export async function detectInstalledTools(): Promise<Map<string, boolean>> {
  const installed = new Map<string, boolean>();
  
  for (const tool of tools) {
    try {
      // 检查PATH、注册表或文件系统
      const isInstalled = await checkToolInstalled(tool.id);
      installed.set(tool.id, isInstalled);
    } catch {
      installed.set(tool.id, false);
    }
  }
  
  return installed;
}

async function checkToolInstalled(toolId: string): Promise<boolean> {
  // 检查常见安装标识
  const checks = [
    () => checkPath(toolId),
    () => checkRegistry(toolId),
    () => checkFileSystem(toolId)
  ];
  
  for (const check of checks) {
    if (await check()) return true;
  }
  
  return false;
}

Configuration Export

配置导出

Export current tool configuration for reproducible environments:
bash
devtoolshub export-config > my-dev-setup.json
Example output:
json
{
  "version": "1.2.0",
  "platform": "win32",
  "installed": [
    "git",
    "node",
    "python",
    "docker",
    "vscode"
  ],
  "timestamp": "2026-05-17T12:34:56.789Z"
}
导出当前工具配置,用于可复现的开发环境:
bash
devtoolshub export-config > my-dev-setup.json
示例输出:
json
{
  "version": "1.2.0",
  "platform": "win32",
  "installed": [
    "git",
    "node",
    "python",
    "docker",
    "vscode"
  ],
  "timestamp": "2026-05-17T12:34:56.789Z"
}

Batch Installation

批量安装

Install multiple tools from a profile or custom list:
typescript
// src/renderer/profiles.ts
export interface Profile {
  id: string;
  name: string;
  description: string;
  tools: string[];
}

export const profiles: Profile[] = [
  {
    id: 'web-dev',
    name: 'Web Development',
    description: 'Essential tools for web development',
    tools: ['git', 'node', 'vscode', 'docker', 'postgresql']
  },
  {
    id: 'python-dev',
    name: 'Python Development',
    description: 'Python development environment',
    tools: ['git', 'python', 'vscode', 'postgresql']
  }
];
From CLI:
bash
undefined
从配置文件或自定义列表安装多个工具:
typescript
// src/renderer/profiles.ts
export interface Profile {
  id: string;
  name: string;
  description: string;
  tools: string[];
}

export const profiles: Profile[] = [
  {
    id: 'web-dev',
    name: 'Web Development',
    description: 'Essential tools for web development',
    tools: ['git', 'node', 'vscode', 'docker', 'postgresql']
  },
  {
    id: 'python-dev',
    name: 'Python Development',
    description: 'Python development environment',
    tools: ['git', 'python', 'vscode', 'postgresql']
  }
];
通过CLI执行:
bash
undefined

Install all tools from a profile (requires custom implementation)

安装配置文件中的所有工具(需自定义实现)

devtoolshub install git node vscode docker postgresql
undefined
devtoolshub install git node vscode docker postgresql
undefined

Error Handling

错误处理

The install queue uses per-tool try/catch — one failure doesn't abort the batch:
typescript
// src/main/installer.ts
export async function installTools(toolIds: string[]): Promise<InstallResult[]> {
  const results: InstallResult[] = [];
  
  for (const toolId of toolIds) {
    try {
      const tool = tools.find(t => t.id === toolId);
      if (!tool) {
        results.push({ toolId, success: false, error: 'Tool not found' });
        continue;
      }
      
      // Execute PowerShell installer with elevated privileges
      const scriptPath = path.join(installersDir, tool.installer);
      const result = await execElevated(scriptPath);
      
      results.push({ toolId, success: true, output: result.stdout });
    } catch (error) {
      results.push({
        toolId,
        success: false,
        error: error instanceof Error ? error.message : String(error)
      });
    }
  }
  
  return results;
}
安装队列针对每个工具使用try/catch——单个工具安装失败不会终止批量安装:
typescript
// src/main/installer.ts
export async function installTools(toolIds: string[]): Promise<InstallResult[]> {
  const results: InstallResult[] = [];
  
  for (const toolId of toolIds) {
    try {
      const tool = tools.find(t => t.id === toolId);
      if (!tool) {
        results.push({ toolId, success: false, error: 'Tool not found' });
        continue;
      }
      
      // 以提升权限执行PowerShell安装脚本
      const scriptPath = path.join(installersDir, tool.installer);
      const result = await execElevated(scriptPath);
      
      results.push({ toolId, success: true, output: result.stdout });
    } catch (error) {
      results.push({
        toolId,
        success: false,
        error: error instanceof Error ? error.message : String(error)
      });
    }
  }
  
  return results;
}

Troubleshooting

故障排查

Installation fails silently
  • Check install logs in the app's log viewer
  • Run CLI with verbose output:
    devtoolshub diagnose
  • Verify UAC elevation was granted
Tool not detected after install
  • Restart the app to refresh PATH detection
  • Manually check registry:
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  • Verify tool executable is in PATH:
    where <tool-name>
PowerShell execution policy errors
powershell
undefined
安装静默失败
  • 在应用的日志查看器中检查安装日志
  • 使用verbose输出运行CLI:
    devtoolshub diagnose
  • 确认已授予UAC权限提升
安装后工具未被检测到
  • 重启应用以刷新PATH检测
  • 手动检查注册表:
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  • 验证工具可执行文件是否在PATH中:
    where <tool-name>
PowerShell执行策略错误
powershell
undefined

Allow script execution (run as Administrator)

允许脚本执行(以管理员身份运行)

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

**Missing dependencies**
- Install Visual C++ Redistributables: `devtoolshub install vcredist`
- Ensure Windows 10/11 x64
- Check Node.js >= 18 for development builds

**Build failures**
```bash
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

**缺少依赖**
- 安装Visual C++可再发行组件:`devtoolshub install vcredist`
- 确保使用Windows 10/11 x64系统
- 开发构建需Node.js >= 18

**构建失败**
```bash

Clean and rebuild

清理并重新构建

rm -rf node_modules dist npm install npm run build
undefined
rm -rf node_modules dist npm install npm run build
undefined

Security

安全性

DevTools Hub implements hardened Electron security:
  • Sandbox mode enabled:
    sandbox: true
  • Content Security Policy enforced
  • External navigation guard prevents malicious redirects
  • UAC elevation for privileged operations
  • Installers bundled in
    asar.unpacked
    (no runtime downloads)
All installer scripts should be reviewed before execution. The app does not download executables at runtime — all installers are packaged with the application.
DevTools Hub实现了强化的Electron安全机制:
  • 启用沙箱模式:
    sandbox: true
  • 强制实施内容安全策略
  • 外部导航防护可阻止恶意重定向
  • 特权操作需UAC权限提升
  • 安装脚本打包在
    asar.unpacked
    中(运行时不下载)
所有安装脚本在执行前应进行审核。应用不会在运行时下载可执行文件——所有安装程序均随应用打包。