gitinstall 1.1.0__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gitinstall-1.1.2/MANIFEST.in +18 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/PKG-INFO +23 -48
- {gitinstall-1.1.0 → gitinstall-1.1.2}/README.md +21 -46
- {gitinstall-1.1.0 → gitinstall-1.1.2}/gitinstall.egg-info/PKG-INFO +23 -48
- {gitinstall-1.1.0 → gitinstall-1.1.2}/gitinstall.egg-info/SOURCES.txt +1 -12
- {gitinstall-1.1.0 → gitinstall-1.1.2}/pyproject.toml +2 -2
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/clawhub.html +2 -2
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/detector.py +6 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/error_fixer.py +11 -1
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/hw_detect.py +0 -2
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/main.py +1 -1
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/mcp_server.py +2 -2
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/onboard.py +1 -1
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/planner_known_projects.py +1 -1
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/run_tests.py +13 -5
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/web_ui.html +1 -1
- gitinstall-1.1.0/tests/test_chaos_torture.py +0 -3076
- gitinstall-1.1.0/tests/test_full_suite.py +0 -557
- gitinstall-1.1.0/tests/test_global_year_simulation.py +0 -1489
- gitinstall-1.1.0/tests/test_imports.py +0 -30
- gitinstall-1.1.0/tests/test_install_audit.py +0 -93
- gitinstall-1.1.0/tests/test_mcp_full.py +0 -222
- gitinstall-1.1.0/tests/test_mcp_server.py +0 -62
- gitinstall-1.1.0/tests/test_million_scale_simulation.py +0 -2280
- gitinstall-1.1.0/tests/test_new_modules.py +0 -110
- gitinstall-1.1.0/tests/test_random_audit.py +0 -569
- gitinstall-1.1.0/tests/test_trending_crossplatform.py +0 -195
- gitinstall-1.1.0/tests/test_year_simulation.py +0 -1117
- {gitinstall-1.1.0 → gitinstall-1.1.2}/LICENSE +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/gitinstall.egg-info/dependency_links.txt +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/gitinstall.egg-info/entry_points.txt +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/gitinstall.egg-info/top_level.txt +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/setup.cfg +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/__init__.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/_sdk.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/academic.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/admin.html +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/auto_update.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/autopilot.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/badge.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/checkpoint.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/cicd.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/config_schema.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/db.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/db_backend.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/dep_chain.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/dependency_audit.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/doctor.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/education.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/enterprise.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/event_bus.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/executor.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/feature_flags.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/fetcher.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/huggingface.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/i18n.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/installer_registry.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/knowledge_base.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/license_check.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/llm.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/log.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/mcp_agent.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/monorepo.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/multi_source.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/planner.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/planner_helpers.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/planner_templates.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/remote_gpu.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/resilience.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/skills.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/tool_schemas.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/trending.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/uninstaller.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/validate_top100.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/watchdog.py +0 -0
- {gitinstall-1.1.0 → gitinstall-1.1.2}/tools/web.py +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include pyproject.toml
|
|
4
|
+
recursive-include tools *.py *.html
|
|
5
|
+
prune tests
|
|
6
|
+
prune vscode-extension
|
|
7
|
+
prune .github
|
|
8
|
+
exclude MARKET_RESEARCH_2026.md
|
|
9
|
+
exclude PROJECT_BLUEPRINT.md
|
|
10
|
+
exclude COVERAGE_GAP_REPORT.md
|
|
11
|
+
exclude FEATURE_CATALOG.md
|
|
12
|
+
exclude DEPLOY.md
|
|
13
|
+
exclude ROADMAP.md
|
|
14
|
+
exclude Dockerfile
|
|
15
|
+
exclude .dockerignore
|
|
16
|
+
exclude smithery.yaml
|
|
17
|
+
exclude SKILL.md
|
|
18
|
+
exclude SDK.md
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitinstall
|
|
3
|
-
Version: 1.1.
|
|
4
|
-
Summary: MCP server & CLI that gives AI agents the ability to install
|
|
3
|
+
Version: 1.1.2
|
|
4
|
+
Summary: MCP server & CLI that gives AI agents the ability to install GitHub open-source projects — zero dependencies
|
|
5
5
|
Author: icerui
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/icerui/github-installer
|
|
@@ -28,8 +28,8 @@ Dynamic: license-file
|
|
|
28
28
|
# gitinstall
|
|
29
29
|
|
|
30
30
|
<p align="center">
|
|
31
|
-
<strong>MCP server that gives AI agents the ability to install
|
|
32
|
-
<em>让 AI Agent
|
|
31
|
+
<strong>MCP server that gives AI agents the ability to install GitHub open-source projects</strong><br/>
|
|
32
|
+
<em>让 AI Agent 拥有安装 GitHub 开源项目的能力</em>
|
|
33
33
|
</p>
|
|
34
34
|
|
|
35
35
|
<p align="center">
|
|
@@ -53,9 +53,9 @@ AI agents can write code, explain errors, and suggest commands — but they **ca
|
|
|
53
53
|
**gitinstall** bridges this gap. It's an MCP server that gives any AI agent (Claude, Cursor, Copilot, etc.) the ability to:
|
|
54
54
|
|
|
55
55
|
1. **Detect** your system (OS, GPU, runtimes, package managers)
|
|
56
|
-
2. **Plan** the installation
|
|
57
|
-
3. **Execute** safely
|
|
58
|
-
4. **Auto-fix** errors (
|
|
56
|
+
2. **Plan** the installation with intelligent multi-strategy planning
|
|
57
|
+
3. **Execute** safely with dangerous command blocking
|
|
58
|
+
4. **Auto-fix** errors (PEP 668, CUDA mismatch, missing tools, and more)
|
|
59
59
|
5. **Retry** with fallback strategies if the first approach fails
|
|
60
60
|
|
|
61
61
|
---
|
|
@@ -131,7 +131,7 @@ gitinstall exposes 6 tools via MCP:
|
|
|
131
131
|
| Tool | What it does |
|
|
132
132
|
|------|-------------|
|
|
133
133
|
| `install_github_project` | End-to-end installation: detect → plan → execute → auto-fix → fallback retry |
|
|
134
|
-
| `diagnose_install_error` | Diagnose any build/install error and return fix commands
|
|
134
|
+
| `diagnose_install_error` | Diagnose any build/install error and return fix commands |
|
|
135
135
|
| `detect_environment` | Report OS, CPU, GPU, runtimes, package managers, disk space |
|
|
136
136
|
| `get_project_info` | Fetch GitHub project metadata without installing |
|
|
137
137
|
| `check_system_health` | Full system diagnostic with fix suggestions |
|
|
@@ -158,25 +158,7 @@ gitinstall handles everything:
|
|
|
158
158
|
|
|
159
159
|
### Example: `diagnose_install_error`
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"name": "diagnose_install_error",
|
|
165
|
-
"arguments": {
|
|
166
|
-
"stderr": "error: externally-managed-environment\n× This environment is externally managed",
|
|
167
|
-
"command": "pip install pandas"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Returns:
|
|
173
|
-
```json
|
|
174
|
-
{
|
|
175
|
-
"root_cause": "System Python is protected (PEP 668), need virtual environment",
|
|
176
|
-
"fix_commands": ["python3 -m venv venv", "source venv/bin/activate"],
|
|
177
|
-
"confidence": "high"
|
|
178
|
-
}
|
|
179
|
-
```
|
|
161
|
+
Pass any build error to the AI, and gitinstall will identify the root cause and return fix commands automatically. Supports PEP 668, CUDA version mismatches, missing system libraries, and many more common patterns.
|
|
180
162
|
|
|
181
163
|
---
|
|
182
164
|
|
|
@@ -185,9 +167,9 @@ Returns:
|
|
|
185
167
|
### No LLM required
|
|
186
168
|
|
|
187
169
|
The core engine is a **rule-based system**, not an AI wrapper:
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
170
|
+
- Extensive library of known projects with hand-crafted installation recipes
|
|
171
|
+
- Wide language coverage with intelligent type detection
|
|
172
|
+
- Comprehensive error-fix rules covering real-world installation failures
|
|
191
173
|
- LLM is optional — only used when the rule engine isn't confident
|
|
192
174
|
|
|
193
175
|
### Zero dependencies
|
|
@@ -201,10 +183,10 @@ Pure Python standard library. No `requests`, no `click`, no `rich`. One `pip ins
|
|
|
201
183
|
|
|
202
184
|
### Safety built-in
|
|
203
185
|
|
|
204
|
-
- **
|
|
205
|
-
- **SSRF protection** on URL fetching
|
|
186
|
+
- **Dangerous command patterns blocked** (including encoding bypass attempts)
|
|
187
|
+
- **SSRF protection** on URL fetching
|
|
206
188
|
- **No auto-sudo** — prompts explicitly when root needed
|
|
207
|
-
- **
|
|
189
|
+
- **Smart failure detection** — stops retrying when the error is unfixable
|
|
208
190
|
|
|
209
191
|
---
|
|
210
192
|
|
|
@@ -224,9 +206,9 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
224
206
|
|
|
225
207
|
## Supported Languages & Platforms
|
|
226
208
|
|
|
227
|
-
**Languages
|
|
209
|
+
**Languages**: Python, Node.js, TypeScript, Rust, Go, C, C++, Java, Kotlin, Scala, Swift, Ruby, PHP, Haskell, Zig, Elixir, Erlang, and many more
|
|
228
210
|
|
|
229
|
-
**Platforms**: macOS (Intel + Apple Silicon
|
|
211
|
+
**Platforms**: macOS (Intel + Apple Silicon), Ubuntu/Debian, Fedora/RHEL, Arch Linux, Windows 10/11, WSL2
|
|
230
212
|
|
|
231
213
|
**GPU**: NVIDIA CUDA, AMD ROCm, Apple MPS, CPU fallback
|
|
232
214
|
|
|
@@ -237,17 +219,13 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
237
219
|
```
|
|
238
220
|
User → AI Agent → MCP → gitinstall
|
|
239
221
|
├── detect → OS / GPU / runtimes / package managers
|
|
240
|
-
├──
|
|
241
|
-
├──
|
|
242
|
-
├──
|
|
243
|
-
|
|
244
|
-
└── fallback → brew → cargo → source build
|
|
222
|
+
├── plan → intelligent multi-strategy planner
|
|
223
|
+
├── execute → safe subprocess execution
|
|
224
|
+
├── fix → error pattern matching → auto-retry
|
|
225
|
+
└── fallback → alternative install strategies
|
|
245
226
|
```
|
|
246
227
|
|
|
247
|
-
|
|
248
|
-
1. **Known projects** (82): Hand-crafted recipes for popular projects (ComfyUI, Ollama, llama.cpp, Neovim...)
|
|
249
|
-
2. **Language templates** (30+): Detect project type → apply template (handles Apple Silicon, CUDA, WSL2 edge cases)
|
|
250
|
-
3. **README extraction**: Parse install commands from README (regex, or LLM if available)
|
|
228
|
+
The planner uses a multi-tier strategy that combines project-specific knowledge, language-aware templates, and README analysis to generate optimal installation plans for a wide range of projects.
|
|
251
229
|
|
|
252
230
|
---
|
|
253
231
|
|
|
@@ -257,12 +235,9 @@ User → AI Agent → MCP → gitinstall
|
|
|
257
235
|
git clone https://github.com/icerui/github-installer.git
|
|
258
236
|
cd github-installer
|
|
259
237
|
|
|
260
|
-
# Run tests
|
|
238
|
+
# Run tests
|
|
261
239
|
python -m pytest tests/unit/ -q
|
|
262
240
|
|
|
263
|
-
# Test MCP server
|
|
264
|
-
python tests/test_mcp_server.py
|
|
265
|
-
|
|
266
241
|
# Run locally
|
|
267
242
|
python tools/mcp_server.py # MCP server on stdio
|
|
268
243
|
python tools/main.py detect # CLI mode
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# gitinstall
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>MCP server that gives AI agents the ability to install
|
|
5
|
-
<em>让 AI Agent
|
|
4
|
+
<strong>MCP server that gives AI agents the ability to install GitHub open-source projects</strong><br/>
|
|
5
|
+
<em>让 AI Agent 拥有安装 GitHub 开源项目的能力</em>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
@@ -26,9 +26,9 @@ AI agents can write code, explain errors, and suggest commands — but they **ca
|
|
|
26
26
|
**gitinstall** bridges this gap. It's an MCP server that gives any AI agent (Claude, Cursor, Copilot, etc.) the ability to:
|
|
27
27
|
|
|
28
28
|
1. **Detect** your system (OS, GPU, runtimes, package managers)
|
|
29
|
-
2. **Plan** the installation
|
|
30
|
-
3. **Execute** safely
|
|
31
|
-
4. **Auto-fix** errors (
|
|
29
|
+
2. **Plan** the installation with intelligent multi-strategy planning
|
|
30
|
+
3. **Execute** safely with dangerous command blocking
|
|
31
|
+
4. **Auto-fix** errors (PEP 668, CUDA mismatch, missing tools, and more)
|
|
32
32
|
5. **Retry** with fallback strategies if the first approach fails
|
|
33
33
|
|
|
34
34
|
---
|
|
@@ -104,7 +104,7 @@ gitinstall exposes 6 tools via MCP:
|
|
|
104
104
|
| Tool | What it does |
|
|
105
105
|
|------|-------------|
|
|
106
106
|
| `install_github_project` | End-to-end installation: detect → plan → execute → auto-fix → fallback retry |
|
|
107
|
-
| `diagnose_install_error` | Diagnose any build/install error and return fix commands
|
|
107
|
+
| `diagnose_install_error` | Diagnose any build/install error and return fix commands |
|
|
108
108
|
| `detect_environment` | Report OS, CPU, GPU, runtimes, package managers, disk space |
|
|
109
109
|
| `get_project_info` | Fetch GitHub project metadata without installing |
|
|
110
110
|
| `check_system_health` | Full system diagnostic with fix suggestions |
|
|
@@ -131,25 +131,7 @@ gitinstall handles everything:
|
|
|
131
131
|
|
|
132
132
|
### Example: `diagnose_install_error`
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"name": "diagnose_install_error",
|
|
138
|
-
"arguments": {
|
|
139
|
-
"stderr": "error: externally-managed-environment\n× This environment is externally managed",
|
|
140
|
-
"command": "pip install pandas"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Returns:
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"root_cause": "System Python is protected (PEP 668), need virtual environment",
|
|
149
|
-
"fix_commands": ["python3 -m venv venv", "source venv/bin/activate"],
|
|
150
|
-
"confidence": "high"
|
|
151
|
-
}
|
|
152
|
-
```
|
|
134
|
+
Pass any build error to the AI, and gitinstall will identify the root cause and return fix commands automatically. Supports PEP 668, CUDA version mismatches, missing system libraries, and many more common patterns.
|
|
153
135
|
|
|
154
136
|
---
|
|
155
137
|
|
|
@@ -158,9 +140,9 @@ Returns:
|
|
|
158
140
|
### No LLM required
|
|
159
141
|
|
|
160
142
|
The core engine is a **rule-based system**, not an AI wrapper:
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
143
|
+
- Extensive library of known projects with hand-crafted installation recipes
|
|
144
|
+
- Wide language coverage with intelligent type detection
|
|
145
|
+
- Comprehensive error-fix rules covering real-world installation failures
|
|
164
146
|
- LLM is optional — only used when the rule engine isn't confident
|
|
165
147
|
|
|
166
148
|
### Zero dependencies
|
|
@@ -174,10 +156,10 @@ Pure Python standard library. No `requests`, no `click`, no `rich`. One `pip ins
|
|
|
174
156
|
|
|
175
157
|
### Safety built-in
|
|
176
158
|
|
|
177
|
-
- **
|
|
178
|
-
- **SSRF protection** on URL fetching
|
|
159
|
+
- **Dangerous command patterns blocked** (including encoding bypass attempts)
|
|
160
|
+
- **SSRF protection** on URL fetching
|
|
179
161
|
- **No auto-sudo** — prompts explicitly when root needed
|
|
180
|
-
- **
|
|
162
|
+
- **Smart failure detection** — stops retrying when the error is unfixable
|
|
181
163
|
|
|
182
164
|
---
|
|
183
165
|
|
|
@@ -197,9 +179,9 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
197
179
|
|
|
198
180
|
## Supported Languages & Platforms
|
|
199
181
|
|
|
200
|
-
**Languages
|
|
182
|
+
**Languages**: Python, Node.js, TypeScript, Rust, Go, C, C++, Java, Kotlin, Scala, Swift, Ruby, PHP, Haskell, Zig, Elixir, Erlang, and many more
|
|
201
183
|
|
|
202
|
-
**Platforms**: macOS (Intel + Apple Silicon
|
|
184
|
+
**Platforms**: macOS (Intel + Apple Silicon), Ubuntu/Debian, Fedora/RHEL, Arch Linux, Windows 10/11, WSL2
|
|
203
185
|
|
|
204
186
|
**GPU**: NVIDIA CUDA, AMD ROCm, Apple MPS, CPU fallback
|
|
205
187
|
|
|
@@ -210,17 +192,13 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
210
192
|
```
|
|
211
193
|
User → AI Agent → MCP → gitinstall
|
|
212
194
|
├── detect → OS / GPU / runtimes / package managers
|
|
213
|
-
├──
|
|
214
|
-
├──
|
|
215
|
-
├──
|
|
216
|
-
|
|
217
|
-
└── fallback → brew → cargo → source build
|
|
195
|
+
├── plan → intelligent multi-strategy planner
|
|
196
|
+
├── execute → safe subprocess execution
|
|
197
|
+
├── fix → error pattern matching → auto-retry
|
|
198
|
+
└── fallback → alternative install strategies
|
|
218
199
|
```
|
|
219
200
|
|
|
220
|
-
|
|
221
|
-
1. **Known projects** (82): Hand-crafted recipes for popular projects (ComfyUI, Ollama, llama.cpp, Neovim...)
|
|
222
|
-
2. **Language templates** (30+): Detect project type → apply template (handles Apple Silicon, CUDA, WSL2 edge cases)
|
|
223
|
-
3. **README extraction**: Parse install commands from README (regex, or LLM if available)
|
|
201
|
+
The planner uses a multi-tier strategy that combines project-specific knowledge, language-aware templates, and README analysis to generate optimal installation plans for a wide range of projects.
|
|
224
202
|
|
|
225
203
|
---
|
|
226
204
|
|
|
@@ -230,12 +208,9 @@ User → AI Agent → MCP → gitinstall
|
|
|
230
208
|
git clone https://github.com/icerui/github-installer.git
|
|
231
209
|
cd github-installer
|
|
232
210
|
|
|
233
|
-
# Run tests
|
|
211
|
+
# Run tests
|
|
234
212
|
python -m pytest tests/unit/ -q
|
|
235
213
|
|
|
236
|
-
# Test MCP server
|
|
237
|
-
python tests/test_mcp_server.py
|
|
238
|
-
|
|
239
214
|
# Run locally
|
|
240
215
|
python tools/mcp_server.py # MCP server on stdio
|
|
241
216
|
python tools/main.py detect # CLI mode
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitinstall
|
|
3
|
-
Version: 1.1.
|
|
4
|
-
Summary: MCP server & CLI that gives AI agents the ability to install
|
|
3
|
+
Version: 1.1.2
|
|
4
|
+
Summary: MCP server & CLI that gives AI agents the ability to install GitHub open-source projects — zero dependencies
|
|
5
5
|
Author: icerui
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/icerui/github-installer
|
|
@@ -28,8 +28,8 @@ Dynamic: license-file
|
|
|
28
28
|
# gitinstall
|
|
29
29
|
|
|
30
30
|
<p align="center">
|
|
31
|
-
<strong>MCP server that gives AI agents the ability to install
|
|
32
|
-
<em>让 AI Agent
|
|
31
|
+
<strong>MCP server that gives AI agents the ability to install GitHub open-source projects</strong><br/>
|
|
32
|
+
<em>让 AI Agent 拥有安装 GitHub 开源项目的能力</em>
|
|
33
33
|
</p>
|
|
34
34
|
|
|
35
35
|
<p align="center">
|
|
@@ -53,9 +53,9 @@ AI agents can write code, explain errors, and suggest commands — but they **ca
|
|
|
53
53
|
**gitinstall** bridges this gap. It's an MCP server that gives any AI agent (Claude, Cursor, Copilot, etc.) the ability to:
|
|
54
54
|
|
|
55
55
|
1. **Detect** your system (OS, GPU, runtimes, package managers)
|
|
56
|
-
2. **Plan** the installation
|
|
57
|
-
3. **Execute** safely
|
|
58
|
-
4. **Auto-fix** errors (
|
|
56
|
+
2. **Plan** the installation with intelligent multi-strategy planning
|
|
57
|
+
3. **Execute** safely with dangerous command blocking
|
|
58
|
+
4. **Auto-fix** errors (PEP 668, CUDA mismatch, missing tools, and more)
|
|
59
59
|
5. **Retry** with fallback strategies if the first approach fails
|
|
60
60
|
|
|
61
61
|
---
|
|
@@ -131,7 +131,7 @@ gitinstall exposes 6 tools via MCP:
|
|
|
131
131
|
| Tool | What it does |
|
|
132
132
|
|------|-------------|
|
|
133
133
|
| `install_github_project` | End-to-end installation: detect → plan → execute → auto-fix → fallback retry |
|
|
134
|
-
| `diagnose_install_error` | Diagnose any build/install error and return fix commands
|
|
134
|
+
| `diagnose_install_error` | Diagnose any build/install error and return fix commands |
|
|
135
135
|
| `detect_environment` | Report OS, CPU, GPU, runtimes, package managers, disk space |
|
|
136
136
|
| `get_project_info` | Fetch GitHub project metadata without installing |
|
|
137
137
|
| `check_system_health` | Full system diagnostic with fix suggestions |
|
|
@@ -158,25 +158,7 @@ gitinstall handles everything:
|
|
|
158
158
|
|
|
159
159
|
### Example: `diagnose_install_error`
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"name": "diagnose_install_error",
|
|
165
|
-
"arguments": {
|
|
166
|
-
"stderr": "error: externally-managed-environment\n× This environment is externally managed",
|
|
167
|
-
"command": "pip install pandas"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Returns:
|
|
173
|
-
```json
|
|
174
|
-
{
|
|
175
|
-
"root_cause": "System Python is protected (PEP 668), need virtual environment",
|
|
176
|
-
"fix_commands": ["python3 -m venv venv", "source venv/bin/activate"],
|
|
177
|
-
"confidence": "high"
|
|
178
|
-
}
|
|
179
|
-
```
|
|
161
|
+
Pass any build error to the AI, and gitinstall will identify the root cause and return fix commands automatically. Supports PEP 668, CUDA version mismatches, missing system libraries, and many more common patterns.
|
|
180
162
|
|
|
181
163
|
---
|
|
182
164
|
|
|
@@ -185,9 +167,9 @@ Returns:
|
|
|
185
167
|
### No LLM required
|
|
186
168
|
|
|
187
169
|
The core engine is a **rule-based system**, not an AI wrapper:
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
170
|
+
- Extensive library of known projects with hand-crafted installation recipes
|
|
171
|
+
- Wide language coverage with intelligent type detection
|
|
172
|
+
- Comprehensive error-fix rules covering real-world installation failures
|
|
191
173
|
- LLM is optional — only used when the rule engine isn't confident
|
|
192
174
|
|
|
193
175
|
### Zero dependencies
|
|
@@ -201,10 +183,10 @@ Pure Python standard library. No `requests`, no `click`, no `rich`. One `pip ins
|
|
|
201
183
|
|
|
202
184
|
### Safety built-in
|
|
203
185
|
|
|
204
|
-
- **
|
|
205
|
-
- **SSRF protection** on URL fetching
|
|
186
|
+
- **Dangerous command patterns blocked** (including encoding bypass attempts)
|
|
187
|
+
- **SSRF protection** on URL fetching
|
|
206
188
|
- **No auto-sudo** — prompts explicitly when root needed
|
|
207
|
-
- **
|
|
189
|
+
- **Smart failure detection** — stops retrying when the error is unfixable
|
|
208
190
|
|
|
209
191
|
---
|
|
210
192
|
|
|
@@ -224,9 +206,9 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
224
206
|
|
|
225
207
|
## Supported Languages & Platforms
|
|
226
208
|
|
|
227
|
-
**Languages
|
|
209
|
+
**Languages**: Python, Node.js, TypeScript, Rust, Go, C, C++, Java, Kotlin, Scala, Swift, Ruby, PHP, Haskell, Zig, Elixir, Erlang, and many more
|
|
228
210
|
|
|
229
|
-
**Platforms**: macOS (Intel + Apple Silicon
|
|
211
|
+
**Platforms**: macOS (Intel + Apple Silicon), Ubuntu/Debian, Fedora/RHEL, Arch Linux, Windows 10/11, WSL2
|
|
230
212
|
|
|
231
213
|
**GPU**: NVIDIA CUDA, AMD ROCm, Apple MPS, CPU fallback
|
|
232
214
|
|
|
@@ -237,17 +219,13 @@ gitinstall plan neovim/neovim # Preview install plan
|
|
|
237
219
|
```
|
|
238
220
|
User → AI Agent → MCP → gitinstall
|
|
239
221
|
├── detect → OS / GPU / runtimes / package managers
|
|
240
|
-
├──
|
|
241
|
-
├──
|
|
242
|
-
├──
|
|
243
|
-
|
|
244
|
-
└── fallback → brew → cargo → source build
|
|
222
|
+
├── plan → intelligent multi-strategy planner
|
|
223
|
+
├── execute → safe subprocess execution
|
|
224
|
+
├── fix → error pattern matching → auto-retry
|
|
225
|
+
└── fallback → alternative install strategies
|
|
245
226
|
```
|
|
246
227
|
|
|
247
|
-
|
|
248
|
-
1. **Known projects** (82): Hand-crafted recipes for popular projects (ComfyUI, Ollama, llama.cpp, Neovim...)
|
|
249
|
-
2. **Language templates** (30+): Detect project type → apply template (handles Apple Silicon, CUDA, WSL2 edge cases)
|
|
250
|
-
3. **README extraction**: Parse install commands from README (regex, or LLM if available)
|
|
228
|
+
The planner uses a multi-tier strategy that combines project-specific knowledge, language-aware templates, and README analysis to generate optimal installation plans for a wide range of projects.
|
|
251
229
|
|
|
252
230
|
---
|
|
253
231
|
|
|
@@ -257,12 +235,9 @@ User → AI Agent → MCP → gitinstall
|
|
|
257
235
|
git clone https://github.com/icerui/github-installer.git
|
|
258
236
|
cd github-installer
|
|
259
237
|
|
|
260
|
-
# Run tests
|
|
238
|
+
# Run tests
|
|
261
239
|
python -m pytest tests/unit/ -q
|
|
262
240
|
|
|
263
|
-
# Test MCP server
|
|
264
|
-
python tests/test_mcp_server.py
|
|
265
|
-
|
|
266
241
|
# Run locally
|
|
267
242
|
python tools/mcp_server.py # MCP server on stdio
|
|
268
243
|
python tools/main.py detect # CLI mode
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
2
3
|
README.md
|
|
3
4
|
pyproject.toml
|
|
4
5
|
gitinstall.egg-info/PKG-INFO
|
|
@@ -6,18 +7,6 @@ gitinstall.egg-info/SOURCES.txt
|
|
|
6
7
|
gitinstall.egg-info/dependency_links.txt
|
|
7
8
|
gitinstall.egg-info/entry_points.txt
|
|
8
9
|
gitinstall.egg-info/top_level.txt
|
|
9
|
-
tests/test_chaos_torture.py
|
|
10
|
-
tests/test_full_suite.py
|
|
11
|
-
tests/test_global_year_simulation.py
|
|
12
|
-
tests/test_imports.py
|
|
13
|
-
tests/test_install_audit.py
|
|
14
|
-
tests/test_mcp_full.py
|
|
15
|
-
tests/test_mcp_server.py
|
|
16
|
-
tests/test_million_scale_simulation.py
|
|
17
|
-
tests/test_new_modules.py
|
|
18
|
-
tests/test_random_audit.py
|
|
19
|
-
tests/test_trending_crossplatform.py
|
|
20
|
-
tests/test_year_simulation.py
|
|
21
10
|
tools/__init__.py
|
|
22
11
|
tools/_sdk.py
|
|
23
12
|
tools/academic.py
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gitinstall"
|
|
7
|
-
version = "1.1.
|
|
8
|
-
description = "MCP server & CLI that gives AI agents the ability to install
|
|
7
|
+
version = "1.1.2"
|
|
8
|
+
description = "MCP server & CLI that gives AI agents the ability to install GitHub open-source projects — zero dependencies"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
11
11
|
requires-python = ">=3.10"
|
|
@@ -410,7 +410,7 @@ footer {
|
|
|
410
410
|
由 <strong>蹄门科技</strong> 发布 · 开源 MIT 协议
|
|
411
411
|
</div>
|
|
412
412
|
<p class="skill-desc">
|
|
413
|
-
|
|
413
|
+
一句话安装 GitHub 开源项目 — 识别系统环境,分析项目结构,生成安装计划,自动执行安装。
|
|
414
414
|
零外部依赖,纯 Python 标准库。9 级 LLM 降级,无 AI 也能用。
|
|
415
415
|
</p>
|
|
416
416
|
<div class="skill-tags">
|
|
@@ -424,7 +424,7 @@ footer {
|
|
|
424
424
|
<div class="skill-actions">
|
|
425
425
|
<button class="btn btn-green" onclick="copyInstall(this)">⬇ 安装技能</button>
|
|
426
426
|
<button class="btn btn-primary" onclick="window.location='/'">🖥 打开 Web 控制台</button>
|
|
427
|
-
<button class="btn btn-outline" onclick="window.open('https://github.com/
|
|
427
|
+
<button class="btn btn-outline" onclick="window.open('https://github.com/icerui/github-installer')">⭐ GitHub</button>
|
|
428
428
|
</div>
|
|
429
429
|
</div>
|
|
430
430
|
</div>
|
|
@@ -213,6 +213,12 @@ class EnvironmentDetector:
|
|
|
213
213
|
kb = int(line.split()[1])
|
|
214
214
|
return round(kb / (1024 ** 2), 1)
|
|
215
215
|
elif system == "Windows":
|
|
216
|
+
# 优先 PowerShell(wmic 已弃用)
|
|
217
|
+
output = _run(["powershell", "-NoProfile", "-Command",
|
|
218
|
+
"(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory"])
|
|
219
|
+
if output and output.strip().isdigit():
|
|
220
|
+
return round(int(output.strip()) / (1024 ** 3), 1)
|
|
221
|
+
# 回退到 wmic(兼容旧系统)
|
|
216
222
|
output = _run(["wmic", "ComputerSystem", "get", "TotalPhysicalMemory"])
|
|
217
223
|
if output:
|
|
218
224
|
for line in output.split("\n"):
|
|
@@ -19,6 +19,7 @@ from __future__ import annotations
|
|
|
19
19
|
import os
|
|
20
20
|
import platform
|
|
21
21
|
import re
|
|
22
|
+
import shutil
|
|
22
23
|
from dataclasses import dataclass
|
|
23
24
|
|
|
24
25
|
|
|
@@ -40,18 +41,26 @@ def _is_macos() -> bool:
|
|
|
40
41
|
def _is_linux() -> bool:
|
|
41
42
|
return platform.system() == "Linux"
|
|
42
43
|
|
|
44
|
+
def _is_windows() -> bool:
|
|
45
|
+
return platform.system() == "Windows"
|
|
46
|
+
|
|
43
47
|
def _has_brew() -> bool:
|
|
44
48
|
return os.path.exists("/opt/homebrew/bin/brew") or os.path.exists("/usr/local/bin/brew")
|
|
45
49
|
|
|
46
50
|
def _has_apt() -> bool:
|
|
47
51
|
return os.path.exists("/usr/bin/apt-get")
|
|
48
52
|
|
|
53
|
+
def _has_choco() -> bool:
|
|
54
|
+
return shutil.which("choco") is not None
|
|
55
|
+
|
|
49
56
|
def _install_pkg_cmd(pkg: str, brew_pkg: str = "", apt_pkg: str = "") -> str:
|
|
50
57
|
"""根据平台返回安装系统包的命令"""
|
|
51
58
|
if _is_macos() and _has_brew():
|
|
52
59
|
return f"brew install {brew_pkg or pkg}"
|
|
53
60
|
if _is_linux() and _has_apt():
|
|
54
61
|
return f"sudo apt-get install -y {apt_pkg or pkg}"
|
|
62
|
+
if _is_windows() and _has_choco():
|
|
63
|
+
return f"choco install {pkg} -y"
|
|
55
64
|
return ""
|
|
56
65
|
|
|
57
66
|
|
|
@@ -456,7 +465,8 @@ def _fix_build_essentials(cmd: str, stderr: str, stdout: str) -> FixSuggestion |
|
|
|
456
465
|
combined = stderr + stdout
|
|
457
466
|
# "gcc: command not found" / "make: command not found"
|
|
458
467
|
for tool in ("gcc", "g++", "make", "cc"):
|
|
459
|
-
|
|
468
|
+
escaped = re.escape(tool)
|
|
469
|
+
if re.search(rf'(?<!\w){escaped}(?!\w).*(?:not found|No such file)', combined, re.IGNORECASE):
|
|
460
470
|
if _is_macos():
|
|
461
471
|
return FixSuggestion(
|
|
462
472
|
root_cause=f"编译工具链未安装({tool})",
|
|
@@ -1125,7 +1125,7 @@ def main():
|
|
|
1125
1125
|
|
|
1126
1126
|
parser = argparse.ArgumentParser(
|
|
1127
1127
|
prog="gitinstall",
|
|
1128
|
-
description="
|
|
1128
|
+
description="一句话安装开源项目(支持 GitHub/GitLab/Bitbucket/Gitee/Codeberg/本地路径)",
|
|
1129
1129
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
1130
1130
|
epilog="""
|
|
1131
1131
|
示例:
|
|
@@ -63,7 +63,7 @@ TOOLS = [
|
|
|
63
63
|
{
|
|
64
64
|
"name": "install_github_project",
|
|
65
65
|
"description": (
|
|
66
|
-
"Install
|
|
66
|
+
"Install a GitHub open-source project on the user's machine. "
|
|
67
67
|
"Handles the ENTIRE process: detects OS/GPU/runtimes → fetches project info → "
|
|
68
68
|
"generates installation plan (30+ languages: Python, Node, Rust, Go, C++, Haskell, Zig...) → "
|
|
69
69
|
"executes safely (dangerous commands blocked) → auto-fixes errors (28 patterns: "
|
|
@@ -71,7 +71,7 @@ TOOLS = [
|
|
|
71
71
|
"fallback strategies if needed. Works WITHOUT any LLM by default (pure rule engine). "
|
|
72
72
|
"Supports: GitHub URLs, 'owner/repo' format, GitLab/Gitee/Bitbucket URLs. "
|
|
73
73
|
"Example: install_github_project({\"project\": \"comfyanonymous/ComfyUI\"}) "
|
|
74
|
-
"Call this when a user asks you to install, set up, or run
|
|
74
|
+
"Call this when a user asks you to install, set up, or run a GitHub project."
|
|
75
75
|
),
|
|
76
76
|
"inputSchema": {
|
|
77
77
|
"type": "object",
|