xithead 1.2.2 → 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 CHANGED
@@ -1,187 +1,72 @@
1
- <div align="center">
2
- <img src="https://cdn.xtream-itsolutions.com/u/logo.png" alt="Xtream-ITSolutions UG" width="140" />
3
- <br/><br/>
4
- <h1>⚡ xithead</h1>
5
- <p><strong>Claude Context Optimizer — bis zu 95% Token-Einsparung, automatisch</strong></p>
6
- <p>
7
- <a href="https://pypi.org/project/xithead/"><img src="https://img.shields.io/pypi/v/xithead?color=00e5ff&label=PyPI&style=flat-square" alt="PyPI" /></a>
8
- <a href="https://www.npmjs.com/package/xithead"><img src="https://img.shields.io/npm/v/xithead?color=a855f7&label=npm&style=flat-square" alt="npm" /></a>
9
- <a href="https://discord.gg/xtream-itsolutions"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a>
10
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-10b981?style=flat-square" alt="Apache 2.0" /></a>
11
- </p>
12
- <p>
13
- <a href="https://xtream-itsolutions.com">🌐 xtream-itsolutions.com</a> ·
14
- <a href="https://discord.gg/xtream-itsolutions">💬 Discord</a> ·
15
- <a href="https://github.com/xtream-itsolutions/xithead/issues">🐛 Bug melden</a>
16
- </p>
17
- </div>
18
-
19
- ---
20
-
21
- ## Was ist xithead?
22
-
23
- **xithead** ist ein lokaler Proxy von **[Xtream-ITSolutions UG](https://xtream-itsolutions.com)**, der sich zwischen Claude Code und die Anthropic API setzt. Er komprimiert Kontext aggressiv, cached Antworten und dedupliziert identische Requests — vollautomatisch, ohne Code-Änderungen.
24
-
25
- ```
26
- Claude Code ──► xithead Proxy :8787 ──► Anthropic API
27
- │ Cache-Control
28
- │ Context-Trim
29
- │ Request-Dedup
30
- └ Live Dashboard
31
- ```
32
-
33
- **Ergebnis:** 50–95% weniger Token-Verbrauch, gleiche Qualität.
34
-
35
- ---
36
-
37
- ## Installation
38
-
39
- ### Windows (empfohlen — ein Befehl, alles automatisch)
40
-
41
- ```powershell
42
- iex (irm https://raw.githubusercontent.com/xtream-itsolutions/xithead/main/headroom.ps1)
43
- ```
44
-
45
- Das Skript installiert automatisch (ohne Adminrechte):
46
- - Python 3.12, Node.js, Git (via Winget falls nicht vorhanden)
47
- - xithead Python-Paket + Proxy-Abhängigkeiten
48
- - xithead npm CLI + Claude Code
49
- - Claude Code konfigurieren (`~/.claude/settings.json`)
50
- - PowerShell-Profil mit allen Hilfsbefehlen
51
-
52
- Danach nur noch eingeben (optional):
53
- - Claude Login (Browser oder API-Key)
54
- - GitHub Token (für Repo-Zugriff in Claude Code)
55
-
56
- ### npm (Windows / macOS / Linux)
57
-
58
- ```bash
59
- npm install -g xithead
60
- xithead
61
- ```
62
-
63
- ### pip (Python direkt)
64
-
65
- ```bash
66
- pip install "xithead[proxy]"
67
- python -m xithead.cli.main proxy --port 8787
68
- ```
69
-
70
- ---
71
-
72
- ## Benutzung
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