gitinstall 1.1.0__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.0/LICENSE +21 -0
- gitinstall-1.1.0/PKG-INFO +275 -0
- gitinstall-1.1.0/README.md +248 -0
- gitinstall-1.1.0/gitinstall.egg-info/PKG-INFO +275 -0
- gitinstall-1.1.0/gitinstall.egg-info/SOURCES.txt +73 -0
- gitinstall-1.1.0/gitinstall.egg-info/dependency_links.txt +1 -0
- gitinstall-1.1.0/gitinstall.egg-info/entry_points.txt +3 -0
- gitinstall-1.1.0/gitinstall.egg-info/top_level.txt +1 -0
- gitinstall-1.1.0/pyproject.toml +52 -0
- gitinstall-1.1.0/setup.cfg +4 -0
- gitinstall-1.1.0/tests/test_chaos_torture.py +3076 -0
- gitinstall-1.1.0/tests/test_full_suite.py +557 -0
- gitinstall-1.1.0/tests/test_global_year_simulation.py +1489 -0
- gitinstall-1.1.0/tests/test_imports.py +30 -0
- gitinstall-1.1.0/tests/test_install_audit.py +93 -0
- gitinstall-1.1.0/tests/test_mcp_full.py +222 -0
- gitinstall-1.1.0/tests/test_mcp_server.py +62 -0
- gitinstall-1.1.0/tests/test_million_scale_simulation.py +2280 -0
- gitinstall-1.1.0/tests/test_new_modules.py +110 -0
- gitinstall-1.1.0/tests/test_random_audit.py +569 -0
- gitinstall-1.1.0/tests/test_trending_crossplatform.py +195 -0
- gitinstall-1.1.0/tests/test_year_simulation.py +1117 -0
- gitinstall-1.1.0/tools/__init__.py +61 -0
- gitinstall-1.1.0/tools/_sdk.py +541 -0
- gitinstall-1.1.0/tools/academic.py +831 -0
- gitinstall-1.1.0/tools/admin.html +327 -0
- gitinstall-1.1.0/tools/auto_update.py +384 -0
- gitinstall-1.1.0/tools/autopilot.py +349 -0
- gitinstall-1.1.0/tools/badge.py +476 -0
- gitinstall-1.1.0/tools/checkpoint.py +330 -0
- gitinstall-1.1.0/tools/cicd.py +499 -0
- gitinstall-1.1.0/tools/clawhub.html +718 -0
- gitinstall-1.1.0/tools/config_schema.py +353 -0
- gitinstall-1.1.0/tools/db.py +984 -0
- gitinstall-1.1.0/tools/db_backend.py +445 -0
- gitinstall-1.1.0/tools/dep_chain.py +337 -0
- gitinstall-1.1.0/tools/dependency_audit.py +1153 -0
- gitinstall-1.1.0/tools/detector.py +542 -0
- gitinstall-1.1.0/tools/doctor.py +493 -0
- gitinstall-1.1.0/tools/education.py +869 -0
- gitinstall-1.1.0/tools/enterprise.py +802 -0
- gitinstall-1.1.0/tools/error_fixer.py +953 -0
- gitinstall-1.1.0/tools/event_bus.py +251 -0
- gitinstall-1.1.0/tools/executor.py +577 -0
- gitinstall-1.1.0/tools/feature_flags.py +138 -0
- gitinstall-1.1.0/tools/fetcher.py +921 -0
- gitinstall-1.1.0/tools/huggingface.py +922 -0
- gitinstall-1.1.0/tools/hw_detect.py +988 -0
- gitinstall-1.1.0/tools/i18n.py +664 -0
- gitinstall-1.1.0/tools/installer_registry.py +362 -0
- gitinstall-1.1.0/tools/knowledge_base.py +379 -0
- gitinstall-1.1.0/tools/license_check.py +605 -0
- gitinstall-1.1.0/tools/llm.py +569 -0
- gitinstall-1.1.0/tools/log.py +236 -0
- gitinstall-1.1.0/tools/main.py +1408 -0
- gitinstall-1.1.0/tools/mcp_agent.py +841 -0
- gitinstall-1.1.0/tools/mcp_server.py +386 -0
- gitinstall-1.1.0/tools/monorepo.py +810 -0
- gitinstall-1.1.0/tools/multi_source.py +425 -0
- gitinstall-1.1.0/tools/onboard.py +276 -0
- gitinstall-1.1.0/tools/planner.py +222 -0
- gitinstall-1.1.0/tools/planner_helpers.py +323 -0
- gitinstall-1.1.0/tools/planner_known_projects.py +1010 -0
- gitinstall-1.1.0/tools/planner_templates.py +996 -0
- gitinstall-1.1.0/tools/remote_gpu.py +633 -0
- gitinstall-1.1.0/tools/resilience.py +608 -0
- gitinstall-1.1.0/tools/run_tests.py +572 -0
- gitinstall-1.1.0/tools/skills.py +476 -0
- gitinstall-1.1.0/tools/tool_schemas.py +324 -0
- gitinstall-1.1.0/tools/trending.py +279 -0
- gitinstall-1.1.0/tools/uninstaller.py +415 -0
- gitinstall-1.1.0/tools/validate_top100.py +607 -0
- gitinstall-1.1.0/tools/watchdog.py +180 -0
- gitinstall-1.1.0/tools/web.py +1277 -0
- gitinstall-1.1.0/tools/web_ui.html +2277 -0
gitinstall-1.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 icerui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitinstall
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: MCP server & CLI that gives AI agents the ability to install any GitHub project — zero dependencies
|
|
5
|
+
Author: icerui
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/icerui/github-installer
|
|
8
|
+
Project-URL: Repository, https://github.com/icerui/github-installer
|
|
9
|
+
Project-URL: Issues, https://github.com/icerui/github-installer/issues
|
|
10
|
+
Keywords: mcp,mcp-server,github,installer,ai-agent,claude,cursor,automation,devtools
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
22
|
+
Classifier: Topic :: System :: Installation/Setup
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# gitinstall
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<strong>MCP server that gives AI agents the ability to install any GitHub project</strong><br/>
|
|
32
|
+
<em>让 AI Agent 拥有安装任何 GitHub 开源项目的能力</em>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
|
|
37
|
+
<a href="https://pypi.org/project/gitinstall"><img src="https://img.shields.io/pypi/v/gitinstall?style=for-the-badge" alt="PyPI"></a>
|
|
38
|
+
<img src="https://img.shields.io/badge/MCP-2024--11--05-blueviolet?style=for-the-badge" alt="MCP Protocol">
|
|
39
|
+
<img src="https://img.shields.io/badge/dependencies-0-brightgreen?style=for-the-badge" alt="Zero Dependencies">
|
|
40
|
+
<img src="https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-green?style=for-the-badge" alt="Platforms">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<b>Zero external dependencies</b> · Pure Python stdlib · Works without any LLM
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## The Problem
|
|
50
|
+
|
|
51
|
+
AI agents can write code, explain errors, and suggest commands — but they **can't actually install software** on your machine. When you say "help me set up ComfyUI", the AI gives you a wall of commands and hopes for the best.
|
|
52
|
+
|
|
53
|
+
**gitinstall** bridges this gap. It's an MCP server that gives any AI agent (Claude, Cursor, Copilot, etc.) the ability to:
|
|
54
|
+
|
|
55
|
+
1. **Detect** your system (OS, GPU, runtimes, package managers)
|
|
56
|
+
2. **Plan** the installation (30+ languages, 82 known projects)
|
|
57
|
+
3. **Execute** safely (dangerous command blocking, no `rm -rf /`)
|
|
58
|
+
4. **Auto-fix** errors (28 patterns: PEP 668, CUDA mismatch, missing tools...)
|
|
59
|
+
5. **Retry** with fallback strategies if the first approach fails
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Quick Start
|
|
64
|
+
|
|
65
|
+
### For Claude Desktop
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install gitinstall
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Add to `~/.claude/claude_desktop_config.json`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"gitinstall": {
|
|
77
|
+
"command": "gitinstall-mcp"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Restart Claude Desktop. Now you can say:
|
|
84
|
+
|
|
85
|
+
> "Help me install ComfyUI on this machine"
|
|
86
|
+
|
|
87
|
+
Claude will call gitinstall's tools to detect your system, generate a plan, and execute it — with real-time progress updates and automatic error recovery.
|
|
88
|
+
|
|
89
|
+
### For Cursor
|
|
90
|
+
|
|
91
|
+
Add to Cursor's MCP settings:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"gitinstall": {
|
|
97
|
+
"command": "gitinstall-mcp"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### For VS Code (Copilot)
|
|
104
|
+
|
|
105
|
+
Add to your VS Code `settings.json`:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcp": {
|
|
110
|
+
"servers": {
|
|
111
|
+
"gitinstall": {
|
|
112
|
+
"command": "gitinstall-mcp"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### For any MCP client
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
gitinstall-mcp # Starts MCP server on stdio (JSON-RPC 2.0)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## MCP Tools
|
|
128
|
+
|
|
129
|
+
gitinstall exposes 6 tools via MCP:
|
|
130
|
+
|
|
131
|
+
| Tool | What it does |
|
|
132
|
+
|------|-------------|
|
|
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 (28 patterns) |
|
|
135
|
+
| `detect_environment` | Report OS, CPU, GPU, runtimes, package managers, disk space |
|
|
136
|
+
| `get_project_info` | Fetch GitHub project metadata without installing |
|
|
137
|
+
| `check_system_health` | Full system diagnostic with fix suggestions |
|
|
138
|
+
| `audit_dependencies` | Scan project dependencies for known CVEs |
|
|
139
|
+
|
|
140
|
+
### Example: `install_github_project`
|
|
141
|
+
|
|
142
|
+
The AI calls:
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"name": "install_github_project",
|
|
146
|
+
"arguments": {
|
|
147
|
+
"project": "comfyanonymous/ComfyUI"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
gitinstall handles everything:
|
|
153
|
+
- Detects macOS Apple Silicon M3 + Python 3.12 + brew
|
|
154
|
+
- Generates 3-step plan (clone → install PyTorch MPS → install deps)
|
|
155
|
+
- Executes each step with safety checks
|
|
156
|
+
- If `pip install` fails with PEP 668, auto-fixes with `python -m venv`
|
|
157
|
+
- Returns success status + launch command
|
|
158
|
+
|
|
159
|
+
### Example: `diagnose_install_error`
|
|
160
|
+
|
|
161
|
+
The AI calls:
|
|
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
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## What makes it different
|
|
184
|
+
|
|
185
|
+
### No LLM required
|
|
186
|
+
|
|
187
|
+
The core engine is a **rule-based system**, not an AI wrapper:
|
|
188
|
+
- 82 known projects have hand-crafted installation recipes
|
|
189
|
+
- 30+ language templates (Python, Node, Rust, Go, C++, Haskell, Zig, Elixir...)
|
|
190
|
+
- 28 error-fix rules covering real-world installation failures
|
|
191
|
+
- LLM is optional — only used when the rule engine isn't confident
|
|
192
|
+
|
|
193
|
+
### Zero dependencies
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
$ pip show gitinstall | grep Requires
|
|
197
|
+
Requires:
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Pure Python standard library. No `requests`, no `click`, no `rich`. One `pip install` and it works. No dependency conflicts, ever.
|
|
201
|
+
|
|
202
|
+
### Safety built-in
|
|
203
|
+
|
|
204
|
+
- **30+ dangerous command patterns blocked** (including base64/heredoc encoding bypass attempts)
|
|
205
|
+
- **SSRF protection** on URL fetching (whitelist-only)
|
|
206
|
+
- **No auto-sudo** — prompts explicitly when root needed
|
|
207
|
+
- **Trusted failure detection** — stops retrying when the error is unfixable
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Also works as a CLI
|
|
212
|
+
|
|
213
|
+
gitinstall works standalone too, no AI agent needed:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
gitinstall comfyanonymous/ComfyUI # Install a project
|
|
217
|
+
gitinstall detect # Check your system
|
|
218
|
+
gitinstall doctor # System diagnostic
|
|
219
|
+
gitinstall audit pytorch/pytorch # Security audit
|
|
220
|
+
gitinstall plan neovim/neovim # Preview install plan
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Supported Languages & Platforms
|
|
226
|
+
|
|
227
|
+
**Languages** (30+): Python, Node.js, TypeScript, Rust, Go, C, C++, Java, Kotlin, Scala, Swift, Ruby, PHP, Haskell, Zig, Elixir, Erlang, Clojure, Julia, Lua, Perl, R, Dart, .NET/C#, OCaml, Nim, V, Docker, Conda, CMake, Meson, Autotools, Bazel
|
|
228
|
+
|
|
229
|
+
**Platforms**: macOS (Intel + Apple Silicon M1-M4), Ubuntu/Debian, Fedora/RHEL, Arch Linux, Windows 10/11, WSL2
|
|
230
|
+
|
|
231
|
+
**GPU**: NVIDIA CUDA, AMD ROCm, Apple MPS, CPU fallback
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## How It Works
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
User → AI Agent → MCP → gitinstall
|
|
239
|
+
├── detect → OS / GPU / runtimes / package managers
|
|
240
|
+
├── fetch → GitHub API → project type detection
|
|
241
|
+
├── plan → SmartPlanner (known → template → README)
|
|
242
|
+
├── execute → subprocess + safety filter + cd/venv tracking
|
|
243
|
+
├── fix → 28 error patterns → auto-retry
|
|
244
|
+
└── fallback → brew → cargo → source build
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**SmartPlanner** has 3 tiers:
|
|
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)
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Development
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
git clone https://github.com/icerui/github-installer.git
|
|
258
|
+
cd github-installer
|
|
259
|
+
|
|
260
|
+
# Run tests (2126 unit tests, zero external deps)
|
|
261
|
+
python -m pytest tests/unit/ -q
|
|
262
|
+
|
|
263
|
+
# Test MCP server
|
|
264
|
+
python tests/test_mcp_server.py
|
|
265
|
+
|
|
266
|
+
# Run locally
|
|
267
|
+
python tools/mcp_server.py # MCP server on stdio
|
|
268
|
+
python tools/main.py detect # CLI mode
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
MIT © icerui
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# gitinstall
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>MCP server that gives AI agents the ability to install any GitHub project</strong><br/>
|
|
5
|
+
<em>让 AI Agent 拥有安装任何 GitHub 开源项目的能力</em>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
|
|
10
|
+
<a href="https://pypi.org/project/gitinstall"><img src="https://img.shields.io/pypi/v/gitinstall?style=for-the-badge" alt="PyPI"></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/MCP-2024--11--05-blueviolet?style=for-the-badge" alt="MCP Protocol">
|
|
12
|
+
<img src="https://img.shields.io/badge/dependencies-0-brightgreen?style=for-the-badge" alt="Zero Dependencies">
|
|
13
|
+
<img src="https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-green?style=for-the-badge" alt="Platforms">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<b>Zero external dependencies</b> · Pure Python stdlib · Works without any LLM
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## The Problem
|
|
23
|
+
|
|
24
|
+
AI agents can write code, explain errors, and suggest commands — but they **can't actually install software** on your machine. When you say "help me set up ComfyUI", the AI gives you a wall of commands and hopes for the best.
|
|
25
|
+
|
|
26
|
+
**gitinstall** bridges this gap. It's an MCP server that gives any AI agent (Claude, Cursor, Copilot, etc.) the ability to:
|
|
27
|
+
|
|
28
|
+
1. **Detect** your system (OS, GPU, runtimes, package managers)
|
|
29
|
+
2. **Plan** the installation (30+ languages, 82 known projects)
|
|
30
|
+
3. **Execute** safely (dangerous command blocking, no `rm -rf /`)
|
|
31
|
+
4. **Auto-fix** errors (28 patterns: PEP 668, CUDA mismatch, missing tools...)
|
|
32
|
+
5. **Retry** with fallback strategies if the first approach fails
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
### For Claude Desktop
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install gitinstall
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Add to `~/.claude/claude_desktop_config.json`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"gitinstall": {
|
|
50
|
+
"command": "gitinstall-mcp"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Restart Claude Desktop. Now you can say:
|
|
57
|
+
|
|
58
|
+
> "Help me install ComfyUI on this machine"
|
|
59
|
+
|
|
60
|
+
Claude will call gitinstall's tools to detect your system, generate a plan, and execute it — with real-time progress updates and automatic error recovery.
|
|
61
|
+
|
|
62
|
+
### For Cursor
|
|
63
|
+
|
|
64
|
+
Add to Cursor's MCP settings:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"mcpServers": {
|
|
69
|
+
"gitinstall": {
|
|
70
|
+
"command": "gitinstall-mcp"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### For VS Code (Copilot)
|
|
77
|
+
|
|
78
|
+
Add to your VS Code `settings.json`:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"mcp": {
|
|
83
|
+
"servers": {
|
|
84
|
+
"gitinstall": {
|
|
85
|
+
"command": "gitinstall-mcp"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### For any MCP client
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
gitinstall-mcp # Starts MCP server on stdio (JSON-RPC 2.0)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## MCP Tools
|
|
101
|
+
|
|
102
|
+
gitinstall exposes 6 tools via MCP:
|
|
103
|
+
|
|
104
|
+
| Tool | What it does |
|
|
105
|
+
|------|-------------|
|
|
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 (28 patterns) |
|
|
108
|
+
| `detect_environment` | Report OS, CPU, GPU, runtimes, package managers, disk space |
|
|
109
|
+
| `get_project_info` | Fetch GitHub project metadata without installing |
|
|
110
|
+
| `check_system_health` | Full system diagnostic with fix suggestions |
|
|
111
|
+
| `audit_dependencies` | Scan project dependencies for known CVEs |
|
|
112
|
+
|
|
113
|
+
### Example: `install_github_project`
|
|
114
|
+
|
|
115
|
+
The AI calls:
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"name": "install_github_project",
|
|
119
|
+
"arguments": {
|
|
120
|
+
"project": "comfyanonymous/ComfyUI"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
gitinstall handles everything:
|
|
126
|
+
- Detects macOS Apple Silicon M3 + Python 3.12 + brew
|
|
127
|
+
- Generates 3-step plan (clone → install PyTorch MPS → install deps)
|
|
128
|
+
- Executes each step with safety checks
|
|
129
|
+
- If `pip install` fails with PEP 668, auto-fixes with `python -m venv`
|
|
130
|
+
- Returns success status + launch command
|
|
131
|
+
|
|
132
|
+
### Example: `diagnose_install_error`
|
|
133
|
+
|
|
134
|
+
The AI calls:
|
|
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
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## What makes it different
|
|
157
|
+
|
|
158
|
+
### No LLM required
|
|
159
|
+
|
|
160
|
+
The core engine is a **rule-based system**, not an AI wrapper:
|
|
161
|
+
- 82 known projects have hand-crafted installation recipes
|
|
162
|
+
- 30+ language templates (Python, Node, Rust, Go, C++, Haskell, Zig, Elixir...)
|
|
163
|
+
- 28 error-fix rules covering real-world installation failures
|
|
164
|
+
- LLM is optional — only used when the rule engine isn't confident
|
|
165
|
+
|
|
166
|
+
### Zero dependencies
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
$ pip show gitinstall | grep Requires
|
|
170
|
+
Requires:
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Pure Python standard library. No `requests`, no `click`, no `rich`. One `pip install` and it works. No dependency conflicts, ever.
|
|
174
|
+
|
|
175
|
+
### Safety built-in
|
|
176
|
+
|
|
177
|
+
- **30+ dangerous command patterns blocked** (including base64/heredoc encoding bypass attempts)
|
|
178
|
+
- **SSRF protection** on URL fetching (whitelist-only)
|
|
179
|
+
- **No auto-sudo** — prompts explicitly when root needed
|
|
180
|
+
- **Trusted failure detection** — stops retrying when the error is unfixable
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Also works as a CLI
|
|
185
|
+
|
|
186
|
+
gitinstall works standalone too, no AI agent needed:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
gitinstall comfyanonymous/ComfyUI # Install a project
|
|
190
|
+
gitinstall detect # Check your system
|
|
191
|
+
gitinstall doctor # System diagnostic
|
|
192
|
+
gitinstall audit pytorch/pytorch # Security audit
|
|
193
|
+
gitinstall plan neovim/neovim # Preview install plan
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Supported Languages & Platforms
|
|
199
|
+
|
|
200
|
+
**Languages** (30+): Python, Node.js, TypeScript, Rust, Go, C, C++, Java, Kotlin, Scala, Swift, Ruby, PHP, Haskell, Zig, Elixir, Erlang, Clojure, Julia, Lua, Perl, R, Dart, .NET/C#, OCaml, Nim, V, Docker, Conda, CMake, Meson, Autotools, Bazel
|
|
201
|
+
|
|
202
|
+
**Platforms**: macOS (Intel + Apple Silicon M1-M4), Ubuntu/Debian, Fedora/RHEL, Arch Linux, Windows 10/11, WSL2
|
|
203
|
+
|
|
204
|
+
**GPU**: NVIDIA CUDA, AMD ROCm, Apple MPS, CPU fallback
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## How It Works
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
User → AI Agent → MCP → gitinstall
|
|
212
|
+
├── detect → OS / GPU / runtimes / package managers
|
|
213
|
+
├── fetch → GitHub API → project type detection
|
|
214
|
+
├── plan → SmartPlanner (known → template → README)
|
|
215
|
+
├── execute → subprocess + safety filter + cd/venv tracking
|
|
216
|
+
├── fix → 28 error patterns → auto-retry
|
|
217
|
+
└── fallback → brew → cargo → source build
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**SmartPlanner** has 3 tiers:
|
|
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)
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Development
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
git clone https://github.com/icerui/github-installer.git
|
|
231
|
+
cd github-installer
|
|
232
|
+
|
|
233
|
+
# Run tests (2126 unit tests, zero external deps)
|
|
234
|
+
python -m pytest tests/unit/ -q
|
|
235
|
+
|
|
236
|
+
# Test MCP server
|
|
237
|
+
python tests/test_mcp_server.py
|
|
238
|
+
|
|
239
|
+
# Run locally
|
|
240
|
+
python tools/mcp_server.py # MCP server on stdio
|
|
241
|
+
python tools/main.py detect # CLI mode
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
MIT © icerui
|