codeui-python 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

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 (49) hide show
  1. codeui/__init__.py +1 -1
  2. codeui/agent/context.py +19 -3
  3. codeui/analysis/dead_code.py +13 -2
  4. codeui/analysis/undefined.py +70 -0
  5. codeui/analysis/unresolved_import.py +34 -4
  6. codeui/cli/main.py +101 -7
  7. codeui/core/cache.py +54 -0
  8. codeui/core/graph.py +233 -3
  9. codeui/core/override.py +1 -0
  10. codeui/core/resolver.py +51 -37
  11. codeui/errors.py +10 -0
  12. codeui/lang/base.py +5 -2
  13. codeui/lang/cpp.py +271 -0
  14. codeui/lang/csharp.py +262 -0
  15. codeui/lang/dart.py +278 -0
  16. codeui/lang/generic.py +6 -4
  17. codeui/lang/go.py +5 -2
  18. codeui/lang/java.py +320 -0
  19. codeui/lang/kotlin.py +303 -0
  20. codeui/lang/php.py +275 -0
  21. codeui/lang/python.py +49 -7
  22. codeui/lang/registry.py +22 -2
  23. codeui/lang/ruby.py +270 -0
  24. codeui/lang/rust.py +5 -2
  25. codeui/lang/scala.py +290 -0
  26. codeui/lang/swift.py +276 -0
  27. codeui/lang/ts.py +99 -8
  28. codeui/report/sarif_emitter.py +2 -1
  29. codeui/server/server.py +156 -85
  30. codeui/server/static/css/styles.css +1609 -0
  31. codeui/server/static/index.html +199 -0
  32. codeui/server/static/js/api.js +485 -0
  33. codeui/server/static/js/app.js +1044 -0
  34. codeui/server/static/js/graph_canvas.js +1485 -0
  35. codeui/server/static/js/minimap.js +383 -0
  36. codeui/server/static/js/sidebar.js +268 -0
  37. codeui/server/static/js/state.js +83 -0
  38. codeui/server/static/js/subgraph_window.js +1208 -0
  39. codeui/server/static/js/theme.js +332 -0
  40. codeui/tracer/__init__.py +4 -1
  41. codeui/tracer/tracer.py +109 -118
  42. codeui_python-0.1.1.dist-info/METADATA +171 -0
  43. codeui_python-0.1.1.dist-info/RECORD +71 -0
  44. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/licenses/LICENSE +1 -1
  45. codeui_python-0.1.0.dist-info/METADATA +0 -191
  46. codeui_python-0.1.0.dist-info/RECORD +0 -52
  47. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/WHEEL +0 -0
  48. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/entry_points.txt +0 -0
  49. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: codeui-python
