tzero-mcp 11.0.0 → 11.12.1

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +56 -56
  2. package/CONTRIBUTING.md +71 -71
  3. package/LICENSE +21 -21
  4. package/README.md +64 -64
  5. package/bin/tzero-mcp.js +62 -62
  6. package/bin/tzero.js +61 -61
  7. package/index.d.ts +25 -25
  8. package/index.js +15 -15
  9. package/package.json +89 -88
  10. package/src/addmcp.py +1203 -1197
  11. package/src/app.py +1810 -1810
  12. package/src/main.py +60 -60
  13. package/src/pc_fixer_mcp.py +25 -25
  14. package/src/tzero/__init__.py +54 -54
  15. package/src/tzero/__main__.py +6 -6
  16. package/src/tzero/siber_akademi_icon.py +77 -77
  17. package/src/tzero/tzero_arch_test.py +463 -463
  18. package/src/tzero/tzero_benchmark.py +475 -475
  19. package/src/tzero/tzero_blackboard.py +257 -257
  20. package/src/tzero/tzero_bridge.py +546 -546
  21. package/src/tzero/tzero_budget.py +195 -195
  22. package/src/tzero/tzero_card.py +431 -0
  23. package/src/tzero/tzero_ci.py +153 -153
  24. package/src/tzero/tzero_commit.py +192 -192
  25. package/src/tzero/tzero_contracts.py +1093 -1093
  26. package/src/tzero/tzero_cost.py +166 -166
  27. package/src/tzero/tzero_dashboard.py +1960 -1960
  28. package/src/tzero/tzero_debt.py +461 -461
  29. package/src/tzero/tzero_deps.py +462 -462
  30. package/src/tzero/tzero_drift.py +208 -208
  31. package/src/tzero/tzero_explain.py +306 -306
  32. package/src/tzero/tzero_features.py +3024 -3024
  33. package/src/tzero/tzero_federation.py +299 -299
  34. package/src/tzero/tzero_fix.py +557 -228
  35. package/src/tzero/tzero_fixer/__init__.py +63 -63
  36. package/src/tzero/tzero_fixer/amalgamation.py +334 -334
  37. package/src/tzero/tzero_fixer/ast_syntax_healer.py +464 -464
  38. package/src/tzero/tzero_fixer/ast_type_modernizer.py +288 -288
  39. package/src/tzero/tzero_fixer/async_io_modernizer.py +127 -127
  40. package/src/tzero/tzero_fixer/automated_regression_suite.py +600 -600
  41. package/src/tzero/tzero_fixer/benchmarks_and_diagnostics.py +174 -174
  42. package/src/tzero/tzero_fixer/ci_cd_self_healing_gate.py +246 -246
  43. package/src/tzero/tzero_fixer/code_duplicity_and_refactorer.py +151 -151
  44. package/src/tzero/tzero_fixer/code_smells_healer.py +260 -260
  45. package/src/tzero/tzero_fixer/cwe_remediator.py +171 -171
  46. package/src/tzero/tzero_fixer/dead_code_eliminator.py +150 -150
  47. package/src/tzero/tzero_fixer/dependency_vulnerability_auditor.py +309 -309
  48. package/src/tzero/tzero_fixer/git_advanced_surgeon.py +280 -280
  49. package/src/tzero/tzero_fixer/hardware_and_disk_doctor.py +325 -325
  50. package/src/tzero/tzero_fixer/import_graph_healer.py +412 -412
  51. package/src/tzero/tzero_fixer/interactive_tui.py +91 -91
  52. package/src/tzero/tzero_fixer/knowledge_base.py +295 -295
  53. package/src/tzero/tzero_fixer/knowledge_base_extended.py +940 -940
  54. package/src/tzero/tzero_fixer/linters_and_static_analyzer.py +307 -307
  55. package/src/tzero/tzero_fixer/mcp_server.py +489 -489
  56. package/src/tzero/tzero_fixer/models.py +385 -385
  57. package/src/tzero/tzero_fixer/orchestrator.py +375 -375
  58. package/src/tzero/tzero_fixer/os_doctor.py +502 -502
  59. package/src/tzero/tzero_fixer/packaging_abi_surgeon.py +323 -323
  60. package/src/tzero/tzero_fixer/pc_fixer_doctor.py +600 -600
  61. package/src/tzero/tzero_fixer/performance_and_memory_profiler.py +274 -274
  62. package/src/tzero/tzero_fixer/polyglot_ast_parsers.py +313 -313
  63. package/src/tzero/tzero_fixer/polyglot_build_healer.py +364 -364
  64. package/src/tzero/tzero_fixer/polyglot_config_healer.py +318 -318
  65. package/src/tzero/tzero_fixer/polyglot_doctor.py +372 -372
  66. package/src/tzero/tzero_fixer/polyglot_linters.py +619 -619
  67. package/src/tzero/tzero_fixer/polyglot_schema_validator.py +305 -305
  68. package/src/tzero/tzero_fixer/security_cwe_database.py +444 -444
  69. package/src/tzero/tzero_fixer/security_deep_rules.py +114 -114
  70. package/src/tzero/tzero_fixer/security_rules_catalog.py +110 -110
  71. package/src/tzero/tzero_fixer/security_zero_leak.py +326 -326
  72. package/src/tzero/tzero_fixer/smart_patch_recommender.py +223 -223
  73. package/src/tzero/tzero_fixer/synthetic_workspace_generator.py +220 -220
  74. package/src/tzero/tzero_fixer/system_diagnostics_extended.py +493 -493
  75. package/src/tzero/tzero_fixer/system_repair_recipes.py +447 -447
  76. package/src/tzero/tzero_fixer/venv_doctor.py +309 -309
  77. package/src/tzero/tzero_golden.py +319 -319
  78. package/src/tzero/tzero_graph_hud.html +338 -338
  79. package/src/tzero/tzero_graph_rag.py +263 -263
  80. package/src/tzero/tzero_growth.py +415 -0
  81. package/src/tzero/tzero_guard.py +251 -243
  82. package/src/tzero/tzero_hooks.py +565 -565
  83. package/src/tzero/tzero_infra.py +274 -274
  84. package/src/tzero/tzero_jarvis/__init__.py +134 -124
  85. package/src/tzero/tzero_jarvis/causal_graph.py +310 -310
  86. package/src/tzero/tzero_jarvis/creative_director.py +333 -0
  87. package/src/tzero/tzero_jarvis/graph_visualizer.py +395 -395
  88. package/src/tzero/tzero_jarvis/hybrid_search.py +214 -214
  89. package/src/tzero/tzero_jarvis/latent_press.py +137 -137
  90. package/src/tzero/tzero_jarvis/memory_consolidation.py +212 -212
  91. package/src/tzero/tzero_jarvis/minhash_lsh.py +184 -184
  92. package/src/tzero/tzero_jarvis/orchestrator.py +335 -335
  93. package/src/tzero/tzero_jarvis/self_healing.py +308 -308
  94. package/src/tzero/tzero_jarvis/semantic_compressor.py +887 -887
  95. package/src/tzero/tzero_jarvis/swarm.py +261 -261
  96. package/src/tzero/tzero_jarvis/swarm_bft.py +144 -144
  97. package/src/tzero/tzero_jarvis/workspace_orchestrator.py +1167 -1167
  98. package/src/tzero/tzero_jarvis/zero_key_router.py +173 -173
  99. package/src/tzero/tzero_lsp.py +634 -634
  100. package/src/tzero/tzero_mcp.py +5314 -5237
  101. package/src/tzero/tzero_mutation.py +358 -358
  102. package/src/tzero/tzero_neural_cortex.py +1425 -1425
  103. package/src/tzero/tzero_packer.py +577 -577
  104. package/src/tzero/tzero_patch.py +624 -624
  105. package/src/tzero/tzero_pc_fixer.py +12699 -12699
  106. package/src/tzero/tzero_pipe.py +95 -95
  107. package/src/tzero/tzero_polyglot.py +799 -799
  108. package/src/tzero/tzero_proxy.py +127 -127
  109. package/src/tzero/tzero_reachability.py +272 -272
  110. package/src/tzero/tzero_replay.py +141 -141
  111. package/src/tzero/tzero_rust_bridge.py +198 -198
  112. package/src/tzero/tzero_scip.py +368 -368
  113. package/src/tzero/tzero_security.py +573 -573
  114. package/src/tzero/tzero_semantic_merge.py +189 -189
  115. package/src/tzero/tzero_snapshot.py +471 -471
  116. package/src/tzero/tzero_stubs.py +313 -313
  117. package/src/tzero/tzero_subagent_engine.py +459 -459
  118. package/src/tzero/tzero_superdesign.py +774 -774
  119. package/src/tzero/tzero_sync.py +241 -241
  120. package/src/tzero/tzero_task_benchmark.py +506 -458
  121. package/src/tzero/tzero_tui.py +313 -313
  122. package/src/tzero/tzero_turbo.py +264 -264
  123. package/src/tzero/tzero_v3.py +9997 -9900
  124. package/src/tzero.py +6 -6
  125. package/src/tzero_mcp.py +25 -0
  126. 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
+