codecontext-ai 1.25.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.
- codecontext_ai-1.25.0/MANIFEST.in +4 -0
- codecontext_ai-1.25.0/PKG-INFO +443 -0
- codecontext_ai-1.25.0/README.md +413 -0
- codecontext_ai-1.25.0/VERSION.txt +1 -0
- codecontext_ai-1.25.0/assets/images/logo.png +0 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/PKG-INFO +443 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/SOURCES.txt +101 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/dependency_links.txt +1 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/entry_points.txt +5 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/requires.txt +11 -0
- codecontext_ai-1.25.0/codecontext_ai.egg-info/top_level.txt +1 -0
- codecontext_ai-1.25.0/pyproject.toml +64 -0
- codecontext_ai-1.25.0/setup.cfg +4 -0
- codecontext_ai-1.25.0/src/__init__.py +1 -0
- codecontext_ai-1.25.0/src/actions/__init__.py +0 -0
- codecontext_ai-1.25.0/src/actions/action_types.py +58 -0
- codecontext_ai-1.25.0/src/actions/dispatcher.py +41 -0
- codecontext_ai-1.25.0/src/api/__init__.py +1 -0
- codecontext_ai-1.25.0/src/api/plugin_api.py +65 -0
- codecontext_ai-1.25.0/src/controllers/__init__.py +0 -0
- codecontext_ai-1.25.0/src/controllers/cli_controller.py +270 -0
- codecontext_ai-1.25.0/src/controllers/main_controller.py +366 -0
- codecontext_ai-1.25.0/src/data/__init__.py +0 -0
- codecontext_ai-1.25.0/src/data/file_system_repository.py +140 -0
- codecontext_ai-1.25.0/src/data/settings_repository.py +29 -0
- codecontext_ai-1.25.0/src/di_container.py +138 -0
- codecontext_ai-1.25.0/src/i18n/__init__.py +89 -0
- codecontext_ai-1.25.0/src/i18n/ar.json +460 -0
- codecontext_ai-1.25.0/src/i18n/de.json +460 -0
- codecontext_ai-1.25.0/src/i18n/en.json +460 -0
- codecontext_ai-1.25.0/src/i18n/es.json +460 -0
- codecontext_ai-1.25.0/src/i18n/fr.json +460 -0
- codecontext_ai-1.25.0/src/i18n/hi.json +460 -0
- codecontext_ai-1.25.0/src/i18n/it.json +460 -0
- codecontext_ai-1.25.0/src/i18n/ja.json +460 -0
- codecontext_ai-1.25.0/src/i18n/ko.json +460 -0
- codecontext_ai-1.25.0/src/i18n/nl.json +460 -0
- codecontext_ai-1.25.0/src/i18n/pl.json +460 -0
- codecontext_ai-1.25.0/src/i18n/pt.json +460 -0
- codecontext_ai-1.25.0/src/i18n/ru.json +460 -0
- codecontext_ai-1.25.0/src/i18n/tr.json +460 -0
- codecontext_ai-1.25.0/src/i18n/zh.json +460 -0
- codecontext_ai-1.25.0/src/services/__init__.py +0 -0
- codecontext_ai-1.25.0/src/services/cleaner_service.py +79 -0
- codecontext_ai-1.25.0/src/services/dependency_service.py +79 -0
- codecontext_ai-1.25.0/src/services/file_service.py +137 -0
- codecontext_ai-1.25.0/src/services/formatting_service.py +363 -0
- codecontext_ai-1.25.0/src/services/github_service.py +79 -0
- codecontext_ai-1.25.0/src/services/import_resolution_service.py +74 -0
- codecontext_ai-1.25.0/src/services/integration_service.py +52 -0
- codecontext_ai-1.25.0/src/services/llm_checker_service.py +98 -0
- codecontext_ai-1.25.0/src/services/output_service.py +70 -0
- codecontext_ai-1.25.0/src/services/patch_service.py +166 -0
- codecontext_ai-1.25.0/src/services/plugin_manager.py +100 -0
- codecontext_ai-1.25.0/src/services/processing_service.py +45 -0
- codecontext_ai-1.25.0/src/services/skeleton_service.py +105 -0
- codecontext_ai-1.25.0/src/services/strategies/dependency_strategies.py +63 -0
- codecontext_ai-1.25.0/src/services/strategies/import_strategies.py +57 -0
- codecontext_ai-1.25.0/src/services/strategies/integration_strategies.py +373 -0
- codecontext_ai-1.25.0/src/services/token_service.py +30 -0
- codecontext_ai-1.25.0/src/services/tour_service.py +57 -0
- codecontext_ai-1.25.0/src/services/updater_service.py +243 -0
- codecontext_ai-1.25.0/src/store/__init__.py +0 -0
- codecontext_ai-1.25.0/src/store/state.py +103 -0
- codecontext_ai-1.25.0/src/store/store.py +263 -0
- codecontext_ai-1.25.0/src/ui/__init__.py +0 -0
- codecontext_ai-1.25.0/src/ui/components/__init__.py +0 -0
- codecontext_ai-1.25.0/src/ui/components/action_panel.py +201 -0
- codecontext_ai-1.25.0/src/ui/components/analytics_panel.py +199 -0
- codecontext_ai-1.25.0/src/ui/components/empty_state.py +142 -0
- codecontext_ai-1.25.0/src/ui/components/file_tree.py +311 -0
- codecontext_ai-1.25.0/src/ui/components/folder_list.py +69 -0
- codecontext_ai-1.25.0/src/ui/components/log_panel.py +13 -0
- codecontext_ai-1.25.0/src/ui/components/sidebar.py +932 -0
- codecontext_ai-1.25.0/src/ui/components/status_bar.py +41 -0
- codecontext_ai-1.25.0/src/ui/dialogs.py +1040 -0
- codecontext_ai-1.25.0/src/ui/main_window.py +342 -0
- codecontext_ai-1.25.0/src/ui/theme_manager.py +531 -0
- codecontext_ai-1.25.0/src/use_cases/__init__.py +0 -0
- codecontext_ai-1.25.0/src/use_cases/github_use_case.py +78 -0
- codecontext_ai-1.25.0/src/use_cases/patch_use_case.py +73 -0
- codecontext_ai-1.25.0/src/use_cases/process_use_case.py +255 -0
- codecontext_ai-1.25.0/src/use_cases/scan_use_case.py +128 -0
- codecontext_ai-1.25.0/src/use_cases/settings_use_case.py +162 -0
- codecontext_ai-1.25.0/src/use_cases/updater_use_case.py +79 -0
- codecontext_ai-1.25.0/src/utils/__init__.py +0 -0
- codecontext_ai-1.25.0/src/utils/async_runtime.py +46 -0
- codecontext_ai-1.25.0/src/utils/config.py +171 -0
- codecontext_ai-1.25.0/src/utils/logger.py +56 -0
- codecontext_ai-1.25.0/src/utils/pipeline_utils.py +156 -0
- codecontext_ai-1.25.0/templates/chatgpt_prompt_wrapper.jinja2 +13 -0
- codecontext_ai-1.25.0/templates/claude_xml_optimized.jinja2 +18 -0
- codecontext_ai-1.25.0/templates/code_review_diff.jinja2 +18 -0
- codecontext_ai-1.25.0/templates/csv_export.jinja2 +4 -0
- codecontext_ai-1.25.0/templates/documentation_writer.jinja2 +17 -0
- codecontext_ai-1.25.0/templates/html_report.jinja2 +28 -0
- codecontext_ai-1.25.0/templates/json_structured.jinja2 +16 -0
- codecontext_ai-1.25.0/templates/minimal_token_saver.jinja2 +6 -0
- codecontext_ai-1.25.0/templates/report.jinja2 +24 -0
- codecontext_ai-1.25.0/templates/security_audit.jinja2 +13 -0
- codecontext_ai-1.25.0/templates/summary_only.jinja2 +17 -0
- codecontext_ai-1.25.0/themes/apple.json +83 -0
- codecontext_ai-1.25.0/themes/modern.json +83 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codecontext-ai
|
|
3
|
+
Version: 1.25.0
|
|
4
|
+
Summary: AI-powered codebase analyzer — scans project structure, builds dependency graphs, generates LLM-optimized prompts with minification, skeleton mode, and JSON patching
|
|
5
|
+
Author-email: mcniki <sawwa.cwer13@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/NIKIRIKI7/CodeContext
|
|
8
|
+
Project-URL: AUR, https://aur.archlinux.org/packages/codecontext-ai
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
Requires-Dist: PySide6>=6.6.0
|
|
21
|
+
Requires-Dist: tiktoken>=0.5.1
|
|
22
|
+
Requires-Dist: fpdf>=1.7.2
|
|
23
|
+
Requires-Dist: pyperclip>=1.8.2
|
|
24
|
+
Requires-Dist: pathspec>=0.11.2
|
|
25
|
+
Requires-Dist: jinja2>=3.1.2
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=9.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
|
|
33
|
+
[🇷🇺 Русский](l10n/README.ru.md) · [🇫🇷 Français](l10n/README.fr.md) · [🇩🇪 Deutsch](l10n/README.de.md) · [🇨🇳 中文](l10n/README.zh.md) · [🇪🇸 Español](l10n/README.es.md) · [🇮🇹 Italiano](l10n/README.it.md) · [🇸🇦 العربية](l10n/README.ar.md) · [🇧🇷 Português](l10n/README.pt.md) · [🇯🇵 日本語](l10n/README.ja.md) · [🇰🇷 한국어](l10n/README.ko.md) · [🇮🇳 हिन्दी](l10n/README.hi.md) · [🇹🇷 Türkçe](l10n/README.tr.md) · [🇳🇱 Nederlands](l10n/README.nl.md) · [🇵🇱 Polski](l10n/README.pl.md)
|
|
34
|
+
|
|
35
|
+
<br>
|
|
36
|
+
|
|
37
|
+
# CodeContext AI
|
|
38
|
+
|
|
39
|
+
<img src="assets/images/logo.png" alt="CodeContext AI Logo" width="120"/>
|
|
40
|
+
|
|
41
|
+
**AI-powered codebase analysis & prompt preparation tool**
|
|
42
|
+
|
|
43
|
+
[](https://aur.archlinux.org/packages/codecontext-ai)
|
|
44
|
+
[](VERSION.txt)
|
|
45
|
+
[](LICENSE)
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
[]()
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<h2>🌟 About</h2>
|
|
52
|
+
|
|
53
|
+
<p><b>CodeContext AI</b> is a powerful desktop tool for preparing your codebase to work with Large Language Models (LLMs). It scans project folders, analyzes structure, builds dependency graphs, and generates a single, perfectly structured prompt — optimized for token consumption and architectural clarity.</p>
|
|
54
|
+
|
|
55
|
+
<h3>❓ Why?</h3>
|
|
56
|
+
<p>When working with AI, developers face context window token limits — LLMs "lose" architectural coherence when code is copied in parts. <b>CodeContext AI solves this</b>: collect your entire project into one structured prompt in a few clicks, saving up to 80% on tokens.</p>
|
|
57
|
+
|
|
58
|
+
<hr>
|
|
59
|
+
|
|
60
|
+
<h2>🚀 Features</h2>
|
|
61
|
+
|
|
62
|
+
<table>
|
|
63
|
+
<thead><tr><th>Feature</th><th>CodeContext AI</th><th>Manual</th></tr></thead>
|
|
64
|
+
<tbody>
|
|
65
|
+
<tr><td>🗜️ Minify</td><td><b>Up to 80%</b> token reduction — strips whitespace & blank lines</td><td>Manual copy-paste</td></tr>
|
|
66
|
+
<tr><td>🧩 LLM Patcher</td><td>Preview & apply JSON patches</td><td>Not available</td></tr>
|
|
67
|
+
<tr><td>✅ LLM Checker</td><td>Auto-verify code before saving</td><td>Not available</td></tr>
|
|
68
|
+
<tr><td>🔗 AST dependency graph</td><td>Python, JS/TS, Vue</td><td>File listing only</td></tr>
|
|
69
|
+
<tr><td>🖱️ Context menu</td><td>Windows / Linux</td><td>None</td></tr>
|
|
70
|
+
<tr><td>🎨 Themes</td><td>Apple, Modern, custom JSON</td><td>Fixed UI</td></tr>
|
|
71
|
+
<tr><td>⚙️ UI customization (v1.14+)</td><td>Premiere Pro-style</td><td>Fixed UI</td></tr>
|
|
72
|
+
<tr><td>🌐 i18n (v1.17+)</td><td>15 languages, system auto-detect</td><td>Single language</td></tr>
|
|
73
|
+
<tr><td>♻️ Dedup (v1.23+)</td><td>Detects & skips files with identical content</td><td>Manual check</td></tr>
|
|
74
|
+
<tr><td>⚡ Aggressive minify (v1.23+)</td><td>Extra compression — eliminates trailing whitespace on every line</td><td>Manual delete</td></tr>
|
|
75
|
+
<tr><td>📌 Checkpoints (v1.23+)</td><td>Save before/after snapshots for debugging</td><td>Not available</td></tr>
|
|
76
|
+
<tr><td>👁️ Auto-Watch (v1.23+)</td><td>Watches files & re-processes on change</td><td>Not available</td></tr>
|
|
77
|
+
<tr><td>🔌 Plugin System (v1.25+)</td><td>Extend with Python plugins — custom tabs, actions, and i18n</td><td>Not available</td></tr>
|
|
78
|
+
</tbody>
|
|
79
|
+
</table>
|
|
80
|
+
|
|
81
|
+
<hr>
|
|
82
|
+
|
|
83
|
+
<h2>📥 Installation</h2>
|
|
84
|
+
|
|
85
|
+
<p><b>Prerequisites:</b> Python 3.10+, Git</p>
|
|
86
|
+
|
|
87
|
+
<pre>git clone https://github.com/NIKIRIKI7/CodeContext.git
|
|
88
|
+
cd CodeContext
|
|
89
|
+
python -m venv venv
|
|
90
|
+
# Windows:
|
|
91
|
+
venv\Scripts\activate
|
|
92
|
+
# Linux/macOS:
|
|
93
|
+
source venv/bin/activate
|
|
94
|
+
pip install -r requirements.txt</pre>
|
|
95
|
+
|
|
96
|
+
<h3>Windows .exe</h3>
|
|
97
|
+
<pre>pip install pyinstaller
|
|
98
|
+
pyinstaller --windowed --onefile --icon=assets/images/logo.ico --name "CodeContext AI" main.py</pre>
|
|
99
|
+
|
|
100
|
+
<h3>Arch Linux (AUR)</h3>
|
|
101
|
+
<table>
|
|
102
|
+
<thead><tr><th>Action</th><th>Command</th></tr></thead>
|
|
103
|
+
<tbody>
|
|
104
|
+
<tr><td>Install</td><td><code>yay -S codecontext-ai</code></td></tr>
|
|
105
|
+
<tr><td>Search</td><td><code>yay -Ss codecontext</code></td></tr>
|
|
106
|
+
<tr><td>Update</td><td><code>yay -Syu</code></td></tr>
|
|
107
|
+
<tr><td>Remove</td><td><code>sudo pacman -Rns codecontext-ai</code></td></tr>
|
|
108
|
+
</tbody>
|
|
109
|
+
</table>
|
|
110
|
+
<p>If <b>yay</b> is not installed:</p>
|
|
111
|
+
<pre>sudo pacman -S --needed git base-devel
|
|
112
|
+
git clone https://aur.archlinux.org/yay.git
|
|
113
|
+
cd yay && makepkg -si</pre>
|
|
114
|
+
<p>Alternative: <code>paru -S codecontext-ai</code></p>
|
|
115
|
+
|
|
116
|
+
<hr>
|
|
117
|
+
|
|
118
|
+
<h2>💻 GUI Mode</h2>
|
|
119
|
+
<pre>python main.py</pre>
|
|
120
|
+
|
|
121
|
+
<h3>1. Interface Overview</h3>
|
|
122
|
+
<p>The window is split into three zones:</p>
|
|
123
|
+
<ul>
|
|
124
|
+
<li><b>Left sidebar (tabs)</b> — scan settings, filters, prompts, LLM config, themes</li>
|
|
125
|
+
<li><b>Center area</b> — folder list, file tree, token analytics</li>
|
|
126
|
+
<li><b>Top action bar</b> — Minify/No Comments/Skeleton toggles, output format, action buttons</li>
|
|
127
|
+
</ul>
|
|
128
|
+
|
|
129
|
+
<h3>2. Adding a Project</h3>
|
|
130
|
+
<table>
|
|
131
|
+
<thead><tr><th>Action</th><th>How</th></tr></thead>
|
|
132
|
+
<tbody>
|
|
133
|
+
<tr><td>Drag & drop</td><td>Just drag a project folder into the window</td></tr>
|
|
134
|
+
<tr><td>Browse dialog</td><td>Click "+ Папка ПК" on the <b>Sources</b> tab</td></tr>
|
|
135
|
+
<tr><td>GitHub repo</td><td>Click "+ GitHub / PR" — paste a repo or Pull Request URL</td></tr>
|
|
136
|
+
<tr><td>Save config</td><td>Click "💾 Save config" — creates <code>.codecontextrc</code></td></tr>
|
|
137
|
+
</tbody>
|
|
138
|
+
</table>
|
|
139
|
+
|
|
140
|
+
<p><b>GitHub loading modes:</b></p>
|
|
141
|
+
<ul>
|
|
142
|
+
<li><b>Save permanently</b> — clones to a folder on your disk</li>
|
|
143
|
+
<li><b>Temporary</b> — clones to a temp folder (deleted on app close)</li>
|
|
144
|
+
</ul>
|
|
145
|
+
|
|
146
|
+
<h3>3. Scan Configuration</h3>
|
|
147
|
+
|
|
148
|
+
<h4>Sources Tab</h4>
|
|
149
|
+
<table>
|
|
150
|
+
<thead><tr><th>Option</th><th>Description</th></tr></thead>
|
|
151
|
+
<tbody>
|
|
152
|
+
<tr><td>☑ Git Changes Only</td><td>Include only files changed in the last commit</td></tr>
|
|
153
|
+
<tr><td>☑ Respect .gitignore</td><td>Auto-exclude files from <code>.gitignore</code></td></tr>
|
|
154
|
+
<tr><td>🔍 Scan Files</td><td>Build the file tree with metadata</td></tr>
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
157
|
+
|
|
158
|
+
<h4>Filters Tab</h4>
|
|
159
|
+
<table>
|
|
160
|
+
<thead><tr><th>Option</th><th>Description</th></tr></thead>
|
|
161
|
+
<tbody>
|
|
162
|
+
<tr><td><b>Extension presets</b></td><td>Quick switch between language sets (Python, Web, Golang, Rust, C#, etc.)</td></tr>
|
|
163
|
+
<tr><td><b>Extensions</b></td><td>Custom file extension whitelist</td></tr>
|
|
164
|
+
<tr><td><b>Ignored paths</b></td><td>Skip folders/files (node_modules, .git, build, dist, etc.)</td></tr>
|
|
165
|
+
<tr><td>☑ Include file tree</td><td>Prepends folder structure to the prompt</td></tr>
|
|
166
|
+
<tr><td>☑ Include dependency map</td><td>AST-based import analysis for Python/JS/TS</td></tr>
|
|
167
|
+
<tr><td>☑ Include Mermaid graph</td><td>Architecture diagram in Mermaid format</td></tr>
|
|
168
|
+
</tbody>
|
|
169
|
+
</table>
|
|
170
|
+
|
|
171
|
+
<p>💡 <b>Saving custom presets:</b> configure filters, click 💾, enter a name.</p>
|
|
172
|
+
|
|
173
|
+
<h4>Prompts Tab</h4>
|
|
174
|
+
<table>
|
|
175
|
+
<thead><tr><th>Option</th><th>Description</th></tr></thead>
|
|
176
|
+
<tbody>
|
|
177
|
+
<tr><td><b>Prompt presets</b></td><td>Quick change of system prompt (Code Review, Bug Hunter, Refactoring, etc.)</td></tr>
|
|
178
|
+
<tr><td><b>System prompt</b></td><td>Custom prompt — sent to LLM as system context</td></tr>
|
|
179
|
+
<tr><td><b>🧩 Apply JSON patch</b></td><td>Paste LLM JSON response — preview diff and apply to disk</td></tr>
|
|
180
|
+
</tbody>
|
|
181
|
+
</table>
|
|
182
|
+
|
|
183
|
+
<p><b>Using JSON patches:</b></p>
|
|
184
|
+
<ol>
|
|
185
|
+
<li>Ask LLM for a JSON array: <code>[{"action": "replace", "file": "main.py", "search": "...", "content": "..."}]</code></li>
|
|
186
|
+
<li>Paste JSON, click <b>"Next"</b> → <b>Safety Diff Viewer</b> opens</li>
|
|
187
|
+
<li>Check/uncheck files, optionally click <b>"🤖 Check via LLM"</b></li>
|
|
188
|
+
<li>Click <b>"💾 Save selected to disk"</b></li>
|
|
189
|
+
</ol>
|
|
190
|
+
|
|
191
|
+
<h3>4. Output Format Settings</h3>
|
|
192
|
+
<table>
|
|
193
|
+
<thead><tr><th>Option</th><th>Description</th></tr></thead>
|
|
194
|
+
<tbody>
|
|
195
|
+
<tr><td>☑ Minify</td><td>Trims leading/trailing whitespace on every line, removes blank lines — safe baseline compression for everyday use</td></tr>
|
|
196
|
+
<tr><td>☑ Aggressive</td><td>Extra minification pass — strips trailing whitespace aggressively on every line. Combine with Minify for maximum token savings when context is tight</td></tr>
|
|
197
|
+
<tr><td>☑ No Comments</td><td>Removes all comments from code</td></tr>
|
|
198
|
+
<tr><td>☑ No Secrets</td><td>Masks API keys, passwords, tokens</td></tr>
|
|
199
|
+
<tr><td>☑ Skeleton ☠️</td><td><b>Strips function bodies</b> — maximum token savings</td></tr>
|
|
200
|
+
<tr><td>☑ Dedup</td><td>Scans all files and excludes duplicates with identical content — eliminates redundant context from repeated files</td></tr>
|
|
201
|
+
<tr><td>☑ Checkpoints</td><td>Saves intermediate processing snapshots (before/after) to disk — useful for debugging pipeline stages or comparing outputs</td></tr>
|
|
202
|
+
<tr><td>☑ Auto-Watch</td><td>Watches project files for changes and automatically reprocesses — keeps your prompt up-to-date during active development</td></tr>
|
|
203
|
+
<tr><td>Format</td><td>Markdown, XML, Plain, JSONL Chunks, Custom (Jinja2)</td></tr>
|
|
204
|
+
<tr><td>📁 template</td><td>Jinja2 template picker</td></tr>
|
|
205
|
+
</tbody>
|
|
206
|
+
</table>
|
|
207
|
+
|
|
208
|
+
<p><b>Skeleton Mode:</b> removes function implementations (<code>def func_name(...): # ... implementation ...</code>), preserving all classes — lets LLM understand massive projects with minimal tokens.</p>
|
|
209
|
+
|
|
210
|
+
<p><b>Minify vs Aggressive:</b> <b>Minify</b> strips leading/trailing whitespace and removes blank lines — safe for any codebase, reduces tokens without affecting readability. <b>Aggressive</b> adds an extra pass that eliminates trailing whitespace on every line for maximum compression. Combine both when you need to fit more code into a limited context window.</p>
|
|
211
|
+
|
|
212
|
+
<p><b>Dedup:</b> automatically detects files with identical content across your project and excludes duplicates from the output — prevents LLM from seeing the same code twice and wasting tokens.</p>
|
|
213
|
+
|
|
214
|
+
<p><b>Checkpoints:</b> saves intermediate results at each pipeline stage (before cleanup, after minification, etc.) to <code>checkpoints/</code> folder. Useful for debugging what each processing step does or comparing outputs side by side.</p>
|
|
215
|
+
|
|
216
|
+
<p><b>Auto-Watch:</b> monitors your project files for changes using the OS file watcher. When a file is saved, the pipeline automatically re-runs — ideal during active development when you need continuous prompt updates.</p>
|
|
217
|
+
|
|
218
|
+
<h3>5. Action Buttons</h3>
|
|
219
|
+
<table>
|
|
220
|
+
<thead><tr><th>Button</th><th>Action</th></tr></thead>
|
|
221
|
+
<tbody>
|
|
222
|
+
<tr><td>👀 Preview</td><td><b>Advanced Preview Dialog</b> — "Final Prompt" + "Before/After" tabs</td></tr>
|
|
223
|
+
<tr><td>📋 Copy to Clipboard</td><td>Copy result — paste into ChatGPT / Claude</td></tr>
|
|
224
|
+
<tr><td>🚀 Send to ChatGPT / Claude</td><td>Opens web chat and pastes context</td></tr>
|
|
225
|
+
<tr><td>💻 Open in Editor</td><td>Opens in VS Code / Cursor</td></tr>
|
|
226
|
+
<tr><td>💾 Save to File</td><td>Save result to disk</td></tr>
|
|
227
|
+
</tbody>
|
|
228
|
+
</table>
|
|
229
|
+
|
|
230
|
+
<h3>6. Advanced Preview Dialog</h3>
|
|
231
|
+
<p><b>"📝 Final Prompt" tab:</b> file list (left) + full text with highlighting (right). Copy All / Copy File.</p>
|
|
232
|
+
<p><b>"🔍 Before/After" tab:</b> colored diff between original and optimized. Counter: <code>Before: 1500 → After: 300 (80%)</code>.</p>
|
|
233
|
+
|
|
234
|
+
<h3>7. LLM & OS</h3>
|
|
235
|
+
<table>
|
|
236
|
+
<thead><tr><th colspan="2">LLM Checker</th></tr></thead>
|
|
237
|
+
<tbody>
|
|
238
|
+
<tr><td>☑ Enable verification</td><td>Auto LLM patch verification before applying</td></tr>
|
|
239
|
+
<tr><td>URL / Key / Model</td><td>API endpoint (default OpenAI), key, model</td></tr>
|
|
240
|
+
<tr><td>🦙 Ollama</td><td><code>http://localhost:11434/v1</code> / <code>llama3</code></td></tr>
|
|
241
|
+
<tr><td>🖥 LM Studio</td><td><code>http://localhost:1234/v1</code> / <code>local-model</code></td></tr>
|
|
242
|
+
</tbody>
|
|
243
|
+
</table>
|
|
244
|
+
|
|
245
|
+
<table>
|
|
246
|
+
<thead><tr><th colspan="2">OS Integration</th></tr></thead>
|
|
247
|
+
<tbody>
|
|
248
|
+
<tr><td>Install context menu</td><td>"Open with CodeContext AI" in right-click menu</td></tr>
|
|
249
|
+
<tr><td>Add to PATH</td><td>Global <code>codecontext</code> CLI command</td></tr>
|
|
250
|
+
<tr><td>Editor</td><td><code>code</code>, <code>cursor</code>, <code>idea</code>, <code>vim</code></td></tr>
|
|
251
|
+
</tbody>
|
|
252
|
+
</table>
|
|
253
|
+
|
|
254
|
+
<h3>8. Themes</h3>
|
|
255
|
+
<ul>
|
|
256
|
+
<li><b>Theme:</b> Apple, Modern — <b>Mode:</b> light / dark</li>
|
|
257
|
+
<li>📂 Open themes folder / ➕ Import theme (.json)</li>
|
|
258
|
+
</ul>
|
|
259
|
+
|
|
260
|
+
<h3>9. 📊 Token Analytics</h3>
|
|
261
|
+
<p>Table: file path, tokens (tiktoken), compression, savings %, cost for model.</p>
|
|
262
|
+
|
|
263
|
+
<h3>10. 🎛️ UI Customization (v1.14+)</h3>
|
|
264
|
+
<p>Click <b>⚙</b> next to version — "Interface Settings (Premiere Pro style)" dialog. Toggle tabs (Sources, Filters, Prompts, LLM & OS, Themes) and action buttons (Preview, Clipboard, ChatGPT, Editor, File).</p>
|
|
265
|
+
|
|
266
|
+
<h3>11. Command Palette</h3>
|
|
267
|
+
<p><code>Ctrl+Shift+P</code> — mouse-free access to all actions.</p>
|
|
268
|
+
|
|
269
|
+
<h3>12. 🔌 Plugin System (v1.25+)</h3>
|
|
270
|
+
<p><b>CodeContext AI</b> supports a <b>Python plugin system</b> that lets you extend the app with custom functionality.</p>
|
|
271
|
+
|
|
272
|
+
<h4>📁 Plugin Structure</h4>
|
|
273
|
+
<pre>my_plugin/
|
|
274
|
+
├── manifest.json # Plugin metadata
|
|
275
|
+
├── requirements.txt # (Optional) pip dependencies
|
|
276
|
+
├── locales/
|
|
277
|
+
│ ├── en.json # English translations
|
|
278
|
+
│ └── ru.json # Russian translations
|
|
279
|
+
└── plugin.py # Entry point</pre>
|
|
280
|
+
|
|
281
|
+
<h4>📄 manifest.json</h4>
|
|
282
|
+
<pre>{
|
|
283
|
+
"id": "my_plugin",
|
|
284
|
+
"name": "My Plugin",
|
|
285
|
+
"version": "1.0.0",
|
|
286
|
+
"description": "Does something useful",
|
|
287
|
+
"entry_point": "plugin"
|
|
288
|
+
}</pre>
|
|
289
|
+
|
|
290
|
+
<h4>🐍 plugin.py (Example)</h4>
|
|
291
|
+
<pre>from src.api.plugin_api import IPlugin, PluginAPI
|
|
292
|
+
|
|
293
|
+
class MyPlugin(IPlugin):
|
|
294
|
+
id = "my_plugin"
|
|
295
|
+
name = "My Plugin"
|
|
296
|
+
version = "1.0.0"
|
|
297
|
+
|
|
298
|
+
def on_init(self, api: PluginAPI) -> None:
|
|
299
|
+
# Add translations from locales/ folder (auto-loaded)
|
|
300
|
+
# Register a sidebar tab
|
|
301
|
+
api.ui.register_sidebar_tab(
|
|
302
|
+
"my_tab", "My Tab",
|
|
303
|
+
lambda: QLabel("Hello from plugin!")
|
|
304
|
+
)
|
|
305
|
+
# Register an action button
|
|
306
|
+
api.ui.register_action_button(
|
|
307
|
+
"my_action", "My Action",
|
|
308
|
+
lambda: api.add_log("Plugin action clicked")
|
|
309
|
+
)
|
|
310
|
+
api.add_log("My Plugin initialized")
|
|
311
|
+
|
|
312
|
+
def on_shutdown(self) -> None:
|
|
313
|
+
pass</pre>
|
|
314
|
+
|
|
315
|
+
<h4>🔐 Security</h4>
|
|
316
|
+
<ul>
|
|
317
|
+
<li>Plugins get <b>full Python access</b> — only install from trusted sources</li>
|
|
318
|
+
<li>On first load, a security dialog asks your approval before enabling a plugin</li>
|
|
319
|
+
<li>If <code>requirements.txt</code> exists, you'll see a live pip install log before loading</li>
|
|
320
|
+
<li>Approved plugins are remembered in settings (<code>approved_plugins</code>)</li>
|
|
321
|
+
</ul>
|
|
322
|
+
|
|
323
|
+
<h4>🛠 Plugin API</h4>
|
|
324
|
+
<table>
|
|
325
|
+
<thead><tr><th>Property / Method</th><th>Description</th></tr></thead>
|
|
326
|
+
<tbody>
|
|
327
|
+
<tr><td><code>api.store</code></td><td>Read-only Redux store (state access via <code>state.settings.xxx</code>)</td></tr>
|
|
328
|
+
<tr><td><code>api.dispatcher</code></td><td>Dispatch actions (e.g. <code>UI_ADD_LOG</code>)</td></tr>
|
|
329
|
+
<tr><td><code>api.ui.register_sidebar_tab(id, label, factory)</code></td><td>Add a tab to the left sidebar</td></tr>
|
|
330
|
+
<tr><td><code>api.ui.register_action_button(id, label, callback)</code></td><td>Add a button to the "Plugins 🔽" dropdown</td></tr>
|
|
331
|
+
<tr><td><code>api.add_translations(lang, data)</code></td><td>Add runtime translations (merged on top of built-in)</td></tr>
|
|
332
|
+
<tr><td><code>api.add_log(message)</code></td><td>Write to the app log panel</td></tr>
|
|
333
|
+
</tbody>
|
|
334
|
+
</table>
|
|
335
|
+
|
|
336
|
+
<h4>⚙️ Visibility</h4>
|
|
337
|
+
<p>Plugin tabs and action buttons can be toggled via <b>⚙ UI Customization</b> — they appear alongside built-in tabs/actions with their own checkboxes.</p>
|
|
338
|
+
|
|
339
|
+
<hr>
|
|
340
|
+
|
|
341
|
+
<h2>💻 CLI Mode</h2>
|
|
342
|
+
<pre>python main.py --cli --path /path/to/project [options]</pre>
|
|
343
|
+
<pre>python main.py --help</pre>
|
|
344
|
+
|
|
345
|
+
<table>
|
|
346
|
+
<thead><tr><th>Parameter</th><th>Type</th><th>Description</th><th>Example</th></tr></thead>
|
|
347
|
+
<tbody>
|
|
348
|
+
<tr><td><code>--cli</code></td><td>flag</td><td>CLI mode (no GUI)</td><td><code>--cli</code></td></tr>
|
|
349
|
+
<tr><td><code>--path</code></td><td>list</td><td>Project path</td><td><code>--path ./app</code></td></tr>
|
|
350
|
+
<tr><td><code>--ext</code></td><td>str</td><td>Extensions</td><td><code>--ext ".py .js"</code></td></tr>
|
|
351
|
+
<tr><td><code>--ignore</code></td><td>str</td><td>Ignored paths</td><td><code>--ignore "node_modules"</code></td></tr>
|
|
352
|
+
<tr><td><code>--mode</code></td><td>enum</td><td>none / default / shallow / deep</td><td><code>--mode deep</code></td></tr>
|
|
353
|
+
<tr><td><code>--format</code></td><td>enum</td><td>markdown / xml / plain / jsonl_chunk</td><td><code>--format xml</code></td></tr>
|
|
354
|
+
<tr><td><code>--minify</code></td><td>flag</td><td>Enable minification</td><td><code>--minify</code></td></tr>
|
|
355
|
+
<tr><td><code>--no-comments</code></td><td>flag</td><td>Strip comments</td><td><code>--no-comments</code></td></tr>
|
|
356
|
+
<tr><td><code>--no-secrets</code></td><td>flag</td><td>Mask secrets</td><td><code>--no-secrets</code></td></tr>
|
|
357
|
+
<tr><td><code>--skeleton</code></td><td>flag</td><td>Skeleton mode</td><td><code>--skeleton</code></td></tr>
|
|
358
|
+
<tr><td><code>--output</code></td><td>str</td><td>Output file</td><td><code>--output out.txt</code></td></tr>
|
|
359
|
+
<tr><td><code>--stdout</code></td><td>flag</td><td>Print to stdout</td><td><code>--stdout</code></td></tr>
|
|
360
|
+
<tr><td><code>--git</code></td><td>flag</td><td>Git changes only</td><td><code>--git</code></td></tr>
|
|
361
|
+
<tr><td><code>--gitignore</code></td><td>flag</td><td>Respect .gitignore</td><td><code>--gitignore</code></td></tr>
|
|
362
|
+
<tr><td><code>--tree</code></td><td>flag</td><td>File tree</td><td><code>--tree</code></td></tr>
|
|
363
|
+
<tr><td><code>--mermaid</code></td><td>flag</td><td>Mermaid graph</td><td><code>--mermaid</code></td></tr>
|
|
364
|
+
<tr><td><code>--dependencies</code></td><td>flag</td><td>Dependency map</td><td><code>--dependencies</code></td></tr>
|
|
365
|
+
<tr><td><code>--patch</code></td><td>str</td><td>LLM JSON patch</td><td><code>--patch patch.json</code></td></tr>
|
|
366
|
+
<tr><td><code>--template</code></td><td>str</td><td>Jinja2 template</td><td><code>--template my.j2</code></td></tr>
|
|
367
|
+
<tr><td><code>--system-prompt</code></td><td>str</td><td>Custom system prompt</td><td><code>--system-prompt "Review"</code></td></tr>
|
|
368
|
+
</tbody>
|
|
369
|
+
</table>
|
|
370
|
+
|
|
371
|
+
<h3>Examples</h3>
|
|
372
|
+
<pre># Minimal run
|
|
373
|
+
python main.py --cli --path ./myapp --stdout
|
|
374
|
+
|
|
375
|
+
# Full analysis with XML
|
|
376
|
+
python main.py --cli --path ./myapp --ext ".py .js .ts" --ignore "node_modules,.git,__pycache__" --mode deep --mermaid --tree --dependencies --minify --no-comments --skeleton --format xml --output analysis.xml
|
|
377
|
+
|
|
378
|
+
# Git diff
|
|
379
|
+
python main.py --cli --path ./myapp --git --gitignore --stdout
|
|
380
|
+
|
|
381
|
+
# LLM JSON patch
|
|
382
|
+
python main.py --cli --path ./myapp --patch llm_response.json
|
|
383
|
+
|
|
384
|
+
# Custom Jinja2 template
|
|
385
|
+
python main.py --cli --path ./myapp --template my.j2 --stdout
|
|
386
|
+
|
|
387
|
+
# Mermaid diagram
|
|
388
|
+
python main.py --cli --path ./myapp --mode deep --mermaid --output with_mermaid.md
|
|
389
|
+
|
|
390
|
+
# Multiple paths
|
|
391
|
+
python main.py --cli --path ./frontend ./backend --format xml --output combined.xml</pre>
|
|
392
|
+
|
|
393
|
+
<hr>
|
|
394
|
+
|
|
395
|
+
<h2>🏗️ Tech Stack</h2>
|
|
396
|
+
<table>
|
|
397
|
+
<thead><tr><th>Component</th><th>Technology</th></tr></thead>
|
|
398
|
+
<tbody>
|
|
399
|
+
<tr><td>Language</td><td>Python 3.10+</td></tr>
|
|
400
|
+
<tr><td>GUI Framework</td><td>PySide6 (Qt 6)</td></tr>
|
|
401
|
+
<tr><td>Architecture</td><td>Clean Architecture + Redux-like</td></tr>
|
|
402
|
+
<tr><td>Tokenization</td><td>tiktoken (OpenAI)</td></tr>
|
|
403
|
+
<tr><td>Templating</td><td>jinja2 (11 built-in)</td></tr>
|
|
404
|
+
<tr><td>AST parsers</td><td>ast (Python), tree-sitter (JS/TS/Go/Rust)</td></tr>
|
|
405
|
+
<tr><td>Distribution</td><td>PyInstaller, AUR</td></tr>
|
|
406
|
+
</tbody>
|
|
407
|
+
</table>
|
|
408
|
+
|
|
409
|
+
<hr>
|
|
410
|
+
|
|
411
|
+
<h2>🗺️ Roadmap</h2>
|
|
412
|
+
<ul>
|
|
413
|
+
<li>📚 <b>RAG (Retrieval-Augmented Generation)</b> mode — indexing massive codebases using local vector DB (Chroma/FAISS).</li>
|
|
414
|
+
<li>🚫 <b>Deep .gitignore parsing</b> — support for nested <code>.gitignore</code> files & global <code>~/.gitignore</code>.</li>
|
|
415
|
+
<li>☁️ <b>Cloud Sync</b> — sync presets & configurations via GitHub Gists.</li>
|
|
416
|
+
<li>🌳 <b>Multi-root Workspaces</b> — improved monorepo support (Lerna, NX, Turborepo).</li>
|
|
417
|
+
<li>🚀 <b>CI/CD Pipelines</b> — GitHub Actions & GitLab CI plugins for automated PR context generation.</li>
|
|
418
|
+
<li>🤖 <b>Direct OpenAI/Anthropic API integration</b> — complete the bridge from prompt generation to direct output.</li>
|
|
419
|
+
<li>🍎 macOS Finder context menu</li>
|
|
420
|
+
<li>🔌 Plugin system ✅</li>
|
|
421
|
+
</ul>
|
|
422
|
+
|
|
423
|
+
<hr>
|
|
424
|
+
|
|
425
|
+
<h2>👨💻 Team</h2>
|
|
426
|
+
<p><b>Developer:</b> mcniki · <a href="https://vk.com/gor_niki">VK: gor_niki</a> · Issues & PRs on GitHub</p>
|
|
427
|
+
|
|
428
|
+
<hr>
|
|
429
|
+
|
|
430
|
+
<h2>🤝 Contributing</h2>
|
|
431
|
+
<ol>
|
|
432
|
+
<li>Fork the repository</li>
|
|
433
|
+
<li>Branch: <code>git checkout -b feature/AmazingFeature</code></li>
|
|
434
|
+
<li>Commit: <code>git commit -m 'Add AmazingFeature'</code></li>
|
|
435
|
+
<li>Push: <code>git push origin feature/AmazingFeature</code></li>
|
|
436
|
+
<li>Pull Request</li>
|
|
437
|
+
</ol>
|
|
438
|
+
<p>Follow SOLID principles (see <code>docs/ARCHITECTURE.md</code>).</p>
|
|
439
|
+
|
|
440
|
+
<hr>
|
|
441
|
+
|
|
442
|
+
<h2>📄 License</h2>
|
|
443
|
+
<p>MIT. See <code>LICENSE</code> for details.</p>
|