tree-sitter-analyzer 0.9.3__py3-none-any.whl → 0.9.5__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.

Potentially problematic release.


This version of tree-sitter-analyzer might be problematic. Click here for more details.

Files changed (33) hide show
  1. tree_sitter_analyzer/cli/commands/default_command.py +18 -18
  2. tree_sitter_analyzer/cli/commands/partial_read_command.py +139 -141
  3. tree_sitter_analyzer/cli/commands/query_command.py +92 -88
  4. tree_sitter_analyzer/cli/commands/table_command.py +235 -235
  5. tree_sitter_analyzer/cli/info_commands.py +121 -121
  6. tree_sitter_analyzer/cli_main.py +307 -307
  7. tree_sitter_analyzer/core/analysis_engine.py +584 -584
  8. tree_sitter_analyzer/core/cache_service.py +5 -4
  9. tree_sitter_analyzer/core/query.py +502 -502
  10. tree_sitter_analyzer/encoding_utils.py +9 -2
  11. tree_sitter_analyzer/exceptions.py +400 -406
  12. tree_sitter_analyzer/formatters/java_formatter.py +291 -291
  13. tree_sitter_analyzer/formatters/python_formatter.py +259 -259
  14. tree_sitter_analyzer/interfaces/mcp_server.py +426 -425
  15. tree_sitter_analyzer/language_detector.py +398 -398
  16. tree_sitter_analyzer/language_loader.py +224 -224
  17. tree_sitter_analyzer/languages/java_plugin.py +1202 -1202
  18. tree_sitter_analyzer/mcp/resources/project_stats_resource.py +559 -555
  19. tree_sitter_analyzer/mcp/server.py +30 -9
  20. tree_sitter_analyzer/mcp/tools/read_partial_tool.py +21 -4
  21. tree_sitter_analyzer/mcp/tools/table_format_tool.py +22 -4
  22. tree_sitter_analyzer/mcp/utils/error_handler.py +569 -567
  23. tree_sitter_analyzer/models.py +470 -470
  24. tree_sitter_analyzer/security/__init__.py +22 -22
  25. tree_sitter_analyzer/security/boundary_manager.py +251 -243
  26. tree_sitter_analyzer/security/regex_checker.py +297 -292
  27. tree_sitter_analyzer/table_formatter.py +708 -652
  28. tree_sitter_analyzer/utils.py +61 -19
  29. tree_sitter_analyzer-0.9.5.dist-info/METADATA +567 -0
  30. {tree_sitter_analyzer-0.9.3.dist-info → tree_sitter_analyzer-0.9.5.dist-info}/RECORD +32 -32
  31. tree_sitter_analyzer-0.9.3.dist-info/METADATA +0 -409
  32. {tree_sitter_analyzer-0.9.3.dist-info → tree_sitter_analyzer-0.9.5.dist-info}/WHEEL +0 -0
  33. {tree_sitter_analyzer-0.9.3.dist-info → tree_sitter_analyzer-0.9.5.dist-info}/entry_points.txt +0 -0
@@ -1,64 +1,64 @@
1
1
  tree_sitter_analyzer/__init__.py,sha256=ElX-1qL0OI5EuUf2XVkdqvLuWwRgTVYDGDnyeuLUBww,3067
2
2
  tree_sitter_analyzer/__main__.py,sha256=Zl79tpe4UaMu-7yeztc06tgP0CVMRnvGgas4ZQP5SCs,228
3
3
  tree_sitter_analyzer/api.py,sha256=naRtGuZ27AIVfn6Rid0zQcHDI71UpO9Nh4NQM9JyD3c,16954
4
- tree_sitter_analyzer/cli_main.py,sha256=n491hpKudODmaRIYAMBg_hFmrXSbSFaee5rsPfcEifs,9951
5
- tree_sitter_analyzer/encoding_utils.py,sha256=ItN5dKfuGY9xqvUVQIRYjOrb3fZ_8_CEMQMQ31sScvc,14479
6
- tree_sitter_analyzer/exceptions.py,sha256=xO_U6JuJ4QPkmZoXL_3nmV9QUbTa7-hrI05VAuo5r-Y,12093
4
+ tree_sitter_analyzer/cli_main.py,sha256=R03sPnWD_39u1wxpr7nd97EHe8jlp2npViiPbfm_cHo,9644
5
+ tree_sitter_analyzer/encoding_utils.py,sha256=NHkqOt7GdrxgMsd3k0rVxSO0mWJZXODw3uwl2Qk9ufc,14803
6
+ tree_sitter_analyzer/exceptions.py,sha256=AZryCQyKXekAg8lQZd3zqULnjhCKovBNNpnUlNGDhcI,11615
7
7
  tree_sitter_analyzer/file_handler.py,sha256=nUD17QIdOJ2bnXekuo-QzGQFv0f2rxCSJi-zWeQFSAs,6636