3
+ Version: 0.1.1
4
+ Summary: Universal static analysis code intelligence library, defect detector, graph visualizer, and agent context builder
5
+ Author-email: Akram Alsubari <akram.alsubari87@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/AAlsubari/codeUI
8
+ Project-URL: Documentation, https://github.com/AAlsubari/codeUI#readme
9
+ Project-URL: Repository, https://github.com/AAlsubari/codeUI.git
10
+ Project-URL: Issues, https://github.com/AAlsubari/codeUI/issues
11
+ Keywords: code-analysis,static-analysis,code-graph,ast,ai-agents,code-intelligence,llm-context,defect-detection
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Topic :: Software Development :: Quality Assurance
21
+ Classifier: Topic :: Software Development :: Code Generators
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
27
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
28
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
29
+ Requires-Dist: build; extra == "dev"
30
+ Requires-Dist: twine; extra == "dev"
31
+ Dynamic: license-file
32
+
33
+ # codeui-python 🌐⚡
34
+
35
+ [![PyPI Version](https://img.shields.io/pypi/v/codeui-python.svg)](https://pypi.org/project/codeui-python/)
36
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
+ [![Code Style](https://img.shields.io/badge/code%20style-strict-green.svg)](https://github.com/AAlsubari/codeUI)
39
+
40
+ **`codeui-python`** (`codeui`) is an open-source static analysis engine that converts any Python or polyglot software repository into a rich, **interactive web graph visualizer**, call-hierarchy tracer, defect detector, live code editor, and AI agent context builder.
41
+
42
+ It safely parses codebases via AST (Abstract Syntax Tree) without ever executing or importing target code, producing a universal intermediate representation (IR) graph.
43
+
44
+ 📦 **PyPI Package**: [https://pypi.org/project/codeui-python/](https://pypi.org/project/codeui-python/)
45
+ 🐙 **GitHub Repository**: [https://github.com/AAlsubari/codeUI](https://github.com/AAlsubari/codeUI)
46
+
47
+ ---
48
+
49
+ ## 🌟 Main Features
50
+
51
+ ### 1. 🕸️ Convert Any Project into an Interactive Graph
52
+ Effortlessly explore your entire codebase as a force-directed, interactive visual dependency graph:
53
+ - **Universal AST Parsing**: Maps modules, classes, functions, variables, imports, and calls across Python, TypeScript, Go, Rust, Java, .etc.
54
+ - **Multi-Window Subgraph Workspaces**: Open symbols, modules, and call chains in floating, draggable windows.
55
+ - **Cross-Usage Navigation**: Trace incoming/outgoing references across files in real time.
56
+
57
+ ### 2. 📝 Interactive Code Editor & Live Edits
58
+ Edit and refactor code directly inside the graph UI (`http://127.0.0.1:3000`):
59
+ - **Direct Disk Writing**: Save edits directly to your local source files on disk with a single click.
60
+ - **In-Memory Shadow Overrides**: Test edits non-destructively in an in-memory shadow store with instant diff inspection before writing to disk.
61
+
62
+ ### 3. 🔍 Static Defect Detection Engine
63
+ Includes 8 built-in static defect analyzers that identify structural code bugs before runtime:
64
+ - `undefined`: Missing or undefined symbols and functions.
65
+ - `dead_code`: Unreferenced private functions and unused module exports.
66
+ - `unresolved_import`: Broken or unresolvable import statements.
67
+ - `circular`: Cyclic dependency chains via Tarjan's Strongly Connected Components algorithm.
68
+ - `duplicates`: Structural code clones and duplicate routines.
69
+ - `unreachable`: Code paths following terminal control statements (`return`, `raise`, `exit`).
70
+ - `shadowing`: Variable shadowing across nested lexical scopes.
71
+ - `api_drift`: Public API signature changes and breaking contract drift against baseline snapshots.
72
+
73
+ ### 4. 🤖 AI Agent Context Engine
74
+ - **Smart Subgraph Bundling**: Extracts minimal, context-complete subgraphs for LLMs (Claude, GPT-4, Gemini) without token bloat.
75
+
76
+
77
+ ---
78
+
79
+ ## ⚠️ Initial Release Notice & Call for Contributions
80
+
81
+ > **Note on Version 0.1.1**:
82
+ > `codeui-python` is currently in an **initial pre-release version**. Static analysis across complex, dynamic multi-language codebases is intricate, and you may encounter bugs, unparsed syntax edge cases, or unsupported language features.
83
+ >
84
+ > 🚀 **We Welcome All Contributions!**
85
+ > We actively invite developers, researchers, and open-source contributors to try `codeui-python`, report issues, submit feature requests, or open pull requests to help expand language support and parser capabilities.
86
+
87
+ ---
88
+
89
+ ## 📦 Installation
90
+
91
+ Install the library via PyPI:
92
+
93
+ ```bash
94
+ pip install codeui-python
95
+ ```
96
+
97
+ Or install the development version from source:
98
+
99
+ ```bash
100
+ git clone https://github.com/AAlsubari/codeUI.git
101
+ cd codeUI
102
+ pip install -e ".[dev]"
103
+ ```
104
+
105
+ ---
106
+
107
+ ## 🚀 Quickstart
108
+
109
+ ### 1. Launch Interactive Graph Visualizer
110
+
111
+ Run `codeui serve` in any repository directory to open the interactive browser graph:
112
+
113
+ ```bash
114
+ codeui serve . --port 3000
115
+ ```
116
+
117
+ Then open `http://127.0.0.1:3000` in your browser to interactively explore, search, trace, and edit your code.
118
+
119
+ ### 2. Command Line Interface (CLI)
120
+
121
+ ```bash
122
+ # Scan a codebase into a JSON graph representation
123
+ codeui scan .
124
+
125
+ # Trace forward execution dependencies for a symbol
126
+ codeui trace "src/main.py::run" . --direction forward --depth 3
127
+
128
+ # Generate minimal LLM Context Bundle for AI agents
129
+ codeui context . --symbol "src/main.py::run"
130
+
131
+ # Scan codebase for defects (SARIF format)
132
+ codeui defects . --format sarif
133
+ ```
134
+
135
+ ### 3. Python API Usage
136
+
137
+ ```python
138
+ from pathlib import Path
139
+ from codeui.cli.main import scan_project
140
+ from codeui.tracer.tracer import Tracer
141
+ from codeui.agent.context import ContextBuilder
142
+
143
+ # 1. Scan codebase into a Universal AST Graph (No code execution)
144
+ graph = scan_project(Path("."))
145
+
146
+ # 2. Perform Call Graph Tracing
147
+ tracer = Tracer(graph)
148
+ dependencies = list(tracer.forward("src/main.py::run"))
149
+
150
+ # 3. Extract LLM Context Bundle for AI Agents
151
+ builder = ContextBuilder(graph)
152
+ bundle = builder.for_symbol("src/main.py::run", depth=2)
153
+ print(bundle.to_json())
154
+ ```
155
+
156
+ ---
157
+
158
+ ## 📚 Documentation & Resources
159
+
160
+ - [Quickstart Guide](./docs/quickstart.md)
161
+ - [Python API Reference](./docs/api.md)
162
+ - [AI Agent Integration & Context Engine](./docs/agent_integration.md)
163
+ - [Architecture Overview](./docs/architecture.md)
164
+ - [Static Analyzer & Defect Reference](./docs/analyzer_reference.md)
165
+ - [Extending codeui](./docs/extending.md)
166
+
167
+ ---
168
+
169
+ ## 📄 License
170
+
171
+ `codeui-python` is distributed under the [MIT License](./LICENSE). Copyright (c) 2026 Akram Alsubari and contributors.
@@ -0,0 +1,71 @@
1
+ codeui/__init__.py,sha256=sXn1U0HaXdFBSIQt4SMy8UrHhLi_6lysKyU-42DVrhw,591
2
+ codeui/errors.py,sha256=MB9_3N8nz_lTxBCMaLn1Zg4shW3lOe2rwhIb3rS57gk,3501
3
+ codeui/agent/__init__.py,sha256=NKsihtOXuJb695kvKb_nl5ROTb79bCn1fvqkFsm7A9U,470
4
+ codeui/agent/context.py,sha256=1cby_XlGYIoy8XHvxuirsDF40j6a0zl5oww090MM1Bs,8672
5
+ codeui/agent/contribution.py,sha256=86aj76DOc5HS-LQYTv2BIgvA8SYVF2cf62FWKIVmy7Q,9197
6
+ codeui/agent/edit_tools.py,sha256=aI6Najno8K8kE0y-S7tLkUoszOqzLSYDIGnMw00j0aA,11712
7
+ codeui/agent/integrations.py,sha256=KU_Vw6h9hKBn1xU1fqfdaoxZdW2bd7fs4pECCs3RpHA,9425
8
+ codeui/agent/mcp_server.py,sha256=eRYhjqIWk16ONOTL_bszfdcsuNw4Ad-cakdpaG1bWJ0,4856
9
+ codeui/analysis/__init__.py,sha256=imkrR1KRFQYYgZIqAshQh8OrDoonUHQ1Pts_t5DQ9Gc,63
10
+ codeui/analysis/api_drift.py,sha256=GyNKNJ5PBhX7lW3P2RLx24T9MfEMKBQzPqMqWqI91yk,3425
11
+ codeui/analysis/base.py,sha256=cyokp43Dj48J9_pzCB2iPcN4wrrT3-NefvXbI36yk5c,1237
12
+ codeui/analysis/circular.py,sha256=KT7jMGzIXk7YbaxL3Tg5cnglbPSJP1VGemLowTkLXZI,5027
13
+ codeui/analysis/dead_code.py,sha256=czwqA4zuwlrEtkGJu4qCfo8iU_sqCw6Tf549zBBlkXI,3715
14
+ codeui/analysis/duplicates.py,sha256=od8_H8c-ToczoDNDJJFXgJrqN6cSAliAKv1nWvg7MP4,3378
15
+ codeui/analysis/runner.py,sha256=AaRBD96o3GQ6v5IJES1cY_eqoWyFiCpx2amBSPOEzEU,2296
16
+ codeui/analysis/shadowing.py,sha256=61n9j0NWbsEpP5nS8v4m9cjNFFHVH95C28eua1ge2w0,2282
17
+ codeui/analysis/undefined.py,sha256=AC0NRt5g8vbLXfZ0k15JtKoO98L7gvaHwvWRFGK-9Us,9645
18
+ codeui/analysis/unreachable.py,sha256=9UTEquXx88nphC_AARvyBDfN1_ywuyPcQM9CV9v9GF8,1016
19
+ codeui/analysis/unresolved_import.py,sha256=qCk15DPoJCCTpDpnrKOXwKSdhXKL2a1BkTVRRAc-6hM,8938
20
+ codeui/cli/__init__.py,sha256=tlowuhKkia3n0Sw6SYZVedruaGe2CeadIAJsVLlOxVY,40
21
+ codeui/cli/main.py,sha256=vHMazYIuE-VeQapybUR1JBUoQ5jevkBMzm2IJQBS8-Y,24966
22
+ codeui/core/__init__.py,sha256=DOCOJBKyDDlejtxYipqP3utHr6iBcMoCVdt0WUa2NJw,34
23
+ codeui/core/cache.py,sha256=bgrYfPFsmzm0HvqzXBdoNiqCfw1aHVpC6JjHVK7lThU,6753
24
+ codeui/core/graph.py,sha256=0ISUX3FwqWPKXy_eKTqyaLOAzBHheMy8ofVm8BqoOoE,33047
25
+ codeui/core/ir.py,sha256=GyAyovIAc-8eQioCv1iZne5HnIRh6uoiBrkVNu__F6w,5903
26
+ codeui/core/override.py,sha256=-SI9cOZYQ1kT_oeVnlGarGYQ4Ysl9ia89xC33pRQE6U,8695
27
+ codeui/core/repo.py,sha256=s6ibeq_NHYhs0MOZ3dt6yTj4KxhUXAUfvQJxd8IKSd8,3068
28
+ codeui/core/resolver.py,sha256=bWVuc7aucC70pSUUd1PGaaOTMBE1MMNJAe1hgT8Jrmk,14721
29
+ codeui/lang/__init__.py,sha256=aR8wCunv92M1PzMmPHaO7d2PdDlYftGbfAV1Ux-IM1o,44
30
+ codeui/lang/base.py,sha256=pFhIWDaXqtoOLRCTjaogcV9SoOnjrzvnnYiQtYCUtqw,4147
31
+ codeui/lang/cpp.py,sha256=3ItkawrdKpLhHvIbsyuhWK2y6NduN5d5xQsqcLLVWIQ,11829
32
+ codeui/lang/csharp.py,sha256=gmBdX7qqJlNMyW3t_nI0alEZ3_-uve7XRzUCJ9TSOIY,11937
33
+ codeui/lang/dart.py,sha256=rLM6yyii9DNfHZcExeAL3uqHzW1XB6tmnTkSn2ZyHjU,13407
34
+ codeui/lang/generic.py,sha256=H1VAc_phDzw0JKZw8XMy1AuyDVvSzmQywlC9al4YGVc,3433
35
+ codeui/lang/go.py,sha256=KPfNcdRl-7YyRMrlgUf10cCKVQGZQ_6ffNyxy6FUtTQ,7239
36
+ codeui/lang/java.py,sha256=0KP8qI4za_SmH4G_vt6VGQcNjGmmtkBa1BAShL3DT8U,14953
37
+ codeui/lang/kotlin.py,sha256=BgjpvqbdgZ8LIfC0RR91NZMHrQrkf-djNdHmF40hue4,14738
38
+ codeui/lang/php.py,sha256=YY8-VSnzYaE46sb2rlIRTKhxUOtBz0c8jwcChKnG1gs,12710
39
+ codeui/lang/python.py,sha256=z1fggoCIlvp5OUGn8fKEbjQgoNe1_oLp0YzRQy9ukfs,17062
40
+ codeui/lang/registry.py,sha256=zX1Yd5b5ywhiDaK9Cv5PFl1OPZ3Dqz4AJexUnWG5Vlw,4035
41
+ codeui/lang/ruby.py,sha256=D5lRs7AV1tvr0lMUyq2qEma7Hx5ut9WbdGHIPzva0MQ,11752
42
+ codeui/lang/rust.py,sha256=Vd22LOblRxR0KMsFSZyx6-wc8NQaFuzbeIOL09XZrU8,8246
43
+ codeui/lang/scala.py,sha256=fD1AiQ13K4drJgzNOch72VDLrw0YCgMY2dyHLalMRcs,14024
44
+ codeui/lang/swift.py,sha256=6NJXr1t33nTKm_AUaGKkgfuERtL9azrh4uGZ5uBZ-m4,13291
45
+ codeui/lang/ts.py,sha256=48S8UnL4lfB3c6OUme8xyhBsEcahSlMVDJ1g95tJBm4,25291
46
+ codeui/plugins/__init__.py,sha256=R7rl3eQcvZIhY2bOX_5nuz18HhlVLSvsQPG2-VFMqbk,42
47
+ codeui/plugins/registry.py,sha256=fH3HTp8h3csn1oYhptdZ6a0XZHyFuU_Ecc14DKRubkk,1061
48
+ codeui/report/__init__.py,sha256=RnVWBV3S6zb2-0GIhWt8SQUTWrTrZK9DZe9L1URSHC0,42
49
+ codeui/report/json_emitter.py,sha256=tO1XU4qtbU46cBgmMcwOP_wAQXk4lJq7MqlUrWABkto,727
50
+ codeui/report/markdown_emitter.py,sha256=_MbgZFOvJF0L1QUhlITRG_HiblgfFlr5a1XcatCK-_g,1199
51
+ codeui/report/sarif_emitter.py,sha256=XJ2paA6roGhDufUaNwCSE6WmsFysRZVZhcuhzHchMiY,2090
52
+ codeui/server/__init__.py,sha256=hTzKyzjkE5f1_7f7pFpawNMwfFDu6d5FWcpYy1m4Izo,67
53
+ codeui/server/server.py,sha256=uwL-4zT8gareFaTjWNFMMhhL_mvI2igtlh_aJsLtXkc,35836
54
+ codeui/server/static/index.html,sha256=8qEptM_REp93mzPzPmDrHCWnMeMrBRQvUBuilrku5PY,12489
55
+ codeui/server/static/css/styles.css,sha256=QbI7RX8j2Awtr7rjC1am8lCqg72gbbNaA_N9NOzCBAo,37653
56
+ codeui/server/static/js/api.js,sha256=D42nAsybu8mX4h_tYKoHsY6jGZBaN4eY0ZeW9aKHgvs,19047
57
+ codeui/server/static/js/app.js,sha256=uy08om9LerfMbS3iFOlHhdvcy32-2i4lrB5ZqL4v7uM,44308
58
+ codeui/server/static/js/graph_canvas.js,sha256=UYxD0L-9_CpEM39Qw8tmeDVzICNTLmoWNYmVViusofA,62636
59
+ codeui/server/static/js/minimap.js,sha256=KcSvymZ5BQxWWz5HCNG5SePs8YbANWa58omnVSrNykE,14763
60
+ codeui/server/static/js/sidebar.js,sha256=ikZDqzsSx3FPsqXs1tAUWheDtuQQlhjfhb8is8tJAl8,16356
61
+ codeui/server/static/js/state.js,sha256=AnkKiqgD3mdlHbhtOQuQdDipi9j0azwwq1gFGNsKBno,2859
62
+ codeui/server/static/js/subgraph_window.js,sha256=zePXH136x8UxPqQvHmuPzlA5uNkgzMRgyCXHezXLBaA,56296
63
+ codeui/server/static/js/theme.js,sha256=viAv_w1OPBIv88-lrT9gg450YyrYt-8a99uT4a7QL5Q,12037
64
+ codeui/tracer/__init__.py,sha256=yfhHA2rs7OnixPvBKHUdi0-Xud337EyqDYlC7A5BKiw,115
65
+ codeui/tracer/tracer.py,sha256=MQUdzbcMDRmUd6NQt4G6aN2TXkC49x3AwJc-TBRBUZw,5325
66
+ codeui_python-0.1.1.dist-info/licenses/LICENSE,sha256=_7keFFRsVROXHhb3HYx3EbhWAg7JfO6uXCKBQb_V2_A,1072
67
+ codeui_python-0.1.1.dist-info/METADATA,sha256=94E9ozd3V6gA2aj_EHXB0FZ-ITpcf9bLdrahyx6VrsM,7052
68
+ codeui_python-0.1.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
69
+ codeui_python-0.1.1.dist-info/entry_points.txt,sha256=Hbzhq_KxDKeDM4axxCo5_J3IjD916Dcv46O5OrAoXtk,48
70
+ codeui_python-0.1.1.dist-info/top_level.txt,sha256=fu8I8ZJUDYg0A7SXYdG4cNjxYXV19i9CjYntx1GEx7I,7
71
+ codeui_python-0.1.1.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 codeui maintainers
3
+ Copyright (c) 2026 Akram Alsubari
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,191 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: codeui-python
3
- Version: 0.1.0
4
- Summary: Universal static analysis code intelligence library, defect detector, graph visualizer, and agent context builder
5
- Home-page: https://github.com/AAlsubari/codeUI
6
- Author: Akram Alsubari
7
- Author-email: Akram Alsubari <akramsubari@gmail.com>
8
- License: MIT
9
- Project-URL: Homepage, https://github.com/AAlsubari/codeUI
10
- Project-URL: Documentation, https://github.com/AAlsubari/codeUI#readme
11
- Project-URL: Repository, https://github.com/AAlsubari/codeUI.git
12
- Project-URL: Issues, https://github.com/AAlsubari/codeUI/issues
13
- Keywords: code-analysis,static-analysis,code-graph,ast,ai-agents,code-intelligence,llm-context,defect-detection
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Classifier: Topic :: Software Development :: Quality Assurance
23
- Classifier: Topic :: Software Development :: Code Generators
24
- Requires-Python: >=3.10
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
- Provides-Extra: dev
28
- Requires-Dist: pytest>=7.0.0; extra == "dev"
29
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
30
- Requires-Dist: mypy>=1.0.0; extra == "dev"
31
- Requires-Dist: build; extra == "dev"
32
- Requires-Dist: twine; extra == "dev"
33
- Dynamic: author
34
- Dynamic: home-page
35
- Dynamic: license-file
36
- Dynamic: requires-python
37
-
38
- # codeui
39
-
40
- [![PyPI Version](https://img.shields.io/pypi/v/codeui.svg)](https://pypi.org/project/codeui/)
41
- [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
42
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
- [![Code Style](https://img.shields.io/badge/code%20style-strict-green.svg)](https://github.com/AAlsubari/codeUI)
44
-
45
- **`codeui`** is a universal, static-analysis-based code-intelligence library, defect detector, interactive graph visualizer, override store, and AI agent context builder.
46
-
47
- It parses code bases safely without ever executing or importing analyzed code, extracting frozen intermediate representation (IR) graphs, tracing call hierarchies, detecting subtle architectural defects, and serving an interactive web visualizer.
48
-
49
- Repository: [https://github.com/AAlsubari/codeUI](https://github.com/AAlsubari/codeUI)
50
-
51
- ---
52
-
53
- ## Key Features
54
-
55
- - **100% Static Analysis**: Safe AST extraction — **NEVER** executes, imports, or evaluates target project code.
56
- - **Multi-Language Adapters**: Native analyzers for Python, TypeScript, JavaScript, Go, Rust, Dockerfiles, Makefiles, and generic fallback parser.
57
- - **Defect Detection Engine**: 8 built-in static defect analyzers:
58
- - `undefined`: Missing symbols and functions
59
- - `dead_code`: Unreferenced private routines and unused exports
60
- - `unresolved_import`: Missing or invalid import paths
61
- - `circular`: Cyclic dependency detection via Tarjan's SCC algorithm
62
- - `duplicates`: Structural code clone identification via shingling
63
- - `unreachable`: Code following terminal control statements
64
- - `shadowing`: Variable shadowing across nested scopes
65
- - `api_drift`: Interface drift tracking against baseline snapshots
66
- - **Interactive Localhost Visualizer**: Force-directed multi-window canvas with live code editor, mini-map, symbol inspection, and direct disk edit toggle (`http://127.0.0.1:3000`).
67
- - **Direct Disk & Non-Destructive Override Store**: Save edits live to project disk files or non-destructively in an in-memory shadow store with unified diff generation (`EditTools`, `OverrideStore`).
68
- - **AI Agent Context Engine**: Graph-traversal based dynamic context bundling (`ContextBuilder`) optimized for LLM prompts without token counting overhead.
69
- - **Agent Self-Contribution Workflow**: Integrated `ContributionManager` allowing AI agents to dynamically fetch repository metadata, clone `https://github.com/AAlsubari/codeUI`, apply bug fixes or feature additions, and submit contributions.
70
-
71
- ---
72
-
73
- ## Installation
74
-
75
- Install via PyPI:
76
-
77
- ```bash
78
- pip install codeui
79
- ```
80
-
81
- Or install from source in editable mode:
82
-
83
- ```bash
84
- git clone https://github.com/AAlsubari/codeUI.git
85
- cd codeUI
86
- pip install -e ".[dev]"
87
- ```
88
-
89
- ---
90
-
91
- ## Quickstart
92
-
93
- ### 1. Command Line Interface (CLI)
94
-
95
- ```bash
96
- # Scan a project directory and print summary
97
- codeui scan .
98
-
99
- # Start the interactive visualizer server
100
- codeui serve . --port 3000
101
-
102
- # Perform forward symbol call trace
103
- codeui trace "src/app.py::main" . --direction forward --depth 3
104
-
105
- # Generate AI Agent Context Bundle for a symbol
106
- codeui context . --symbol "src/app.py::main"
107
-
108
- # List detected code defects in SARIF format
109
- codeui defects . --format sarif
110
-
111
- # Apply direct disk edit to a file
112
- codeui apply src/main.py --content "print('hello world')" --disk
113
-
114
- # Submit automated contribution to codeui repo
115
- codeui contribute --title "Fix import resolution bug" --file src/fix.py "content"
116
- ```
117
-
118
- ### 2. Python API Usage
119
-
120
- ```python
121
- from pathlib import Path
122
- from codeui.cli.main import scan_project
123
- from codeui.tracer.tracer import Tracer
124
- from codeui.agent.context import ContextBuilder
125
-
126
- # 1. Scan codebase into a Universal Graph
127
- graph = scan_project(Path("."))
128
-
129
- # 2. Perform Call Graph Tracing
130
- tracer = Tracer(graph)
131
- called_symbols = list(tracer.forward("src/main.py::run"))
132
-
133
- # 3. Build Minimal Context Bundle for LLM Prompts
134
- builder = ContextBuilder(graph)
135
- bundle = builder.for_symbol("src/main.py::run", depth=2)
136
- print(bundle.to_json())
137
- ```
138
-
139
- ---
140
-
141
- ## AI Agent Self-Improvement Workflow
142
-
143
- `codeui` provides first-class support for AI agents to automatically improve the library when encountering bugs, missing features, or optimization opportunities:
144
-
145
- ```python
146
- from codeui.agent.contribution import ContributionManager
147
- from codeui.core.repo import get_library_repo_url
148
-
149
- # Get official library repository URL (https://github.com/AAlsubari/codeUI)
150
- repo_url = get_library_repo_url()
151
-
152
- # Submit automated agent bug fix
153
- mgr = ContributionManager()
154
- result = mgr.submit_contribution(
155
- title="Agent: Add missing exception handling",
156
- description="Identified edge case in AST parser during project scan.",
157
- file_changes={"codeui/lang/python.py": "# fixed parser logic"},
158
- push=True,
159
- )
160
- ```
161
-
162
- ---
163
-
164
- ## Code Examples
165
-
166
- Check out the [`examples/`](./examples/) folder for complete, runnable scripts:
167
-
168
- - [`01_basic_project_scan.py`](./examples/01_basic_project_scan.py) — Project scanning & defect detection
169
- - [`02_symbol_tracing.py`](./examples/02_symbol_tracing.py) — Call graph forward/backward tracing
170
- - [`03_agent_context_bundle.py`](./examples/03_agent_context_bundle.py) — LLM context bundle construction
171
- - [`04_edits_and_overrides.py`](./examples/04_edits_and_overrides.py) — OverrideStore & direct disk edits
172
- - [`05_agent_contribution.py`](./examples/05_agent_contribution.py) — Agent automated contribution workflow
173
-
174
- ---
175
-
176
- ## Documentation
177
-
178
- Full documentation is available in the [`docs/`](./docs/) directory:
179
-
180
- - [Quickstart Guide](./docs/quickstart.md)
181
- - [Python API Reference](./docs/api.md)
182
- - [AI Agent Integration & MCP](./docs/agent_integration.md)
183
- - [Architecture Overview](./docs/architecture.md)
184
- - [Static Analyzer & Defect Reference](./docs/analyzer_reference.md)
185
- - [Extending codeui](./docs/extending.md)
186
-
187
- ---
188
-
189
- ## License
190
-
191
- `codeui` is released under the [MIT License](./LICENSE). Copyright (c) 2026 Akram Alsubari and codeui maintainers.
@@ -1,52 +0,0 @@
1
- codeui/__init__.py,sha256=Ssnr9tSfNJ4WoELTMsVUt6XJo1dI-HW2DwR8SGyS_ak,591
2
- codeui/errors.py,sha256=hk3V3M8QIRe_wzJS8qhhfkGhC-S0qJJ9KnHgR9KaUl4,3248
3
- codeui/agent/__init__.py,sha256=NKsihtOXuJb695kvKb_nl5ROTb79bCn1fvqkFsm7A9U,470
4
- codeui/agent/context.py,sha256=zYKYcfARJ7Fn0TlqmqRdLLBcsomE9H0LK0-B5f5updk,7979
5
- codeui/agent/contribution.py,sha256=86aj76DOc5HS-LQYTv2BIgvA8SYVF2cf62FWKIVmy7Q,9197
6
- codeui/agent/edit_tools.py,sha256=aI6Najno8K8kE0y-S7tLkUoszOqzLSYDIGnMw00j0aA,11712
7
- codeui/agent/integrations.py,sha256=KU_Vw6h9hKBn1xU1fqfdaoxZdW2bd7fs4pECCs3RpHA,9425
8
- codeui/agent/mcp_server.py,sha256=eRYhjqIWk16ONOTL_bszfdcsuNw4Ad-cakdpaG1bWJ0,4856
9
- codeui/analysis/__init__.py,sha256=imkrR1KRFQYYgZIqAshQh8OrDoonUHQ1Pts_t5DQ9Gc,63
10
- codeui/analysis/api_drift.py,sha256=GyNKNJ5PBhX7lW3P2RLx24T9MfEMKBQzPqMqWqI91yk,3425
11
- codeui/analysis/base.py,sha256=cyokp43Dj48J9_pzCB2iPcN4wrrT3-NefvXbI36yk5c,1237
12
- codeui/analysis/circular.py,sha256=KT7jMGzIXk7YbaxL3Tg5cnglbPSJP1VGemLowTkLXZI,5027
13
- codeui/analysis/dead_code.py,sha256=xwXOzd7Qds_NUF1E_78XPrEjuBYw69AHlwYpYlId0Cw,3022
14
- codeui/analysis/duplicates.py,sha256=od8_H8c-ToczoDNDJJFXgJrqN6cSAliAKv1nWvg7MP4,3378
15
- codeui/analysis/runner.py,sha256=AaRBD96o3GQ6v5IJES1cY_eqoWyFiCpx2amBSPOEzEU,2296
16
- codeui/analysis/shadowing.py,sha256=61n9j0NWbsEpP5nS8v4m9cjNFFHVH95C28eua1ge2w0,2282
17
- codeui/analysis/undefined.py,sha256=N5vdLPGM4yHmH_LQe_OPzWZFexASiwshPiG_dwHgByY,4338
18
- codeui/analysis/unreachable.py,sha256=9UTEquXx88nphC_AARvyBDfN1_ywuyPcQM9CV9v9GF8,1016
19
- codeui/analysis/unresolved_import.py,sha256=0YVDLOsZua4nBPWjJ17jIY-loXHcnnrJIiWw_HNsrRw,7547
20
- codeui/cli/__init__.py,sha256=tlowuhKkia3n0Sw6SYZVedruaGe2CeadIAJsVLlOxVY,40
21
- codeui/cli/main.py,sha256=O9ZwXqTO6Lh5_4_oSqR2yPoagT9LuV-Rja20SU4tXwE,20591
22
- codeui/core/__init__.py,sha256=DOCOJBKyDDlejtxYipqP3utHr6iBcMoCVdt0WUa2NJw,34
23
- codeui/core/cache.py,sha256=3jPnxxkGl1Y560jM5Fb8pIksNGPCTpJKMbvSQfVnm34,4984
24
- codeui/core/graph.py,sha256=HDyT89ofI_jkM3HnuQkFwaOBqPPs-txLThtK6MfE_G0,19642
25
- codeui/core/ir.py,sha256=GyAyovIAc-8eQioCv1iZne5HnIRh6uoiBrkVNu__F6w,5903
26
- codeui/core/override.py,sha256=KLzGn-0Y0sNF_3dhT_yaGAGsC7DuQxJGmrG_hadYN44,8650
27
- codeui/core/repo.py,sha256=s6ibeq_NHYhs0MOZ3dt6yTj4KxhUXAUfvQJxd8IKSd8,3068
28
- codeui/core/resolver.py,sha256=xHJoDdhnzUrmD4O82sAMOIkNUA__MhbxVDc0jASfNsQ,14194
29
- codeui/lang/__init__.py,sha256=aR8wCunv92M1PzMmPHaO7d2PdDlYftGbfAV1Ux-IM1o,44
30
- codeui/lang/base.py,sha256=Nhc8KeR3mV7zNmt71duS2cdNJgBSe59X75byXrkSlAo,4074
31
- codeui/lang/generic.py,sha256=XpBbVI4gqIug3oRHVA_q_-XDgmJOQE7hapn2rHlWLnk,3452
32
- codeui/lang/go.py,sha256=wTojhFthwUL22QqkDN_QMweQwmC3QyQAAOlXzax_j30,7166
33
- codeui/lang/python.py,sha256=_lXBHau0k5ZrRJIppMkmPpyQ-clzUYYzBTRipIGws6A,14810
34
- codeui/lang/registry.py,sha256=OmVM9csJJHSFfg7b9Aed1O8WA3wNx83QlaOZKdiw2ao,3098
35
- codeui/lang/rust.py,sha256=KKIC4xPQjkip6Or4F6lMx1rcc3utm2oiZhoVIhHmmI4,8173
36
- codeui/lang/ts.py,sha256=D0x-WlRUDU91HOH5_rvo4jmTDfNVatDuc1OyO5_YSdw,20431
37
- codeui/plugins/__init__.py,sha256=R7rl3eQcvZIhY2bOX_5nuz18HhlVLSvsQPG2-VFMqbk,42
38
- codeui/plugins/registry.py,sha256=fH3HTp8h3csn1oYhptdZ6a0XZHyFuU_Ecc14DKRubkk,1061
39
- codeui/report/__init__.py,sha256=RnVWBV3S6zb2-0GIhWt8SQUTWrTrZK9DZe9L1URSHC0,42
40
- codeui/report/json_emitter.py,sha256=tO1XU4qtbU46cBgmMcwOP_wAQXk4lJq7MqlUrWABkto,727
41
- codeui/report/markdown_emitter.py,sha256=_MbgZFOvJF0L1QUhlITRG_HiblgfFlr5a1XcatCK-_g,1199
42
- codeui/report/sarif_emitter.py,sha256=WOcIecwjw-e0b3Ptw_1yT0ekEZMMVfNxsqyywQsgPyo,2065
43
- codeui/server/__init__.py,sha256=hTzKyzjkE5f1_7f7pFpawNMwfFDu6d5FWcpYy1m4Izo,67
44
- codeui/server/server.py,sha256=gy45SsizqzLPqVUxLO76VIW6zRBOi2Pa0VVXT03nFwo,33653
45
- codeui/tracer/__init__.py,sha256=3adNXTX-dCUEA_0BPoF2dlwzhbzcHeIBHWhHR6EyQt0,55
46
- codeui/tracer/tracer.py,sha256=2sQEUyszMk1tKBBsMfqpL-k1EkmrN4P-9AbWVJjyQAY,6733
47
- codeui_python-0.1.0.dist-info/licenses/LICENSE,sha256=BGKtZolnVKzRs03b5DmUycVMnwmxB0DaTcQM4yxTSH0,1075
48
- codeui_python-0.1.0.dist-info/METADATA,sha256=TGD29dHpTECvSvYGfvZbR5xPcCZT9VIwf2S1DSyynK0,7567
49
- codeui_python-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
50
- codeui_python-0.1.0.dist-info/entry_points.txt,sha256=Hbzhq_KxDKeDM4axxCo5_J3IjD916Dcv46O5OrAoXtk,48
51
- codeui_python-0.1.0.dist-info/top_level.txt,sha256=fu8I8ZJUDYg0A7SXYdG4cNjxYXV19i9CjYntx1GEx7I,7
52
- codeui_python-0.1.0.dist-info/RECORD,,