tzero-mcp 11.0.0 ā 11.11.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/CHANGELOG.md +56 -56
- package/CONTRIBUTING.md +71 -71
- package/LICENSE +21 -21
- package/README.md +64 -64
- package/bin/tzero-mcp.js +62 -62
- package/bin/tzero.js +61 -61
- package/index.d.ts +25 -25
- package/index.js +15 -15
- package/package.json +89 -88
- package/src/addmcp.py +1203 -1197
- package/src/app.py +1810 -1810
- package/src/main.py +60 -60
- package/src/pc_fixer_mcp.py +25 -25
- package/src/tzero/__init__.py +54 -54
- package/src/tzero/__main__.py +6 -6
- package/src/tzero/siber_akademi_icon.py +77 -77
- package/src/tzero/tzero_arch_test.py +463 -463
- package/src/tzero/tzero_benchmark.py +475 -475
- package/src/tzero/tzero_blackboard.py +257 -257
- package/src/tzero/tzero_bridge.py +546 -546
- package/src/tzero/tzero_budget.py +195 -195
- package/src/tzero/tzero_card.py +431 -0
- package/src/tzero/tzero_ci.py +153 -153
- package/src/tzero/tzero_commit.py +192 -192
- package/src/tzero/tzero_contracts.py +1093 -1093
- package/src/tzero/tzero_cost.py +166 -166
- package/src/tzero/tzero_dashboard.py +1960 -1960
- package/src/tzero/tzero_debt.py +461 -461
- package/src/tzero/tzero_deps.py +462 -462
- package/src/tzero/tzero_drift.py +208 -208
- package/src/tzero/tzero_explain.py +306 -306
- package/src/tzero/tzero_features.py +3024 -3024
- package/src/tzero/tzero_federation.py +299 -299
- package/src/tzero/tzero_fix.py +557 -228
- package/src/tzero/tzero_fixer/__init__.py +63 -63
- package/src/tzero/tzero_fixer/amalgamation.py +334 -334
- package/src/tzero/tzero_fixer/ast_syntax_healer.py +464 -464
- package/src/tzero/tzero_fixer/ast_type_modernizer.py +288 -288
- package/src/tzero/tzero_fixer/async_io_modernizer.py +127 -127
- package/src/tzero/tzero_fixer/automated_regression_suite.py +600 -600
- package/src/tzero/tzero_fixer/benchmarks_and_diagnostics.py +174 -174
- package/src/tzero/tzero_fixer/ci_cd_self_healing_gate.py +246 -246
- package/src/tzero/tzero_fixer/code_duplicity_and_refactorer.py +151 -151
- package/src/tzero/tzero_fixer/code_smells_healer.py +260 -260
- package/src/tzero/tzero_fixer/cwe_remediator.py +171 -171
- package/src/tzero/tzero_fixer/dead_code_eliminator.py +150 -150
- package/src/tzero/tzero_fixer/dependency_vulnerability_auditor.py +309 -309
- package/src/tzero/tzero_fixer/git_advanced_surgeon.py +280 -280
- package/src/tzero/tzero_fixer/hardware_and_disk_doctor.py +325 -325
- package/src/tzero/tzero_fixer/import_graph_healer.py +412 -412
- package/src/tzero/tzero_fixer/interactive_tui.py +91 -91
- package/src/tzero/tzero_fixer/knowledge_base.py +295 -295
- package/src/tzero/tzero_fixer/knowledge_base_extended.py +940 -940
- package/src/tzero/tzero_fixer/linters_and_static_analyzer.py +307 -307
- package/src/tzero/tzero_fixer/mcp_server.py +489 -489
- package/src/tzero/tzero_fixer/models.py +385 -385
- package/src/tzero/tzero_fixer/orchestrator.py +375 -375
- package/src/tzero/tzero_fixer/os_doctor.py +502 -502
- package/src/tzero/tzero_fixer/packaging_abi_surgeon.py +323 -323
- package/src/tzero/tzero_fixer/pc_fixer_doctor.py +600 -600
- package/src/tzero/tzero_fixer/performance_and_memory_profiler.py +274 -274
- package/src/tzero/tzero_fixer/polyglot_ast_parsers.py +313 -313
- package/src/tzero/tzero_fixer/polyglot_build_healer.py +364 -364
- package/src/tzero/tzero_fixer/polyglot_config_healer.py +318 -318
- package/src/tzero/tzero_fixer/polyglot_doctor.py +372 -372
- package/src/tzero/tzero_fixer/polyglot_linters.py +619 -619
- package/src/tzero/tzero_fixer/polyglot_schema_validator.py +305 -305
- package/src/tzero/tzero_fixer/security_cwe_database.py +444 -444
- package/src/tzero/tzero_fixer/security_deep_rules.py +114 -114
- package/src/tzero/tzero_fixer/security_rules_catalog.py +110 -110
- package/src/tzero/tzero_fixer/security_zero_leak.py +326 -326
- package/src/tzero/tzero_fixer/smart_patch_recommender.py +223 -223
- package/src/tzero/tzero_fixer/synthetic_workspace_generator.py +220 -220
- package/src/tzero/tzero_fixer/system_diagnostics_extended.py +493 -493
- package/src/tzero/tzero_fixer/system_repair_recipes.py +447 -447
- package/src/tzero/tzero_fixer/venv_doctor.py +309 -309
- package/src/tzero/tzero_golden.py +319 -319
- package/src/tzero/tzero_graph_hud.html +338 -338
- package/src/tzero/tzero_graph_rag.py +263 -263
- package/src/tzero/tzero_growth.py +415 -0
- package/src/tzero/tzero_guard.py +251 -243
- package/src/tzero/tzero_hooks.py +565 -565
- package/src/tzero/tzero_infra.py +274 -274
- package/src/tzero/tzero_jarvis/__init__.py +134 -124
- package/src/tzero/tzero_jarvis/causal_graph.py +310 -310
- package/src/tzero/tzero_jarvis/creative_director.py +333 -0
- package/src/tzero/tzero_jarvis/graph_visualizer.py +395 -395
- package/src/tzero/tzero_jarvis/hybrid_search.py +214 -214
- package/src/tzero/tzero_jarvis/latent_press.py +137 -137
- package/src/tzero/tzero_jarvis/memory_consolidation.py +212 -212
- package/src/tzero/tzero_jarvis/minhash_lsh.py +184 -184
- package/src/tzero/tzero_jarvis/orchestrator.py +335 -335
- package/src/tzero/tzero_jarvis/self_healing.py +308 -308
- package/src/tzero/tzero_jarvis/semantic_compressor.py +887 -887
- package/src/tzero/tzero_jarvis/swarm.py +261 -261
- package/src/tzero/tzero_jarvis/swarm_bft.py +144 -144
- package/src/tzero/tzero_jarvis/workspace_orchestrator.py +1167 -1167
- package/src/tzero/tzero_jarvis/zero_key_router.py +173 -173
- package/src/tzero/tzero_lsp.py +634 -634
- package/src/tzero/tzero_mcp.py +5314 -5237
- package/src/tzero/tzero_mutation.py +358 -358
- package/src/tzero/tzero_neural_cortex.py +1425 -1425
- package/src/tzero/tzero_packer.py +577 -577
- package/src/tzero/tzero_patch.py +624 -624
- package/src/tzero/tzero_pc_fixer.py +12699 -12699
- package/src/tzero/tzero_pipe.py +95 -95
- package/src/tzero/tzero_polyglot.py +799 -799
- package/src/tzero/tzero_proxy.py +127 -127
- package/src/tzero/tzero_reachability.py +272 -272
- package/src/tzero/tzero_replay.py +141 -141
- package/src/tzero/tzero_rust_bridge.py +198 -198
- package/src/tzero/tzero_scip.py +368 -368
- package/src/tzero/tzero_security.py +573 -573
- package/src/tzero/tzero_semantic_merge.py +189 -189
- package/src/tzero/tzero_snapshot.py +471 -471
- package/src/tzero/tzero_stubs.py +313 -313
- package/src/tzero/tzero_subagent_engine.py +459 -459
- package/src/tzero/tzero_superdesign.py +774 -774
- package/src/tzero/tzero_sync.py +241 -241
- package/src/tzero/tzero_task_benchmark.py +506 -458
- package/src/tzero/tzero_tui.py +313 -313
- package/src/tzero/tzero_turbo.py +264 -264
- package/src/tzero/tzero_v3.py +9997 -9900
- package/src/tzero.py +6 -6
- package/src/tzero_mcp.py +25 -0
- package/test/package.test.js +55 -55
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
T-ZERO $0.00 BUDGET VIRAL MARKETING & COMMUNITY GROWTH ENGINE
|
|
4
|
+
-------------------------------------------------------------
|
|
5
|
+
Developer: Toprak Ahmet AydoÄmuÅ (Siber Akademi)
|
|
6
|
+
License: MIT | Version: 11.11.0
|
|
7
|
+
|
|
8
|
+
Strictly $0.00 budget: Zero paid ads, zero paid APIs, zero cloud tokens.
|
|
9
|
+
Pure organic developer-to-developer growth engine engineered to drive 100+ GitHub stars.
|
|
10
|
+
Generates tailored, high-converting launch copy for Reddit, Hacker News, Product Hunt,
|
|
11
|
+
Twitter/X, LinkedIn, Dev.to, Turkish Tech Hubs, and Awesome-Lists.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
import os
|
|
16
|
+
import json
|
|
17
|
+
import urllib.request
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from typing import Dict, Any, List
|
|
20
|
+
|
|
21
|
+
REPO_URL = "https://github.com/toprakahmetaydogmus/TZeroAlgorithm"
|
|
22
|
+
WEB_URL = "https://tzero-indol.vercel.app"
|
|
23
|
+
AUTHOR = "Toprak Ahmet AydoÄmuÅ"
|
|
24
|
+
ORGANIZATION = "Siber Akademi"
|
|
25
|
+
VERSION = "v11.11.0"
|
|
26
|
+
PYPI_PKG = "tzero-mcp"
|
|
27
|
+
NPM_PKG = "tzero-mcp"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get_live_github_stars() -> int:
|
|
31
|
+
"""Fetch current GitHub stargazers count."""
|
|
32
|
+
try:
|
|
33
|
+
url = "https://api.github.com/repos/toprakahmetaydogmus/TZeroAlgorithm"
|
|
34
|
+
req = urllib.request.Request(url, headers={"User-Agent": "T-Zero-Growth-Engine"})
|
|
35
|
+
with urllib.request.urlopen(req, timeout=5) as resp:
|
|
36
|
+
data = json.loads(resp.read().decode("utf-8"))
|
|
37
|
+
return int(data.get("stargazers_count", 16))
|
|
38
|
+
except Exception:
|
|
39
|
+
return 16
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def render_progress_bar(current: int, target: int = 100, length: int = 30) -> str:
|
|
43
|
+
"""Renders visual ASCII progress bar."""
|
|
44
|
+
pct = min(1.0, current / target)
|
|
45
|
+
filled = int(pct * length)
|
|
46
|
+
bar = "ā" * filled + "ā" * (length - filled)
|
|
47
|
+
return f"[{bar}] {current}/{target} Stars ({pct*100:.1f}%)"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def generate_reddit_posts() -> Dict[str, Dict[str, str]]:
|
|
51
|
+
"""Generates copy-paste ready Reddit launch posts."""
|
|
52
|
+
return {
|
|
53
|
+
"r/Cursor": {
|
|
54
|
+
"title": "I built an open-source MCP server that cuts Cursor context tokens by 85-95% using AST pruning (100% local, no API keys, $0)",
|
|
55
|
+
"body": f"""Hey Cursor developers!
|
|
56
|
+
|
|
57
|
+
Like many of you, I kept hitting Cursor Composer context degradation and rate limits on medium-to-large repositories (100+ files). When you ingest an entire project, 90% of the token payload consists of function execution bodies that the LLM does not need to understand your architecture.
|
|
58
|
+
|
|
59
|
+
To solve this, I spent the last several months engineering **T-Zero** ({VERSION}) ā an open-source Model Context Protocol (MCP) server that deterministically prunes multi-language codebases down to their exact AST interfaces, type annotations, and docstrings before feeding them to Cursor.
|
|
60
|
+
|
|
61
|
+
### š Real Benchmark on 481-File Repository:
|
|
62
|
+
- **Raw Codebase Context:** 10,998,573 tokens (causes instant truncation / extreme lag)
|
|
63
|
+
- **T-Zero 4-Tier AST Tree:** 1,319,828 tokens (**-88.0% token reduction**)
|
|
64
|
+
- **Focus File Skeleton (T-3):** **-94.6% token reduction**
|
|
65
|
+
- **AST Visitor Speed:** <400ms (100% offline via local Python AST parser)
|
|
66
|
+
- **Unit & E2E Tests:** 537 automated tests passing with 0 errors
|
|
67
|
+
|
|
68
|
+
### š¤ New in {VERSION} ā AI Godfather Auto-Corrector:
|
|
69
|
+
- Catches AI coding hallucinations before code is committed.
|
|
70
|
+
- Statically validates imported symbols against your project's AST and auto-heals misspelled or imaginary functions.
|
|
71
|
+
- Injects missing stdlib modules and typing imports automatically.
|
|
72
|
+
|
|
73
|
+
### ā” Add to Cursor in 30 Seconds:
|
|
74
|
+
Add this to your Cursor MCP settings (`~/.cursor/mcp.json`):
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{{
|
|
78
|
+
"mcpServers": {{
|
|
79
|
+
"tzero": {{
|
|
80
|
+
"command": "python",
|
|
81
|
+
"args": ["-m", "tzero.tzero_mcp"]
|
|
82
|
+
}}
|
|
83
|
+
}}
|
|
84
|
+
}}
|
|
85
|
+
```
|
|
86
|
+
*(Or install via pip: `pip install {PYPI_PKG}` or npm: `npx {NPM_PKG}`)*
|
|
87
|
+
|
|
88
|
+
### š 100% Zero-Leak Security & Privacy:
|
|
89
|
+
- Zero external LLM calls or cloud telemetry.
|
|
90
|
+
- Built-in Shannon Entropy scanner (H >= 4.75) detects and redacts hardcoded API keys and credentials locally.
|
|
91
|
+
|
|
92
|
+
I'm 15 years old and building this as a solo open-source engineer at {ORGANIZATION}. Everything is 100% free under MIT.
|
|
93
|
+
|
|
94
|
+
If this saves your Cursor context budget, **I'd genuinely appreciate a star on GitHub ā** ā we are on the road to our first 100 stars!
|
|
95
|
+
|
|
96
|
+
š **GitHub:** {REPO_URL}
|
|
97
|
+
š **Live Benchmark:** {WEB_URL}
|
|
98
|
+
š **PyPI:** https://pypi.org/project/{PYPI_PKG}/
|
|
99
|
+
"""
|
|
100
|
+
},
|
|
101
|
+
"r/ClaudeAI": {
|
|
102
|
+
"title": "Stop hitting Claude Desktop & Claude Code 200K token limits: Open-source local AST context pruning (-88% to -95%)",
|
|
103
|
+
"body": f"""If you use Claude Desktop or Claude Code with complex multi-module codebases, you know how fast the 200K token window fills up. Once context fills up, Claude begins suffering from "lost-in-the-middle" attention degradation or hits expensive per-prompt costs.
|
|
104
|
+
|
|
105
|
+
**T-Zero** ({VERSION}) is a 100% local, offline MCP server that parses your codebase into an AST and strips implementation bodies while keeping 100% of the type signatures, classes, docstrings, and imports across 12+ programming languages.
|
|
106
|
+
|
|
107
|
+
### š” Why AST Beats Naive File Dumping:
|
|
108
|
+
When Claude writes a new endpoint or fixes a bug, it doesn't need 200 lines of SQL query builder boilerplate from your database driver. It just needs:
|
|
109
|
+
1. Class inheritance structures
|
|
110
|
+
2. Typed function signatures & return types
|
|
111
|
+
3. Docstrings & interface contracts
|
|
112
|
+
|
|
113
|
+
Claude gets 100% of the architectural context needed to produce zero-defect code, while consuming **up to 95% fewer tokens**.
|
|
114
|
+
|
|
115
|
+
### ā” 1-Click Setup for Claude Desktop:
|
|
116
|
+
Add to your `claude_desktop_config.json`:
|
|
117
|
+
```json
|
|
118
|
+
{{
|
|
119
|
+
"mcpServers": {{
|
|
120
|
+
"tzero": {{
|
|
121
|
+
"command": "python",
|
|
122
|
+
"args": ["-m", "tzero.tzero_mcp"]
|
|
123
|
+
}}
|
|
124
|
+
}}
|
|
125
|
+
}}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- **Cost:** $0.00 (Zero paid APIs, runs 100% offline)
|
|
129
|
+
- **Security:** In-memory Shannon entropy scanner redacts API keys
|
|
130
|
+
- **License:** MIT Open Source
|
|
131
|
+
|
|
132
|
+
Check it out and drop a star if you find it useful! ā
|
|
133
|
+
š **GitHub:** {REPO_URL}
|
|
134
|
+
š **Web Playground:** {WEB_URL}
|
|
135
|
+
"""
|
|
136
|
+
},
|
|
137
|
+
"r/LocalLLaMA": {
|
|
138
|
+
"title": "T-Zero: 100% offline, zero-cloud AST codebase context pruner for local models (Ollama, LM Studio, Qwen 2.5 Coder, DeepSeek)",
|
|
139
|
+
"body": f"""When running local coding models (Qwen 2.5 Coder 7B/14B/32B, DeepSeek-Coder, Llama 3.1) on consumer GPUs, VRAM context window limits (8Kā32K) make it impossible to feed full multi-file codebases into prompts.
|
|
140
|
+
|
|
141
|
+
**T-Zero** ({VERSION}) is a zero-cloud AST token reducer that fits whole multi-tier codebases into compact local context windows:
|
|
142
|
+
1. **Deterministic AST pruning:** Collapses function bodies to `...` while retaining full signatures and type annotations.
|
|
143
|
+
2. **PageRank Module Centrality:** Graph-theory ranking automatically prioritizes architectural backbone files when strict token caps are enforced.
|
|
144
|
+
3. **Shannon Entropy Zero-Leak:** Ensures no private keys or tokens leak into model prompts.
|
|
145
|
+
4. **Local BM25 Hybrid Search:** Instant semantic symbol lookup with 0 cloud embeddings.
|
|
146
|
+
|
|
147
|
+
- **Zero Cloud Calls:** 100% air-gapped stdio server.
|
|
148
|
+
- **Install:** `pip install {PYPI_PKG}`
|
|
149
|
+
- **GitHub:** {REPO_URL} (Stars welcome! ā)
|
|
150
|
+
"""
|
|
151
|
+
},
|
|
152
|
+
"r/Turkey": {
|
|
153
|
+
"title": f"15 yaÅındayım, Cursor ve Claude iƧin geliÅtirdiÄim aƧık kaynaklı context motoru {VERSION} ile yayında! š¹š·",
|
|
154
|
+
"body": f"""Merhaba Türk yazılımcı topluluÄu!
|
|
155
|
+
|
|
156
|
+
Ben Toprak Ahmet AydoÄmuÅ, 15 yaÅındayım ve {ORGANIZATION} bünyesinde baÄımsız aƧık kaynaklı yazılımlar geliÅtiriyorum.
|
|
157
|
+
|
|
158
|
+
Yapay zeka kodlama araƧlarıyla (Cursor, Claude Desktop, Antigravity, Windsurf) büyük projelerde ƧalıÅırken en büyük darboÄaz **token sınırları ve yüksek context maliyetleri**. Tüm dosyaları yapay zekaya yüklediÄinizde binlerce satır gereksiz gƶvde kodu yapay zekanın dikkatini daÄıtıyor ve pencereyi tüketiyor.
|
|
159
|
+
|
|
160
|
+
Bu problemi Ƨƶzmek iƧin geliÅtirdiÄim **T-Zero (Token Zero)** projesini {VERSION} sürümüyle tamamen ücretsiz ve aƧık kaynak olarak yayınladım!
|
|
161
|
+
|
|
162
|
+
### š Temel Yetenekleri:
|
|
163
|
+
- Python, TypeScript, Go, Rust, Java vb. dillerde kodları AST (Abstract Syntax Tree) ile inceleyip fonksiyon gövdelerini buduyor ve token tüketimini **%85-%95 oranında azaltıyor**.
|
|
164
|
+
- Model Context Protocol (MCP) standardında ƧalıÅtıÄı iƧin Cursor ve Claude Desktop'a tek tıkla ekleniyor.
|
|
165
|
+
- %100 yerel ve ƧevrimdıÅı ƧalıÅıyor; hiƧbir harici ücretli API veya sunucuya baÄlanmıyor ($0 maliyet).
|
|
166
|
+
- Yeni {VERSION} sürümünde eklenen **AI Godfather Süpervizƶrü** sayesinde yapay zekanın uydurduÄu (hallucinated) sahte fonksiyon ƧaÄrılarını ve eksik importları otomatik düzeltiyor.
|
|
167
|
+
- 537 otomatik testten %100 baÅarıyla geƧmektedir.
|
|
168
|
+
|
|
169
|
+
Projeyi GitHub'da yıldızlayarak (Star ā) ilk 100 yıldız hedefimize ulaÅmamıza destek olursanız Ƨok sevinirim!
|
|
170
|
+
|
|
171
|
+
š **GitHub:** {REPO_URL}
|
|
172
|
+
š **Web Benchmark:** {WEB_URL}
|
|
173
|
+
š **PyPI:** https://pypi.org/project/{PYPI_PKG}/
|
|
174
|
+
"""
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def generate_show_hn() -> Dict[str, str]:
|
|
180
|
+
"""Generates Hacker News Show HN submission."""
|
|
181
|
+
return {
|
|
182
|
+
"title": f"Show HN: T-Zero ā Local AST context pruning for LLMs with 88-95% token reduction",
|
|
183
|
+
"url": REPO_URL,
|
|
184
|
+
"first_comment": f"""Hi HN! I'm Toprak ({AUTHOR}), a 15-year-old software engineer from Turkey. I built T-Zero to solve a fundamental efficiency problem in AI-assisted software engineering: prompt context bloat.
|
|
185
|
+
|
|
186
|
+
### The Problem:
|
|
187
|
+
When developers feed large repositories into Cursor, Claude Desktop, or Claude Code, they either:
|
|
188
|
+
1. Rely on vector embeddings (RAG), which frequently misses cross-file caller/callee contracts and exact type signatures, or
|
|
189
|
+
2. Dump entire source files into the context window, burning hundreds of thousands of tokens, triggering rate limits, and degrading model attention ("lost in the middle").
|
|
190
|
+
|
|
191
|
+
### The AST Pruning Approach:
|
|
192
|
+
T-Zero parses multi-language source trees into Abstract Syntax Trees (AST) and deterministically extracts interface contracts (class hierarchies, method signatures, argument types, return types, docstrings, imports) while pruning execution bodies.
|
|
193
|
+
|
|
194
|
+
On our benchmark repository of 481 files (~86,000 lines of code):
|
|
195
|
+
- Raw Codebase: 10,998,573 tokens ($32.99 per single Claude 3.5 Sonnet context fill)
|
|
196
|
+
- T-Zero 4-Tier AST Tree: 1,319,828 tokens (-88.0% reduction)
|
|
197
|
+
- Focus Skeleton (T-3): -94.6% reduction
|
|
198
|
+
- Processing Latency: <400ms locally
|
|
199
|
+
|
|
200
|
+
### Security & Privacy:
|
|
201
|
+
- **100% Zero-Leak:** Calculates in-memory Shannon entropy (H >= 4.75) alongside regex patterns to detect and redact API keys, JWTs, and private keys locally before any context is emitted.
|
|
202
|
+
- **Zero Cloud Telemetry:** Operates 100% offline via local stdio MCP protocol.
|
|
203
|
+
|
|
204
|
+
The codebase is open source under MIT: {REPO_URL}
|
|
205
|
+
Web Playground: {WEB_URL}
|
|
206
|
+
|
|
207
|
+
I would love to hear thoughts, critique, and feedback on our AST pruning heuristics and MCP server architecture!
|
|
208
|
+
"""
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def generate_twitter_thread() -> List[str]:
|
|
213
|
+
"""Generates 7-tweet viral X/Twitter thread."""
|
|
214
|
+
return [
|
|
215
|
+
f"""1/7 šØ We ran a 481-file codebase through Claude 3.5 Sonnet:
|
|
216
|
+
|
|
217
|
+
š“ Raw codebase: 10.9M tokens ($32.99 / prompt fill)
|
|
218
|
+
š¢ With T-Zero AST pruning: 1.3M tokens (-88% reduction)
|
|
219
|
+
|
|
220
|
+
Meet T-Zero {VERSION}: an open-source local MCP server that eliminates context window bloat for Cursor, Claude & local LLMs.
|
|
221
|
+
|
|
222
|
+
š§µ A thread on how it works: š""",
|
|
223
|
+
"""2/7 š” The Problem with Raw Code Context:
|
|
224
|
+
|
|
225
|
+
When your AI coding assistant writes an API endpoint or fixes a bug, it doesn't need the 150-line implementation body of your database connection pool.
|
|
226
|
+
|
|
227
|
+
It only needs the class structure, method signatures, parameter types, and docstrings.
|
|
228
|
+
|
|
229
|
+
T-Zero extracts that exact skeleton in <400ms.""",
|
|
230
|
+
"""3/7 š True Polyglot Support:
|
|
231
|
+
|
|
232
|
+
š Python (native ast parser)
|
|
233
|
+
šØ TypeScript & JavaScript
|
|
234
|
+
š¹ Go
|
|
235
|
+
š¦ Rust
|
|
236
|
+
ā Java & Kotlin
|
|
237
|
+
š· C# & C++
|
|
238
|
+
š Swift & Ruby
|
|
239
|
+
|
|
240
|
+
All parsed deterministically on your local CPU with 0 cloud dependencies.""",
|
|
241
|
+
"""4/7 š 100% Zero-Leak Security Guarantee:
|
|
242
|
+
|
|
243
|
+
Accidentally leaking API keys into LLM prompts is an enterprise nightmare.
|
|
244
|
+
|
|
245
|
+
T-Zero includes an in-memory Shannon Entropy scanner (H >= 4.75) that detects high-entropy secrets and redacts them *before* any text leaves your computer.
|
|
246
|
+
|
|
247
|
+
100% private, 100% offline.""",
|
|
248
|
+
f"""5/7 š¤ New in {VERSION}: AI Godfather Hallucination Healer:
|
|
249
|
+
|
|
250
|
+
T-Zero now statically inspects AI-generated code against your workspace AST.
|
|
251
|
+
|
|
252
|
+
If the AI invents a nonexistent method or misspells an import, T-Zero catches it and auto-rewrites it to the real local symbol with 0 human intervention.""",
|
|
253
|
+
f"""6/7 ā” 30-Second Setup:
|
|
254
|
+
|
|
255
|
+
Option A (pip):
|
|
256
|
+
$ pip install {PYPI_PKG}
|
|
257
|
+
|
|
258
|
+
Option B (npx zero-install):
|
|
259
|
+
$ npx {NPM_PKG}
|
|
260
|
+
|
|
261
|
+
Option C (Standalone .exe):
|
|
262
|
+
Download precompiled Windows 64-bit binaries from our GitHub Releases!""",
|
|
263
|
+
f"""7/7 š We are on a mission to reach our first 100 stars on GitHub!
|
|
264
|
+
|
|
265
|
+
Built by Toprak Ahmet AydoÄmuÅ (15-year-old solo engineer at Siber Akademi). 100% free under MIT.
|
|
266
|
+
|
|
267
|
+
If you care about AI efficiency and open source tooling, please drop a star ā:
|
|
268
|
+
|
|
269
|
+
š {REPO_URL}
|
|
270
|
+
š {WEB_URL}
|
|
271
|
+
|
|
272
|
+
RTs appreciated! š #CursorAI #ClaudeAI #Python #OpenSource"""
|
|
273
|
+
]
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def generate_product_hunt() -> Dict[str, str]:
|
|
277
|
+
"""Generates Product Hunt launch kit."""
|
|
278
|
+
return {
|
|
279
|
+
"name": "T-Zero Context Architect",
|
|
280
|
+
"tagline": "Cut AI coding context tokens by up to 95% using AST pruning",
|
|
281
|
+
"topics": "Developer Tools, Artificial Intelligence, Open Source, Productivity, Python",
|
|
282
|
+
"description": "T-Zero is a local Model Context Protocol (MCP) server for Cursor, Claude Desktop, Antigravity IDE, and Windsurf that deterministically prunes codebase bodies to typed AST skeletons, reducing LLM token consumption by 85ā95% with 100% Zero-Leak security.",
|
|
283
|
+
"maker_comment": f"""Hey Product Hunt community! š
|
|
284
|
+
|
|
285
|
+
I'm Toprak ({AUTHOR}), 15 years old, and I've spent the past few months building **T-Zero** at {ORGANIZATION}.
|
|
286
|
+
|
|
287
|
+
### The Problem We Solved:
|
|
288
|
+
AI coding assistants like Cursor and Claude are transformative, but as soon as you open a repository with 50+ files, you run into:
|
|
289
|
+
1. Massive context window consumption (millions of tokens)
|
|
290
|
+
2. Cost spikes ($20ā$50 per developer daily)
|
|
291
|
+
3. Model degradation ("lost in the middle" hallucinations)
|
|
292
|
+
|
|
293
|
+
### The Solution:
|
|
294
|
+
Instead of dumping raw source code, T-Zero parses your project using Abstract Syntax Trees (AST). It removes function implementation bodies while retaining 100% of the class hierarchies, signatures, types, and docstrings.
|
|
295
|
+
|
|
296
|
+
The result? **Up to 95% token savings** while providing the LLM with pristine architectural context.
|
|
297
|
+
|
|
298
|
+
### Highlights:
|
|
299
|
+
- ā” 1-Click setup for Cursor, Claude, Antigravity & Windsurf
|
|
300
|
+
- š 100% Zero-Leak: Local Shannon entropy scanner stops credential leaks
|
|
301
|
+
- š¤ AI Godfather Supervisor: Auto-corrects hallucinated method names
|
|
302
|
+
- šø 100% Free & Open Source under MIT
|
|
303
|
+
|
|
304
|
+
I'd love your feedback, reviews, and feature ideas! Check out the repo and give us a star if you find it valuable:
|
|
305
|
+
{REPO_URL}
|
|
306
|
+
"""
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def generate_awesome_lists_prs() -> Dict[str, str]:
|
|
311
|
+
"""Generates Markdown entries ready to submit as PRs to curated awesome lists."""
|
|
312
|
+
return {
|
|
313
|
+
"awesome-mcp-servers": f"""### Add T-Zero Context Architect
|
|
314
|
+
|
|
315
|
+
- **Name:** [T-Zero Context Architect]({REPO_URL})
|
|
316
|
+
- **Description:** Deterministic AST codebase context compressor & MCP server reducing prompt tokens by 80ā95% for Cursor, Claude, and local LLMs. Includes Zero-Leak credential protection and AI hallucination auto-corrector.
|
|
317
|
+
- **Category:** Code Intelligence / Developer Tools
|
|
318
|
+
- **License:** MIT
|
|
319
|
+
""",
|
|
320
|
+
"awesome-cursorrules": f"""### Add T-Zero Context Engine for Cursor
|
|
321
|
+
|
|
322
|
+
- **Name:** [T-Zero for Cursor]({REPO_URL})
|
|
323
|
+
- **Description:** Dynamic AST context optimizer and boundary enforcement MCP server for Cursor Composer. Cuts context token bloat by up to 94.6% on large codebases.
|
|
324
|
+
"""
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
def export_all_marketing_materials(output_dir: Path) -> None:
|
|
329
|
+
"""Exports all marketing copy to markdown files organized by platform."""
|
|
330
|
+
output_dir.mkdir(parents=True, exist_ok=True)
|
|
331
|
+
|
|
332
|
+
# 1. Reddit
|
|
333
|
+
reddit_path = output_dir / "REDDIT_POSTS.md"
|
|
334
|
+
reddit_content = ["# š¢ Ready-To-Post Reddit Launch Materials\n"]
|
|
335
|
+
for sub, post in generate_reddit_posts().items():
|
|
336
|
+
reddit_content.append(f"## Subreddit: `{sub}`\n")
|
|
337
|
+
reddit_content.append(f"**Title:**\n> {post['title']}\n")
|
|
338
|
+
reddit_content.append("**Body:**\n```markdown\n" + post["body"] + "\n```\n---\n")
|
|
339
|
+
reddit_path.write_text("\n".join(reddit_content), encoding="utf-8")
|
|
340
|
+
|
|
341
|
+
# 2. Hacker News
|
|
342
|
+
hn_path = output_dir / "HACKER_NEWS_SHOW_HN.md"
|
|
343
|
+
hn_data = generate_show_hn()
|
|
344
|
+
hn_content = f"""# š¢ Hacker News Show HN Launch
|
|
345
|
+
|
|
346
|
+
**Submission Title:**
|
|
347
|
+
> {hn_data['title']}
|
|
348
|
+
|
|
349
|
+
**Target URL:**
|
|
350
|
+
`{hn_data['url']}`
|
|
351
|
+
|
|
352
|
+
**First Comment (by Author):**
|
|
353
|
+
```markdown
|
|
354
|
+
{hn_data['first_comment']}
|
|
355
|
+
```
|
|
356
|
+
"""
|
|
357
|
+
hn_path.write_text(hn_content, encoding="utf-8")
|
|
358
|
+
|
|
359
|
+
# 3. Twitter / X Thread
|
|
360
|
+
x_path = output_dir / "TWITTER_THREAD.md"
|
|
361
|
+
x_tweets = generate_twitter_thread()
|
|
362
|
+
x_content = ["# š¢ Twitter / X 7-Tweet Viral Thread\n"]
|
|
363
|
+
for i, tweet in enumerate(x_tweets, 1):
|
|
364
|
+
x_content.append(f"### Tweet {i}:\n```text\n{tweet}\n```\n")
|
|
365
|
+
x_path.write_text("\n".join(x_content), encoding="utf-8")
|
|
366
|
+
|
|
367
|
+
# 4. Product Hunt
|
|
368
|
+
ph_path = output_dir / "PRODUCT_HUNT_LAUNCH.md"
|
|
369
|
+
ph_data = generate_product_hunt()
|
|
370
|
+
ph_content = f"""# š¢ Product Hunt Launch Kit
|
|
371
|
+
|
|
372
|
+
**Product Name:** {ph_data['name']}
|
|
373
|
+
**Tagline:** {ph_data['tagline']}
|
|
374
|
+
**Topics:** {ph_data['topics']}
|
|
375
|
+
|
|
376
|
+
**Description:**
|
|
377
|
+
{ph_data['description']}
|
|
378
|
+
|
|
379
|
+
**First Maker Comment:**
|
|
380
|
+
```markdown
|
|
381
|
+
{ph_data['maker_comment']}
|
|
382
|
+
```
|
|
383
|
+
"""
|
|
384
|
+
ph_path.write_text(ph_content, encoding="utf-8")
|
|
385
|
+
|
|
386
|
+
# 5. Awesome Lists PRs
|
|
387
|
+
awesome_path = output_dir / "AWESOME_LISTS_PRS.md"
|
|
388
|
+
awesome_data = generate_awesome_lists_prs()
|
|
389
|
+
awesome_content = ["# š¢ Curated Awesome-Lists PR Submissions\n"]
|
|
390
|
+
for list_name, snippet in awesome_data.items():
|
|
391
|
+
awesome_content.append(f"## Repository: `{list_name}`\n```markdown\n{snippet}\n```\n")
|
|
392
|
+
awesome_path.write_text("\n".join(awesome_content), encoding="utf-8")
|
|
393
|
+
|
|
394
|
+
print(f"ā Exported all marketing materials to: {output_dir}")
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
def main():
|
|
398
|
+
stars = get_live_github_stars()
|
|
399
|
+
print("=" * 70)
|
|
400
|
+
print("ā” T-ZERO $0.00 BUDGET VIRAL MARKETING & GROWTH AUTOMATION ENGINE")
|
|
401
|
+
print(f"šÆ Milestone Progress: {render_progress_bar(stars, 100)}")
|
|
402
|
+
print(f"š¦ Active Release : {VERSION} (PyPI: {PYPI_PKG} | npm: {NPM_PKG})")
|
|
403
|
+
print(f"š Web Benchmark : {WEB_URL}")
|
|
404
|
+
print(f"ā Repository : {REPO_URL}")
|
|
405
|
+
print("=" * 70)
|
|
406
|
+
|
|
407
|
+
export_dir = Path.cwd() / "docs" / "marketing_pack"
|
|
408
|
+
export_all_marketing_materials(export_dir)
|
|
409
|
+
|
|
410
|
+
print("\nš All campaign materials are 100% copy-paste ready in 'docs/marketing_pack/'!")
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
if __name__ == "__main__":
|
|
414
|
+
main()
|
|
415
|
+
|