8
- tree_sitter_analyzer/language_detector.py,sha256=_Hliij5sA2bp_Hp_pFDl-kcxZltyvkhFtLurwNzfxVI,12091
9
- tree_sitter_analyzer/language_loader.py,sha256=gdLxkSoajm-q7c1vcvFONtBf5XJRgasUVI4L0wMzra0,8124
10
- tree_sitter_analyzer/models.py,sha256=YXqlz0cGnDzkMhLYfepZJm-5mHpPO2pTNWgOhBqHUX0,16484
8
+ tree_sitter_analyzer/language_detector.py,sha256=pn3nQClo8b_Ar8dS5X3hq9_t5IIlIcizIC0twMaowU4,11693
9
+ tree_sitter_analyzer/language_loader.py,sha256=P1vOa9NR_iVCpawpjziP1uQTX1uL6bgzTb6F9tw4pAc,7900
10
+ tree_sitter_analyzer/models.py,sha256=SrPxiRvlcH0uyOao47tzK-rVqK82JkmmxdU6yJlucSc,16014
11
11
  tree_sitter_analyzer/output_manager.py,sha256=saZ8Ss6PhUJgjjwviLgrePFL7CCLMixxdKtdrpuFgHM,8146
12
12
  tree_sitter_analyzer/project_detector.py,sha256=VdZTnY25M2fJTA3MLUzPIjXJtOCPATKlkshEF3eUV7U,9444
13
13
  tree_sitter_analyzer/query_loader.py,sha256=jcJc6_kIMeZINfTVGuiEmDii9LViP_pbJfg4A9phJY4,9863
14
- tree_sitter_analyzer/table_formatter.py,sha256=BfrAouAr3r6MD9xY9yhHw_PwD0aJ4BQo5p1UFhorT5k,27284
15
- tree_sitter_analyzer/utils.py,sha256=4qKFu5O7VZIy9410FdJhLGvNdEVS3hdFDL80kIu01GA,8752
14
+ tree_sitter_analyzer/table_formatter.py,sha256=Pcow5vNQtX4lTgdQ-DaNd5Wc2xnWwv7KkjNxnfZPxAQ,27551
15
+ tree_sitter_analyzer/utils.py,sha256=3TvlQpzOiuesRI_HD0C-BON4NKvvC8yhutV2ssjWmwo,10753
16
16
  tree_sitter_analyzer/cli/__init__.py,sha256=O_3URpbdu5Ilb2-r48LjbZuWtOWQu_BhL3pa6C0G3Bk,871
17
17
  tree_sitter_analyzer/cli/__main__.py,sha256=Xq8o8-0dPnMDU9WZqmqhzr98rx8rvoffTUHAkAwl-L8,218
18
- tree_sitter_analyzer/cli/info_commands.py,sha256=0x_6mfMq7jpKBLT9jzhTikXcs0n4TzNEV2Te9dyKNd4,4405
18
+ tree_sitter_analyzer/cli/info_commands.py,sha256=Eev5iG9upn9id1nE2W7Z6-Q5s-o2pDDnMvoyZxh8nmg,4284
19
19
  tree_sitter_analyzer/cli/commands/__init__.py,sha256=jpcpM1ptLuxLMBDUv1y_a87k8RAw1otFzeYpWtXvz3Y,671
20
20
  tree_sitter_analyzer/cli/commands/advanced_command.py,sha256=xDZI4zKTMHNdf7fc_QN0eAQ8a5MnRb5DJ29ERLBDUQs,3424
21
21
  tree_sitter_analyzer/cli/commands/base_command.py,sha256=o_xjKhn2J5bbGeNC980tALozT1WlsttI0owhLbV2hDM,6597
22
- tree_sitter_analyzer/cli/commands/default_command.py,sha256=R9_GuI5KVYPK2DfXRuG8L89vwxv0QVW8sur_sigjZKo,542
23
- tree_sitter_analyzer/cli/commands/partial_read_command.py,sha256=kD3E2f1zCseSKpGQ3bgHnEuCq-DCPRQrT91JJJh8B4Q,4776
24
- tree_sitter_analyzer/cli/commands/query_command.py,sha256=TNkmuUKaTmTYD80jc8eesYLpw59YVk-6nw478SsYWH8,3640
22
+ tree_sitter_analyzer/cli/commands/default_command.py,sha256=RAR_eaOK3EndIqU7QL5UAn44mwyhItTN7aUaKL1WmSc,524
23
+ tree_sitter_analyzer/cli/commands/partial_read_command.py,sha256=RGZsEBybu6PhOQDHBXuhs6l4ZlDcFaxj2bNOvSqKY80,4605
24
+ tree_sitter_analyzer/cli/commands/query_command.py,sha256=vpvCKxKGOaOHiNV_7UjW7JV5tAGAAx7AB9sV2EbLEyc,3612
25
25
  tree_sitter_analyzer/cli/commands/structure_command.py,sha256=0iJwjOgtW838hXleXogWhbu6eQFfrLR1QgKe5PFBqvU,5220
26
26
  tree_sitter_analyzer/cli/commands/summary_command.py,sha256=02WA3sOzfT83FVT6sW7nK04zVcZ9Qj_1S0WloqlTnFk,3602
27
- tree_sitter_analyzer/cli/commands/table_command.py,sha256=BAIw26WRi_yXbKvkuV7tXFKzSiWvYKVzRUxAcgsJ7VQ,9676
27
+ tree_sitter_analyzer/cli/commands/table_command.py,sha256=GvGpLZ_YwE5syufNMfvjPrzwt-bXUtAF7EoOQ0Dr_O0,9441
28
28
  tree_sitter_analyzer/core/__init__.py,sha256=VlYOy1epW16vjaVd__knESewnU0sfXF9a4hjrFxiSEE,440
