xithead 1.2.1 → 1.4.0
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.
- package/README.md +72 -187
- package/npm/bin/xithead.js +366 -366
- package/npm/index.d.ts +57 -57
- package/npm/index.js +139 -212
- package/npm/package.json +54 -0
- package/npm/postinstall.js +43 -43
- package/package.json +36 -53
package/README.md
CHANGED
|
@@ -1,187 +1,72 @@
|
|
|
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
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```powershell
|
|
75
|
-
xithead # Claude Code mit Proxy starten (empfohlen)
|
|
76
|
-
xithead proxy # Nur Proxy starten (mit Logs)
|
|
77
|
-
xithead stats # Token-Einsparungen anzeigen
|
|
78
|
-
xithead update # Alles aktualisieren (npm + Python)
|
|
79
|
-
xithead help # Alle Befehle
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### PowerShell-Hilfsbefehle (nach Installation)
|
|
83
|
-
|
|
84
|
-
```powershell
|
|
85
|
-
xithead-dashboard # Dashboard im Browser öffnen
|
|
86
|
-
xithead-stats # Einsparungen anzeigen
|
|
87
|
-
xithead-update # Alles auf neuestem Stand halten
|
|
88
|
-
xithead-github # GitHub Token + MCP Server einrichten
|
|
89
|
-
xithead-doctor # System-Diagnose
|
|
90
|
-
xithead-help # Alle Befehle
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Dashboard
|
|
96
|
-
|
|
97
|
-
Das Live-Dashboard läuft automatisch auf `http://localhost:8787/dashboard`:
|
|
98
|
-
|
|
99
|
-
- **Echtzeit-Statistiken** — Token gespart, Kosten, Cache-Hit-Rate
|
|
100
|
-
- **Request-Verlauf** — Token-Verbrauch pro Request als Chart
|
|
101
|
-
- **Einstellungen** — Komprimierungsstärke, Cache-Optionen
|
|
102
|
-
- **Installation** — Quick-Start Guide direkt im Browser
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Wie es funktioniert
|
|
107
|
-
|
|
108
|
-
| Feature | Beschreibung |
|
|
109
|
-
|---|---|
|
|
110
|
-
| **Cache Control** | Anthropic `cache_control` wird automatisch in jeden Request injiziert (bis zu 90% Einsparung bei Wiederholungen) |
|
|
111
|
-
| **Context Trimming** | Lange Konversations-Historien werden aggressiv komprimiert |
|
|
112
|
-
| **Request Deduplication** | Identische gleichzeitige Requests werden zusammengeführt |
|
|
113
|
-
| **429 Retry** | Automatisches Retry mit `Retry-After` Header bei Rate Limits |
|
|
114
|
-
| **SQLite Cache** | Persistenter Cache unter `~/.xithead/cache/` |
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Claude Code konfigurieren
|
|
119
|
-
|
|
120
|
-
xithead setzt `~/.claude/settings.json` automatisch während der Installation:
|
|
121
|
-
|
|
122
|
-
```json
|
|
123
|
-
{
|
|
124
|
-
"env": {
|
|
125
|
-
"ANTHROPIC_BASE_URL": "http://localhost:8787/v1",
|
|
126
|
-
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "16000",
|
|
127
|
-
"XITHEAD_ENABLE_CACHE_CONTROL": "1",
|
|
128
|
-
"XITHEAD_ENABLE_DEDUP": "1",
|
|
129
|
-
"XITHEAD_ENABLE_CONTEXT_TRIM": "1",
|
|
130
|
-
"HEADROOM_STRENGTH": "aggressive"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Damit nutzt auch `claude` direkt (ohne `xithead`-Wrapper) den Proxy.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## GitHub Integration
|
|
140
|
-
|
|
141
|
-
Claude Code kann direkt mit GitHub arbeiten (Repos lesen, PRs erstellen, Issues verwalten):
|
|
142
|
-
|
|
143
|
-
```powershell
|
|
144
|
-
xithead-github # GitHub Token eingeben + MCP Server einrichten
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Token erstellen unter: [github.com/settings/tokens/new](https://github.com/settings/tokens/new)
|
|
148
|
-
Benötigte Scopes: `repo`, `workflow`, `read:org`
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
## Auto-Update
|
|
153
|
-
|
|
154
|
-
xithead prüft automatisch alle 6 Stunden auf neue Versionen:
|
|
155
|
-
- Neue npm-Version → stiller Hintergrund-Update
|
|
156
|
-
- Python-Paket → parallel aktualisiert
|
|
157
|
-
|
|
158
|
-
Manuelles Update jederzeit:
|
|
159
|
-
```powershell
|
|
160
|
-
xithead update # oder
|
|
161
|
-
xithead-update # PowerShell-Funktion
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Voraussetzungen
|
|
167
|
-
|
|
168
|
-
| Software | Version | Installiert durch |
|
|
169
|
-
|---|---|---|
|
|
170
|
-
| Python | ≥ 3.9 | Winget (automatisch) |
|
|
171
|
-
| Node.js | ≥ 18 | Winget (automatisch) |
|
|
172
|
-
| Claude Code | aktuell | npm (automatisch) |
|
|
173
|
-
| Git | aktuell | Winget (automatisch) |
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Lizenz
|
|
178
|
-
|
|
179
|
-
[Apache 2.0](LICENSE) — © 2026 [Xtream-ITSolutions UG](https://xtream-itsolutions.com)
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
<div align="center">
|
|
184
|
-
<a href="https://discord.gg/xtream-itsolutions">💬 Discord</a> ·
|
|
185
|
-
<a href="https://xtream-itsolutions.com">🌐 xtream-itsolutions.com</a> ·
|
|
186
|
-
<a href="https://github.com/xtream-itsolutions/xithead">GitHub</a>
|
|
187
|
-
</div>
|
|
1
|
+
# xtream-head
|
|
2
|
+
|
|
3
|
+
**Lokaler Claude Code Proxy** von [Xtream-ITSolutions UG](https://xtream-itsolutions.com) — setzt sich zwischen Claude Code und die Anthropic API, maximiert den Prompt Cache und reduziert Token-Kosten bis zu **88%**.
|
|
4
|
+
|
|
5
|
+
Dashboard läuft lokal auf `localhost:8787/dashboard` — deine Stats, deine Daten.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
### Option 1: Von GitHub (EMPFOHLEN) ⭐
|
|
12
|
+
|
|
13
|
+
Immer die neueste Version mit allen Features:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install github:xtream-itsolutions/xithead
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Dann starten:
|
|
20
|
+
```bash
|
|
21
|
+
xithead
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Option 2: Skript-Installation (Windows)
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
iex (irm https://raw.githubusercontent.com/xtream-itsolutions/xithead/main/xithead.ps1)
|
|
28
|
+
xithead
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Option 3: npm (Stable Release)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install xithead@latest
|
|
35
|
+
xithead
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Vollständige Anleitung für Windows, macOS und Linux: **[xtream-head.com/installation](https://xtream-head.com/installation)**
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Befehle
|
|
43
|
+
|
|
44
|
+
| Befehl | Funktion |
|
|
45
|
+
|--------|----------|
|
|
46
|
+
| `xithead` | Proxy + Claude Code starten |
|
|
47
|
+
| `xithead-dashboard` | Dashboard im Browser öffnen |
|
|
48
|
+
| `xithead-stats` | Einsparungen in der Konsole anzeigen |
|
|
49
|
+
| `xithead-update` | Alles aktualisieren |
|
|
50
|
+
| `xithead-doctor` | System-Diagnose |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Was es macht
|
|
55
|
+
|
|
56
|
+
- **Cache-Control Normalisierung** — Verhindert HTTP 400 Fehler
|
|
57
|
+
- **Lossless Compression** — ANSI-Strip, Run-Collapse, Diff-Strip, Line-Truncation
|
|
58
|
+
- **Message Dedup** — Identische Nachrichten werden eliminiert
|
|
59
|
+
- **Context Trim** — Automatische Kürzung bei Token-Overflow
|
|
60
|
+
- **Lokales Dashboard** — Echtzeit-Stats auf `localhost:8787/dashboard`
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Links
|
|
65
|
+
|
|
66
|
+
- Website: [xtream-head.com](https://xtream-head.com)
|
|
67
|
+
- Discord: [discord.gg/xtream-itsolutions](https://discord.gg/xtream-itsolutions)
|
|
68
|
+
- Unternehmen: [xtream-itsolutions.com](https://xtream-itsolutions.com)
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
Apache 2.0 License · © 2026 Xtream-ITSolutions UG
|