29
- tree_sitter_analyzer/core/analysis_engine.py,sha256=32XO5UXD7PeK86ZBTCi7eVcaNwU2HmkdZGZjc1XZlu0,19481
30
- tree_sitter_analyzer/core/cache_service.py,sha256=4Pe57kxoBaBD-KsKINJX9jP3IEPyBW3apm4hz1DYw0c,9625
29
+ tree_sitter_analyzer/core/analysis_engine.py,sha256=CyNMMC10YgdJWIY9tdjkaariIyO-UV_yFVPFsewGzaA,18897
30
+ tree_sitter_analyzer/core/cache_service.py,sha256=0oZGuTpeHBKYNdnqAOVi6VlQukYMIHncz2pbVfNpSqE,9762
31
31
  tree_sitter_analyzer/core/engine.py,sha256=VFXGowDj6EfjFSh2MQDkQIc-4ISXaOg38n4lUhVY5Os,18721
32
32
  tree_sitter_analyzer/core/parser.py,sha256=qT3yIlTRdod4tf_2o1hU_B-GYGukyM2BtaFxzSoxois,9293
33
- tree_sitter_analyzer/core/query.py,sha256=fmuPMLsU4XUnMViaQADPRPoiZ-MzeE2k_e9N35VBNSA,16899
33
+ tree_sitter_analyzer/core/query.py,sha256=UhQxUmQitFobe2YM7Ifhi3X2WdHVb02KzeBunueYJ4I,16397
34
34
  tree_sitter_analyzer/formatters/__init__.py,sha256=yVb4HF_4EEPRwTf3y3-vM2NllrhykG3zlvQhN-6dB4c,31
35
35
  tree_sitter_analyzer/formatters/base_formatter.py,sha256=Uv6uVgUKwbBn6of26bnvr4u6CmX2ka1a405VL17CGFU,5763
36
36
  tree_sitter_analyzer/formatters/formatter_factory.py,sha256=mCnAbEHycoSttSuF4dU78hzcxyg-h57bo0_bj00zw58,2069
37
- tree_sitter_analyzer/formatters/java_formatter.py,sha256=RXW-DkNoHwkze7E9UoywQOKTiA9lNbfJ9euLQjLflcQ,11454
38
- tree_sitter_analyzer/formatters/python_formatter.py,sha256=UziBqRB6yCsAY-TlLBcmuLlOLgwpGWbVU08mSsBtxTM,10099
37
+ tree_sitter_analyzer/formatters/java_formatter.py,sha256=0jxKfrWtsr_K2VG1zW0LH2E6w6nfpIhcXTfIyWw3Jmc,11163
38
+ tree_sitter_analyzer/formatters/python_formatter.py,sha256=gHP4OtEwvv2ASbmTbyZNvQSP5r4Et4-sAMWr36y0k1Y,9840
39
39
  tree_sitter_analyzer/interfaces/__init__.py,sha256=OcT7eNIU0ZXvAeAXbhDqRG3puxn93HeSLqplwj6npTM,271
40
40
  tree_sitter_analyzer/interfaces/cli.py,sha256=XYqkCbRyf_ygA1_dlCuvyFSZKWvEBjpu7C-9Ssc__Mw,16840
41
41
  tree_sitter_analyzer/interfaces/cli_adapter.py,sha256=LAR5GDwirJSnNB5rP5aVxqcra6diFUwzBzyLU7RUrrQ,10770
42
42
  tree_sitter_analyzer/interfaces/mcp_adapter.py,sha256=DJugCRVL-AR6gJRaRrBW5JVXRvfl_iiRjupcnsb0_sE,7111
43
- tree_sitter_analyzer/interfaces/mcp_server.py,sha256=-vOxiDEJqPaMbRiPr5n0fGtIXOkTM-GxkxKovE2tsB4,16934
43
+ tree_sitter_analyzer/interfaces/mcp_server.py,sha256=dUFn1CyO2jLa_y5gGOGE-f0sLGAbjgp738uy5-aAphI,16510
44
44
  tree_sitter_analyzer/languages/__init__.py,sha256=VTXxJgVjHJAciLhX0zzXOS4EygZMtebeYUbi_0z6fGw,340
45
- tree_sitter_analyzer/languages/java_plugin.py,sha256=JoMb1cSs3orQE5UnkP6cNHT0vM8_NcxSjWVL0yTiQt8,48435
45
+ tree_sitter_analyzer/languages/java_plugin.py,sha256=ZTtDgyUdv-b9fFvCMEL3xS-yr0rfMueKkVleDybisag,47233
46
46
  tree_sitter_analyzer/languages/javascript_plugin.py,sha256=k14kHfi5II9MRTsVuy0NQq5l2KZYncCnM1Q6T1c5q_U,15844
47
47
  tree_sitter_analyzer/languages/python_plugin.py,sha256=MJ03F_Nv-nmInIkEFmPyEXYhyGbLHyr5kCbj2taEDYk,29144
48
48
  tree_sitter_analyzer/mcp/__init__.py,sha256=Dj4aqt_6inDKQ1xmA6DNMNDQBHzToqBjSWazdAWZgCY,944
49
- tree_sitter_analyzer/mcp/server.py,sha256=mttFqq99pRfloMpa9oJDPiitFqRszdsKtNNnQ7vFtEk,24001
49
+ tree_sitter_analyzer/mcp/server.py,sha256=e_Enu0MoEuWISFW0XQxcU-_db5jwCQY5txfVkqTO-7U,24788
50
50
  tree_sitter_analyzer/mcp/resources/__init__.py,sha256=SWnK8liTQkuQXlVgyRP9mf5HzpqmqohShrC98xlNnDc,1389
51
51
  tree_sitter_analyzer/mcp/resources/code_file_resource.py,sha256=POhQ1xPMiGBVVm6AfOQNKM29svDLvlGLA97ZPQgVoHw,6253
52
- tree_sitter_analyzer/mcp/resources/project_stats_resource.py,sha256=lZF9TGxjKvTwPyuWE_o3I3V4LK0zEj3lab4L0Iq-hho,19758
52
+ tree_sitter_analyzer/mcp/resources/project_stats_resource.py,sha256=V5-daZ99SU4rOt7qLk9GmhkzdXJpEINBobNlT14ojYY,19441
53
53
  tree_sitter_analyzer/mcp/tools/__init__.py,sha256=u7JrSLwE95y50mfjSus6HRdtdhkNbVrW8jP4AooawEU,762
54
54
  tree_sitter_analyzer/mcp/tools/analyze_scale_tool.py,sha256=cVBhq4_KxwcqdmA5s9iZLH4YDy7T_TKLNNdqqaGKnFU,27369
55
55
  tree_sitter_analyzer/mcp/tools/analyze_scale_tool_cli_compatible.py,sha256=mssed7bEfGeGxW4mOf7dg8BDS1oqHLolIBNX9DaZ3DM,8997
56
56
  tree_sitter_analyzer/mcp/tools/base_tool.py,sha256=FVSMgKIliQ5EBVQEfjYwWeqzWt9OqOFDr3dyACIDxig,1210
57
- tree_sitter_analyzer/mcp/tools/read_partial_tool.py,sha256=VGULteDBByAbALNNyp6DfvpVN7u2ICrnCRKEs-oAhLg,11182
58
- tree_sitter_analyzer/mcp/tools/table_format_tool.py,sha256=1NbToJ8L_U3SRKuHbJ5fV6tGD9kovgKt0JtDODTuDKw,15291
57
+ tree_sitter_analyzer/mcp/tools/read_partial_tool.py,sha256=MkAeXc-n-8fxRGtE3RQ_yZOPQ1lzdUppVFKrRzBPogU,11790
58
+ tree_sitter_analyzer/mcp/tools/table_format_tool.py,sha256=flFEcDOozJSJOtsQVHsk5eTYsutBi_T_2ft9XUpceSM,15896
59
59
  tree_sitter_analyzer/mcp/tools/universal_analyze_tool.py,sha256=RSbztW_b07DL5e1an4BE--snX744v4KmlRGab5bGj6U,21677
60
60
  tree_sitter_analyzer/mcp/utils/__init__.py,sha256=hibcoJc9PEetXqPIpvwHw1cpr1rabAm0QQaDZpxvA_g,2956
61
- tree_sitter_analyzer/mcp/utils/error_handler.py,sha256=tygl1E9fcI-2i7F-b1m3FYzJV9WvecSuskq6fDhSbgQ,18924
61
+ tree_sitter_analyzer/mcp/utils/error_handler.py,sha256=msrQHX67K3vhJsEc3OPRz5mmWU_yoHz55Lnxy0IZuy4,18404
62
62
  tree_sitter_analyzer/plugins/__init__.py,sha256=ITE9bTz7NO4axnn8g5Z-1_ydhSLT0RnY6Y1J9OhUP3E,10326
63
63
  tree_sitter_analyzer/plugins/base.py,sha256=FMRAOtjtDutNV8RnB6cmFgdvcjxKRAbrrzqldBBT1yk,17167
64
64
  tree_sitter_analyzer/plugins/manager.py,sha256=PyEY3jeuCBpDVqguWhaAu7nzUZM17_pI6wml2e0Hamo,12535
@@ -67,11 +67,11 @@ tree_sitter_analyzer/queries/java.py,sha256=NZTSzFADlGrm3MD0oIkOdkN_6wP2pGZpNs0R
67
67
  tree_sitter_analyzer/queries/javascript.py,sha256=pnXrgISwDE5GhPHDbUKEGI3thyLmebTeQt-l_-x4qT8,3962
68
68
  tree_sitter_analyzer/queries/python.py,sha256=L33KRUyV3sAvA3_HFkPyGgtiq0ygSpNY_n2YojodPlc,7570
69
69
  tree_sitter_analyzer/queries/typescript.py,sha256=eersyAF7TladuCWa8WE_-cO9YTF1LUSjLIl-tk2fZDo,6708
70
- tree_sitter_analyzer/security/__init__.py,sha256=AlBGtSpDqVxlfM4K7JD-dJsDE8cPcuzJvN7OOsNOhm8,646
71
- tree_sitter_analyzer/security/boundary_manager.py,sha256=MiSdg8PliKHGLqJqlMhW6KxnXDSoAko_-YRbSp0tYBU,7994
72
- tree_sitter_analyzer/security/regex_checker.py,sha256=glKsja9zbrP_kOkaXxPkzkkUjLZpO1EBCi3LS3fobmQ,10317
70
+ tree_sitter_analyzer/security/__init__.py,sha256=ZTqTt24hsljCpTXAZpJC57L7MU5lJLTf_XnlvEzXwEE,623
71
+ tree_sitter_analyzer/security/boundary_manager.py,sha256=CUQWU5j1zdjEbN9UmArcYkq9HbemhttQzk0pVk-vxZs,8153
72
+ tree_sitter_analyzer/security/regex_checker.py,sha256=jWK6H8PTPgzbwRPfK_RZ8bBTS6rtEbgjY5vr3YWjQ_U,9616
73
73
  tree_sitter_analyzer/security/validator.py,sha256=UPAPcrnmI2mNzbYOm0MabnJMGllK6HlOQ9KX-2bRfgU,8986
74
- tree_sitter_analyzer-0.9.3.dist-info/METADATA,sha256=T-m2pGpKHwATsIj6RIPWLjdCBBysVTEK8kogkBoHTW8,15909
75
- tree_sitter_analyzer-0.9.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
76
- tree_sitter_analyzer-0.9.3.dist-info/entry_points.txt,sha256=U4tfLGXgCWubKm2PyEb3zxhQ2pm7zVotMyfyS0CodD8,486
77
- tree_sitter_analyzer-0.9.3.dist-info/RECORD,,
74
+ tree_sitter_analyzer-0.9.5.dist-info/METADATA,sha256=j7tFOFQLvwciwHpyidLtuy4t8oKp_rkhLuKWgBMzgg8,20191
75
+ tree_sitter_analyzer-0.9.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
76
+ tree_sitter_analyzer-0.9.5.dist-info/entry_points.txt,sha256=U4tfLGXgCWubKm2PyEb3zxhQ2pm7zVotMyfyS0CodD8,486
77
+ tree_sitter_analyzer-0.9.5.dist-info/RECORD,,
@@ -1,409 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: tree-sitter-analyzer
3
- Version: 0.9.3
4
- Summary: Extensible multi-language code analyzer framework using Tree-sitter with dynamic plugin architecture
5
- Project-URL: Homepage, https://github.com/aimasteracc/tree-sitter-analyzer
6
- Project-URL: Documentation, https://github.com/aimasteracc/tree-sitter-analyzer#readme
7
- Project-URL: Repository, https://github.com/aimasteracc/tree-sitter-analyzer.git
8
- Project-URL: Issues, https://github.com/aimasteracc/tree-sitter-analyzer/issues
9
- Project-URL: Changelog, https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/CHANGELOG.md
10
- Project-URL: Bug Reports, https://github.com/aimasteracc/tree-sitter-analyzer/issues
11
- Project-URL: Source Code, https://github.com/aimasteracc/tree-sitter-analyzer
12
- Author-email: "aisheng.yu" <aimasteracc@gmail.com>
13
- Maintainer-email: "aisheng.yu" <aimasteracc@gmail.com>
14
- License: MIT
15
- Keywords: ai-tools,ast,code-analysis,mcp,mcp-server,model-context-protocol,multi-language,parsing,static-analysis,tree-sitter
16
- Classifier: Development Status :: 4 - Beta
17
- Classifier: Framework :: AsyncIO
18
- Classifier: Intended Audience :: Developers
19
- Classifier: License :: OSI Approved :: MIT License
20
- Classifier: Operating System :: OS Independent
21
- Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.10
23
- Classifier: Programming Language :: Python :: 3.11
24
- Classifier: Programming Language :: Python :: 3.12
25
- Classifier: Programming Language :: Python :: 3.13
26
- Classifier: Topic :: Communications
27
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
- Classifier: Topic :: Software Development :: Code Generators
29
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
- Classifier: Topic :: Software Development :: Quality Assurance
31
- Classifier: Topic :: Text Processing :: Linguistic
32
- Classifier: Typing :: Typed
33
- Requires-Python: >=3.10
34
- Requires-Dist: cachetools>=5.0.0
35
- Requires-Dist: chardet>=5.0.0
36
- Requires-Dist: mcp>=1.12.3
37
- Requires-Dist: tree-sitter-cpp>=0.23.4
38
- Requires-Dist: tree-sitter-java>=0.23.5
39
- Requires-Dist: tree-sitter-javascript>=0.23.1
40
- Requires-Dist: tree-sitter-python>=0.23.6
41
- Requires-Dist: tree-sitter==0.24.0
42
- Provides-Extra: all-languages
43
- Requires-Dist: tree-sitter-c>=0.20.0; extra == 'all-languages'
44
- Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'all-languages'
45
- Requires-Dist: tree-sitter-go>=0.20.0; extra == 'all-languages'
46
- Requires-Dist: tree-sitter-java>=0.23.5; extra == 'all-languages'
47
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'all-languages'
48
- Requires-Dist: tree-sitter-python>=0.23.0; extra == 'all-languages'
49
- Requires-Dist: tree-sitter-rust>=0.20.0; extra == 'all-languages'
50
- Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'all-languages'
51
- Provides-Extra: c
52
- Requires-Dist: tree-sitter-c>=0.20.0; extra == 'c'
53
- Provides-Extra: cpp
54
- Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'cpp'
55
- Provides-Extra: dev
56
- Requires-Dist: black>=24.0.0; extra == 'dev'
57
- Requires-Dist: isort>=5.13.0; extra == 'dev'
58
- Requires-Dist: memory-profiler>=0.61.0; extra == 'dev'
59
- Requires-Dist: mypy>=1.17.0; extra == 'dev'
60
- Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
61
- Requires-Dist: psutil<6,>=5.9.6; extra == 'dev'
62
- Requires-Dist: pytest-asyncio>=1.1.0; extra == 'dev'
63
- Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
64
- Requires-Dist: pytest-mock>=3.14.1; extra == 'dev'
65
- Requires-Dist: pytest>=8.4.1; extra == 'dev'
66
- Requires-Dist: ruff>=0.5.0; extra == 'dev'
67
- Requires-Dist: types-psutil>=5.9.0; extra == 'dev'
68
- Provides-Extra: full
69
- Requires-Dist: anyio>=4.0.0; extra == 'full'
70
- Requires-Dist: black>=24.0.0; extra == 'full'
71
- Requires-Dist: httpx<1.0.0,>=0.27.0; extra == 'full'
72
- Requires-Dist: isort>=5.13.0; extra == 'full'
73
- Requires-Dist: mcp>=1.12.2; extra == 'full'
74
- Requires-Dist: memory-profiler>=0.61.0; extra == 'full'
75
- Requires-Dist: mypy>=1.17.0; extra == 'full'
76
- Requires-Dist: pre-commit>=3.0.0; extra == 'full'
77
- Requires-Dist: psutil<6,>=5.9.6; extra == 'full'
78
- Requires-Dist: pydantic-settings>=2.2.1; extra == 'full'
79
- Requires-Dist: pydantic>=2.5.0; extra == 'full'
80
- Requires-Dist: pytest-asyncio>=1.1.0; extra == 'full'
81
- Requires-Dist: pytest-cov>=4.0.0; extra == 'full'
82
- Requires-Dist: pytest-mock>=3.14.1; extra == 'full'
83
- Requires-Dist: pytest>=8.4.1; extra == 'full'
84
- Requires-Dist: ruff>=0.5.0; extra == 'full'
85
- Requires-Dist: tree-sitter-c>=0.20.0; extra == 'full'
86
- Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'full'
87
- Requires-Dist: tree-sitter-go>=0.20.0; extra == 'full'
88
- Requires-Dist: tree-sitter-java>=0.23.5; extra == 'full'
89
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'full'
90
- Requires-Dist: tree-sitter-python>=0.23.0; extra == 'full'
91
- Requires-Dist: tree-sitter-rust>=0.20.0; extra == 'full'
92
- Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'full'
93
- Requires-Dist: types-psutil>=5.9.0; extra == 'full'
94
- Provides-Extra: go
95
- Requires-Dist: tree-sitter-go>=0.20.0; extra == 'go'
96
- Provides-Extra: java
97
- Requires-Dist: tree-sitter-java>=0.23.5; extra == 'java'
98
- Provides-Extra: javascript
99
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'javascript'
100
- Provides-Extra: mcp
101
- Requires-Dist: anyio>=4.0.0; extra == 'mcp'
102
- Requires-Dist: httpx<1.0.0,>=0.27.0; extra == 'mcp'
103
- Requires-Dist: mcp>=1.12.2; extra == 'mcp'
104
- Requires-Dist: pydantic-settings>=2.2.1; extra == 'mcp'
105
- Requires-Dist: pydantic>=2.5.0; extra == 'mcp'
106
- Provides-Extra: popular
107
- Requires-Dist: tree-sitter-java>=0.23.5; extra == 'popular'
108
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'popular'
109
- Requires-Dist: tree-sitter-python>=0.23.0; extra == 'popular'
110
- Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'popular'
111
- Provides-Extra: python
112
- Requires-Dist: tree-sitter-python>=0.23.0; extra == 'python'
113
- Provides-Extra: rust
114
- Requires-Dist: tree-sitter-rust>=0.20.0; extra == 'rust'
115
- Provides-Extra: systems
116
- Requires-Dist: tree-sitter-c>=0.20.0; extra == 'systems'
117
- Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'systems'
118
- Requires-Dist: tree-sitter-go>=0.20.0; extra == 'systems'
119
- Requires-Dist: tree-sitter-rust>=0.20.0; extra == 'systems'
120
- Provides-Extra: test
121
- Requires-Dist: pytest-asyncio>=1.1.0; extra == 'test'
122
- Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
123
- Requires-Dist: pytest-mock>=3.14.1; extra == 'test'
124
- Requires-Dist: pytest>=8.4.1; extra == 'test'
125
- Requires-Dist: tree-sitter-cpp>=0.23.4; extra == 'test'
126
- Requires-Dist: tree-sitter-java>=0.23.5; extra == 'test'
127
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'test'
128
- Requires-Dist: tree-sitter-python>=0.23.0; extra == 'test'
129
- Provides-Extra: typescript
130
- Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'typescript'
131
- Provides-Extra: web
132
- Requires-Dist: tree-sitter-javascript>=0.23.1; extra == 'web'
133
- Requires-Dist: tree-sitter-typescript>=0.20.0; extra == 'web'
134
- Description-Content-Type: text/markdown
135
-
136
- # Tree-sitter Analyzer
137
-
138
- [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
139
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
140
- [![Tests](https://img.shields.io/badge/tests-306%20passed-brightgreen.svg)](#testing)
141
- [![Coverage](https://img.shields.io/badge/coverage-74.82%25-green.svg)](#testing)
142
- [![Quality](https://img.shields.io/badge/quality-enterprise%20grade-blue.svg)](#quality)
143
-
144
- **Solve the LLM token limit problem for large code files.**
145
-
146
- An extensible multi-language code analyzer that helps AI assistants understand code structure without reading entire files. Get code overview, extract specific sections, and analyze complexity - all optimized for LLM workflows.
147
-
148
- ## ✨ Why Tree-sitter Analyzer?
149
-
150
- **The Problem:** Large code files exceed LLM token limits, making code analysis inefficient or impossible.
151
-
152
- **The Solution:** Smart code analysis that provides:
153
- - 📊 **Code overview** without reading complete files
154
- - 🎯 **Targeted extraction** of specific line ranges
155
- - 📍 **Precise positioning** for accurate code operations
156
- - 🤖 **AI assistant integration** via MCP protocol
157
-
158
- ## 🚀 Quick Start (5 minutes)
159
-
160
- ### For AI Assistant Users (Claude Desktop)
161
-
162
- 1. **Install the package:**
163
- ```bash
164
- # Install uv (fast Python package manager)
165
- curl -LsSf https://astral.sh/uv/install.sh | sh # macOS/Linux
166
- # or: powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows
167
-
168
- # No need to install the package separately - uv handles it
169
- ```
170
-
171
- 2. **Configure Claude Desktop:**
172
-
173
- Add to your Claude Desktop config file:
174
-
175
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
176
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
177
- **Linux:** `~/.config/claude/claude_desktop_config.json`
178
-
179
- ```json
180
- {
181
- "mcpServers": {
182
- "tree-sitter-analyzer": {
183
- "command": "uv",
184
- "args": [
185
- "run",
186
- "--with",
187
- "tree-sitter-analyzer[mcp]",
188
- "python",
189
- "-m",
190
- "tree_sitter_analyzer.mcp.server"
191
- ]
192
- }
193
- }
194
- }
195
- ```
196
-
197
- 3. **Restart Claude Desktop** and start analyzing code!
198
-
199
- ### For CLI Users
200
-
201
- ```bash
202
- # Install with uv (recommended)
203
- uv add "tree-sitter-analyzer[popular]"
204
-
205
- # Step 1: Check file scale
206
- uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text
207
-
208
- # Step 2: Analyze structure (for large files)
209
- uv run python -m tree_sitter_analyzer examples/Sample.java --table=full
210
-
211
- # Step 3: Extract specific lines
212
- uv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86
213
- ```
214
-
215
- ## 🛠️ Core Features
216
-
217
- ### 1. Code Structure Analysis
218
- Get comprehensive overview without reading entire files:
219
- - Classes, methods, fields count
220
- - Package information
221
- - Import dependencies
222
- - Complexity metrics
223
-
224
- ### 2. Targeted Code Extraction
225
- Extract specific code sections efficiently:
226
- - Line range extraction
227
- - Precise positioning data
228
- - Content length information
229
-
230
- ### 3. AI Assistant Integration
231
- Three-step workflow MCP tools for AI assistants:
232
- - `check_code_scale` - **Step 1:** Get code metrics and complexity
233
- - `analyze_code_structure` - **Step 2:** Generate detailed structure tables with line positions
234
- - `extract_code_section` - **Step 3:** Extract specific code sections by line range
235
-
236
- ### 4. Multi-Language Support
237
- - **Java** - Full support with advanced analysis
238
- - **Python** - Complete support
239
- - **JavaScript/TypeScript** - Full support
240
- - **C/C++, Rust, Go** - Basic support
241
-
242
- ## 📖 Usage Examples
243
-
244
- ### AI Assistant Usage (via Claude Desktop)
245
-
246
- **Step 1: Check code scale**
247
- ```
248
- Use tool: check_code_scale
249
- Parameters: {"file_path": "examples/Sample.java"}
250
- ```
251
-
252
- **Step 2: Analyze structure (for large files >100 lines)**
253
- ```
254
- Use tool: analyze_code_structure
255
- Parameters: {"file_path": "examples/Sample.java", "format_type": "full"}
256
- ```
257
-
258
- **Step 3: Extract specific code (using line positions from step 2)**
259
- ```
260
- Use tool: extract_code_section
261
- Parameters: {"file_path": "examples/Sample.java", "start_line": 84, "end_line": 86}
262
- ```
263
-
264
- > **Note:** Always use snake_case parameter names: `file_path`, `start_line`, `end_line`, `format_type`
265
-
266
- ### CLI Usage
267
-
268
- **Step 1: Basic analysis (Check file scale):**
269
- ```bash
270
- uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text
271
- ```
272
-
273
- **Step 2: Structure analysis (For large files that exceed LLM limits):**
274
- ```bash
275
- uv run python -m tree_sitter_analyzer examples/Sample.java --table=full
276
- ```
277
-
278
- **Step 3: Targeted extraction (Read specific code sections):**
279
- ```bash
280
- uv run python -m tree_sitter_analyzer examples/Sample.java --partial-read --start-line 84 --end-line 86
281
- ```
282
-
283
- **Additional Options:**
284
- ```bash
285
- # Quiet mode (suppress INFO messages, show only errors)
286
- uv run python -m tree_sitter_analyzer examples/Sample.java --advanced --output-format=text --quiet
287
-
288
- # Table output with quiet mode
289
- uv run python -m tree_sitter_analyzer examples/Sample.java --table=full --quiet
290
- ```
291
-
292
- ## 🔧 Installation Options
293
-
294
- ### For End Users
295
- ```bash
296
- # Basic installation
297
- uv add tree-sitter-analyzer
298
-
299
- # With popular languages (Java, Python, JS, TS)
300
- uv add "tree-sitter-analyzer[popular]"
301
-
302
- # With MCP server support
303
- uv add "tree-sitter-analyzer[mcp]"
304
-
305
- # Full installation
306
- uv add "tree-sitter-analyzer[all,mcp]"
307
- ```
308
-
309
- ### For Developers
310
- ```bash
311
- # Clone and install for development
312
- git clone https://github.com/aimasteracc/tree-sitter-analyzer.git
313
- cd tree-sitter-analyzer
314
- uv sync --extra all --extra mcp
315
- ```
316
-
317
- ## 📚 Documentation
318
-
319
- - **[MCP Setup Guide for Users](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/MCP_SETUP_USERS.md)** - Simple setup for AI assistant users
320
- - **[MCP Setup Guide for Developers](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/MCP_SETUP_DEVELOPERS.md)** - Local development configuration
321
- - **[Project Root Configuration](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/PROJECT_ROOT_CONFIG.md)** - Complete configuration reference
322
- - **[API Documentation](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/docs/api.md)** - Detailed API reference
323
- - **[Contributing Guide](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/CONTRIBUTING.md)** - How to contribute
324
-
325
- ### 🔒 Project Root Configuration
326
-
327
- Tree-sitter-analyzer automatically detects and secures your project boundaries:
328
-
329
- - **Auto-detection**: Finds project root from `.git`, `pyproject.toml`, `package.json`, etc.
330
- - **CLI**: Use `--project-root /path/to/project` for explicit control
331
- - **MCP**: Set `TREE_SITTER_PROJECT_ROOT=${workspaceFolder}` for workspace integration
332
- - **Security**: Only analyzes files within project boundaries
333
-
334
- **Recommended MCP configuration:**
335
- ```json
336
- {
337
- "mcpServers": {
338
- "tree-sitter-analyzer": {
339
- "command": "uv",
340
- "args": ["run", "--with", "tree-sitter-analyzer[mcp]", "python", "-m", "tree_sitter_analyzer.mcp.server"],
341
- "env": {"TREE_SITTER_PROJECT_ROOT": "${workspaceFolder}"}
342
- }
343
- }
344
- }
345
- ```
346
-
347
- ## 🧪 Testing & Quality
348
-
349
- This project maintains **enterprise-grade quality** with comprehensive testing:
350
-
351
- ### 📊 Quality Metrics
352
- - **1358 tests** - 100% pass rate ✅
353
- - **74.82% code coverage** - Industry standard quality
354
- - **Zero test failures** - Complete CI/CD readiness
355
- - **Cross-platform compatibility** - Windows, macOS, Linux
356
-
357
- ### 🏆 Recent Quality Achievements (v0.8.2)
358
- - ✅ **Complete test suite stabilization** - Fixed all 31 failing tests
359
- - ✅ **Formatters module breakthrough** - 0% → 42.30% coverage
360
- - ✅ **Error handling improvements** - 61.64% → 82.76% coverage
361
- - ✅ **104 new comprehensive tests** across critical modules
362
-
363
- ### 🔧 Running Tests
364
- ```bash
365
- # Run all tests
366
- pytest tests/ -v
367
-
368
- # Run with coverage report
369
- pytest tests/ --cov=tree_sitter_analyzer --cov-report=html
370
-
371
- # Run specific test categories
372
- pytest tests/test_formatters_comprehensive.py -v
373
- pytest tests/test_core_engine_extended.py -v
374
- pytest tests/test_mcp_server_initialization.py -v
375
- ```
376
-
377
- ### 📈 Coverage Highlights
378
- - **Formatters**: 42.30% (newly established)
379
- - **Error Handler**: 82.76% (major improvement)
380
- - **Language Detector**: 98.41% (excellent)
381
- - **CLI Main**: 97.78% (excellent)
382
- - **Security Framework**: 78%+ across all modules
383
-
384
- ## 📄 License
385
-
386
- MIT License - see [LICENSE](LICENSE) file for details.
387
-
388
- ## 🤝 Contributing
389
-
390
- We welcome contributions! Please see our [Contributing Guide](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/CONTRIBUTING.md) for details.
391
-
392
- ### 🤖 AI/LLM Collaboration
393
-
394
- This project supports AI-assisted development with specialized quality controls:
395
-
396
- ```bash
397
- # For AI systems - run before generating code
398
- python check_quality.py --new-code-only
399
- python llm_code_checker.py --check-all
400
-
401
- # For AI-generated code review
402
- python llm_code_checker.py path/to/new_file.py
403
- ```
404
-
405
- 📖 **See our [AI Collaboration Guide](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/AI_COLLABORATION_GUIDE.md) and [LLM Coding Guidelines](https://github.com/aimasteracc/tree-sitter-analyzer/blob/main/LLM_CODING_GUIDELINES.md) for detailed instructions on working with AI systems.**
406
-
407
- ---
408
-
409
- **Made with ❤️ for developers who work with large codebases and AI assistants.**