code2llm 0.5.15__tar.gz → 0.5.17__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.
- {code2llm-0.5.15 → code2llm-0.5.17}/PKG-INFO +74 -69
- {code2llm-0.5.15 → code2llm-0.5.17}/README.md +73 -68
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/__init__.py +1 -1
- code2llm-0.5.17/code2llm/cli.py +548 -0
- code2llm-0.5.17/code2llm/cli_exports.py +418 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/analyzer.py +19 -1
- code2llm-0.5.17/code2llm/core/large_repo.py +258 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/__init__.py +1 -1
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/PKG-INFO +74 -69
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/SOURCES.txt +2 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/pyproject.toml +1 -1
- code2llm-0.5.15/code2llm/cli.py +0 -708
- {code2llm-0.5.15 → code2llm-0.5.17}/LICENSE +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/__main__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/call_graph.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/cfg.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/coupling.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/data_analysis.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/dfg.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/pipeline_detector.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/side_effects.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/smells.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/analysis/type_inference.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/config.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/core/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/core/file_analyzer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/core/file_cache.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/core/file_filter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/core/refactoring.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/models.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/cache.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/incremental.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/prioritizer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/scanner.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming/strategies.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/core/streaming_analyzer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/base.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/context_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/evolution_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/flow_constants.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/flow_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/flow_renderer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/json_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/llm_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/map_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/mermaid_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/readme_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon/helpers.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon/metrics.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon/module_detail.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon/renderer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/toon.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/exporters/yaml_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/generators/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/generators/llm_flow.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/generators/llm_task.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/generators/mermaid.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/config.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/entity_resolution.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/intent_matching.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/normalization.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/nlp/pipeline.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/patterns/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/patterns/detector.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/refactor/__init__.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm/refactor/prompt_engine.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/dependency_links.txt +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/entry_points.txt +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/requires.txt +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/code2llm.egg-info/top_level.txt +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/setup.cfg +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/setup.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_advanced_analysis.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_analyzer.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_deep_analysis.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_edge_cases.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_flow_exporter.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_format_quality.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_nlp_pipeline.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_pipeline_detector.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_prompt_engine.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_prompt_txt.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_refactoring_engine.py +0 -0
- {code2llm-0.5.15 → code2llm-0.5.17}/tests/test_toon_v2.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code2llm
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.17
|
|
4
4
|
Summary: High-performance Python code flow analysis with optimized TOON format - CFG, DFG, call graphs, and intelligent code queries
|
|
5
5
|
Home-page: https://github.com/wronai/stts
|
|
6
6
|
Author: STTS Project
|
|
@@ -60,48 +60,18 @@ When you run `code2llm ./ -f all`, the following files are created:
|
|
|
60
60
|
|
|
61
61
|
| File | Format | Purpose | Key Insights |
|
|
62
62
|
|------|--------|---------|--------------|
|
|
63
|
-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling |
|
|
64
|
-
| `
|
|
65
|
-
| `flow.toon` | **TOON** | **🔄 Data flow analysis** - Pipelines, contracts, types | Data dependencies and side effects |
|
|
66
|
-
| `map.toon` | **TOON** | **🗺️ Structural map** - Modules, imports, signatures | Project architecture overview |
|
|
67
|
-
| `project.toon` | **TOON** | **🧠 Project logic** - Code2Logic compact module view | Generated via code2logic integration |
|
|
63
|
+
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 43 critical functions, 0 god modules |
|
|
64
|
+
| `project.toon` | **TOON** | **🧠 Project logic** - Compact module view from code2logic | Generated via code2logic integration |
|
|
68
65
|
|
|
69
66
|
### 🤖 LLM-Ready Documentation
|
|
70
67
|
|
|
71
68
|
| File | Format | Purpose | Use Case |
|
|
72
69
|
|------|--------|---------|----------|
|
|
73
70
|
| `context.md` | **Markdown** | **📖 LLM narrative** - Architecture summary | Paste into ChatGPT/Claude for code analysis |
|
|
74
|
-
| `prompt.txt` | **Text** | **📝 Ready-to-send prompt** - Lists all generated files with instructions | Attach to LLM conversation as context guide |
|
|
75
|
-
| `analysis.yaml` | **YAML** | **📊 Structured data** - Machine-readable | For scripts and automated processing |
|
|
76
|
-
| `analysis.json` | **JSON** | **🔧 API format** - Programmatic access | For integration with other tools |
|
|
77
71
|
|
|
78
|
-
### 📊 Visualizations
|
|
79
|
-
|
|
80
|
-
| File | Format | Purpose | Description |
|
|
81
|
-
|------|--------|---------|-------------|
|
|
82
|
-
| `flow.mmd` | **Mermaid** | **🔄 Control flow diagram** | Function call paths with complexity styling |
|
|
83
|
-
| `calls.mmd` | **Mermaid** | **📞 Call graph** | Function dependencies (edges only) |
|
|
84
|
-
| `compact_flow.mmd` | **Mermaid** | **📦 Module overview** | Aggregated module-level view |
|
|
85
|
-
| `*.png` | **PNG** | **🖼️ Visual diagrams** | Rendered versions of Mermaid files |
|
|
86
72
|
|
|
87
73
|
## 🚀 Quick Start Commands
|
|
88
74
|
|
|
89
|
-
### Complete LLM Analysis (with Code2Logic)
|
|
90
|
-
```bash
|
|
91
|
-
# Generate complete analysis with code2logic integration
|
|
92
|
-
# Creates: analysis.toon, evolution.toon, project.toon, prompt.txt, README.md
|
|
93
|
-
|
|
94
|
-
# Using specific formats (recommended)
|
|
95
|
-
code2llm ./ -f toon,evolution,code2logic -o ./project
|
|
96
|
-
|
|
97
|
-
# Using 'all' format (includes code2logic)
|
|
98
|
-
code2llm ./ -f all -o ./project
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
The `code2logic` format automatically:
|
|
102
|
-
1. Runs `code2logic` tool to generate `project.toon` (compact module view)
|
|
103
|
-
2. Creates `prompt.txt` - ready-to-send prompt listing all generated files
|
|
104
|
-
|
|
105
75
|
### Basic Analysis
|
|
106
76
|
```bash
|
|
107
77
|
# Quick health check (TOON format only)
|
|
@@ -114,12 +84,6 @@ code2llm ./ -f all
|
|
|
114
84
|
code2llm ./ -f context
|
|
115
85
|
```
|
|
116
86
|
|
|
117
|
-
Przykład z projektu toonic, z użyciem modelu Kimi K2.5 w VScode Windsurf:
|
|
118
|
-

|
|
119
|
-
```bash
|
|
120
|
-
code2llm ./ -f toon,evolution -o ./project
|
|
121
|
-
```
|
|
122
|
-
|
|
123
87
|
### Performance Options
|
|
124
88
|
```bash
|
|
125
89
|
# Fast analysis for large projects
|
|
@@ -132,6 +96,46 @@ code2llm ./ -f all --max-memory 500
|
|
|
132
96
|
code2llm ./ -f all --no-png
|
|
133
97
|
```
|
|
134
98
|
|
|
99
|
+
### Large Repository Analysis (Chunking)
|
|
100
|
+
For repositories >100 files, automatic chunking splits analysis into smaller subprojects:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Auto-chunking when >100 files detected
|
|
104
|
+
code2llm ./ -f toon,evolution,code2logic --verbose
|
|
105
|
+
|
|
106
|
+
# Force chunking with custom size limit
|
|
107
|
+
code2llm ./ -f toon --chunk --chunk-size 256
|
|
108
|
+
|
|
109
|
+
# Analyze only specific subproject
|
|
110
|
+
code2llm ./ -f toon --only-subproject src
|
|
111
|
+
|
|
112
|
+
# Skip tests and examples
|
|
113
|
+
code2llm ./ -f toon --skip-subprojects tests examples
|
|
114
|
+
|
|
115
|
+
# Customize file limit per chunk
|
|
116
|
+
code2llm ./ -f toon --chunk --max-files-per-chunk 50
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Chunking Benefits:**
|
|
120
|
+
- Each subproject analyzed separately (examples/, tests/, src/, etc.)
|
|
121
|
+
- Output limited to ~256KB per file (configurable)
|
|
122
|
+
- Parallel processing of chunks possible
|
|
123
|
+
- Reduced memory usage for large repos
|
|
124
|
+
|
|
125
|
+
**Output Structure:**
|
|
126
|
+
```
|
|
127
|
+
./project/
|
|
128
|
+
├── src/ # Core code analysis
|
|
129
|
+
│ ├── analysis.toon
|
|
130
|
+
│ └── evolution.toon
|
|
131
|
+
├── tests/ # Test code analysis
|
|
132
|
+
│ └── analysis.toon
|
|
133
|
+
├── examples/ # Examples analysis
|
|
134
|
+
│ └── analysis.toon
|
|
135
|
+
├── analysis.toon # Merged summary
|
|
136
|
+
└── evolution.toon # Full refactoring queue
|
|
137
|
+
```
|
|
138
|
+
|
|
135
139
|
### Refactoring Focus
|
|
136
140
|
```bash
|
|
137
141
|
# Get refactoring recommendations
|
|
@@ -213,23 +217,6 @@ cat map.toon | head -50
|
|
|
213
217
|
grep "SIGNATURES" map.toon
|
|
214
218
|
```
|
|
215
219
|
|
|
216
|
-
### `context.md` - LLM Narrative
|
|
217
|
-
**Purpose**: Ready-to-paste context for AI assistants
|
|
218
|
-
**Key sections**:
|
|
219
|
-
- **Overview**: Project statistics
|
|
220
|
-
- **Architecture**: Module breakdown
|
|
221
|
-
- **Entry Points**: Public interfaces
|
|
222
|
-
- **Patterns**: Design patterns detected
|
|
223
|
-
|
|
224
|
-
**Example usage**:
|
|
225
|
-
```bash
|
|
226
|
-
# Copy to clipboard for LLM
|
|
227
|
-
cat context.md | pbcopy # macOS
|
|
228
|
-
cat context.md | xclip -sel clip # Linux
|
|
229
|
-
|
|
230
|
-
# Use with Claude/ChatGPT for code analysis
|
|
231
|
-
```
|
|
232
|
-
|
|
233
220
|
### `project.toon` - Project Logic (Code2Logic)
|
|
234
221
|
**Purpose**: Compact module view generated by code2logic integration
|
|
235
222
|
**Key sections**:
|
|
@@ -239,31 +226,49 @@ cat context.md | xclip -sel clip # Linux
|
|
|
239
226
|
|
|
240
227
|
**When to use**: When you need a lightweight project overview combined with code2llm analysis
|
|
241
228
|
|
|
242
|
-
**
|
|
229
|
+
**Example usage**:
|
|
243
230
|
```bash
|
|
244
|
-
#
|
|
245
|
-
|
|
231
|
+
# View compact project structure
|
|
232
|
+
cat project.toon | head -30
|
|
233
|
+
|
|
234
|
+
# Find largest files
|
|
235
|
+
grep -E "^ .*[0-9]{3,}$" project.toon | sort -t',' -k2 -n -r | head -10
|
|
246
236
|
```
|
|
247
237
|
|
|
248
238
|
### `prompt.txt` - Ready-to-Send LLM Prompt
|
|
249
239
|
**Purpose**: Pre-formatted prompt listing all generated files for LLM conversation
|
|
250
240
|
**Contents**:
|
|
251
|
-
- **Files section**: Lists all existing generated files
|
|
241
|
+
- **Files section**: Lists all existing generated files with descriptions
|
|
252
242
|
- **Missing section**: Shows which files weren't generated (if any)
|
|
253
243
|
- **Task section**: Instructions for LLM analysis
|
|
254
|
-
- **
|
|
244
|
+
- **Requirements section**: Guidelines for suggested changes
|
|
255
245
|
|
|
256
246
|
**Example usage**:
|
|
257
247
|
```bash
|
|
258
248
|
# View the prompt
|
|
259
|
-
cat
|
|
249
|
+
cat prompt.txt
|
|
260
250
|
|
|
261
251
|
# Copy to clipboard and paste into ChatGPT/Claude
|
|
262
|
-
cat
|
|
263
|
-
cat
|
|
252
|
+
cat prompt.txt | pbcopy # macOS
|
|
253
|
+
cat prompt.txt | xclip -sel clip # Linux
|
|
264
254
|
```
|
|
265
255
|
|
|
266
|
-
|
|
256
|
+
### `context.md` - LLM Narrative
|
|
257
|
+
**Purpose**: Ready-to-paste context for AI assistants
|
|
258
|
+
**Key sections**:
|
|
259
|
+
- **Overview**: Project statistics
|
|
260
|
+
- **Architecture**: Module breakdown
|
|
261
|
+
- **Entry Points**: Public interfaces
|
|
262
|
+
- **Patterns**: Design patterns detected
|
|
263
|
+
|
|
264
|
+
**Example usage**:
|
|
265
|
+
```bash
|
|
266
|
+
# Copy to clipboard for LLM
|
|
267
|
+
cat context.md | pbcopy # macOS
|
|
268
|
+
cat context.md | xclip -sel clip # Linux
|
|
269
|
+
|
|
270
|
+
# Use with Claude/ChatGPT for code analysis
|
|
271
|
+
```
|
|
267
272
|
|
|
268
273
|
### Visualization Files (`*.mmd`, `*.png`)
|
|
269
274
|
**Purpose**: Visual understanding of code structure
|
|
@@ -409,10 +414,10 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
409
414
|
---
|
|
410
415
|
|
|
411
416
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
412
|
-
**Analysis Date**: 2026-03-
|
|
413
|
-
**Total Functions**:
|
|
414
|
-
**Total Classes**:
|
|
415
|
-
**Modules**:
|
|
417
|
+
**Analysis Date**: 2026-03-03
|
|
418
|
+
**Total Functions**: 700
|
|
419
|
+
**Total Classes**: 97
|
|
420
|
+
**Modules**: 83
|
|
416
421
|
|
|
417
422
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
418
423
|
|
|
@@ -10,48 +10,18 @@ When you run `code2llm ./ -f all`, the following files are created:
|
|
|
10
10
|
|
|
11
11
|
| File | Format | Purpose | Key Insights |
|
|
12
12
|
|------|--------|---------|--------------|
|
|
13
|
-
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling |
|
|
14
|
-
| `
|
|
15
|
-
| `flow.toon` | **TOON** | **🔄 Data flow analysis** - Pipelines, contracts, types | Data dependencies and side effects |
|
|
16
|
-
| `map.toon` | **TOON** | **🗺️ Structural map** - Modules, imports, signatures | Project architecture overview |
|
|
17
|
-
| `project.toon` | **TOON** | **🧠 Project logic** - Code2Logic compact module view | Generated via code2logic integration |
|
|
13
|
+
| `analysis.toon` | **TOON** | **🔥 Health diagnostics** - Complexity, god modules, coupling | 43 critical functions, 0 god modules |
|
|
14
|
+
| `project.toon` | **TOON** | **🧠 Project logic** - Compact module view from code2logic | Generated via code2logic integration |
|
|
18
15
|
|
|
19
16
|
### 🤖 LLM-Ready Documentation
|
|
20
17
|
|
|
21
18
|
| File | Format | Purpose | Use Case |
|
|
22
19
|
|------|--------|---------|----------|
|
|
23
20
|
| `context.md` | **Markdown** | **📖 LLM narrative** - Architecture summary | Paste into ChatGPT/Claude for code analysis |
|
|
24
|
-
| `prompt.txt` | **Text** | **📝 Ready-to-send prompt** - Lists all generated files with instructions | Attach to LLM conversation as context guide |
|
|
25
|
-
| `analysis.yaml` | **YAML** | **📊 Structured data** - Machine-readable | For scripts and automated processing |
|
|
26
|
-
| `analysis.json` | **JSON** | **🔧 API format** - Programmatic access | For integration with other tools |
|
|
27
21
|
|
|
28
|
-
### 📊 Visualizations
|
|
29
|
-
|
|
30
|
-
| File | Format | Purpose | Description |
|
|
31
|
-
|------|--------|---------|-------------|
|
|
32
|
-
| `flow.mmd` | **Mermaid** | **🔄 Control flow diagram** | Function call paths with complexity styling |
|
|
33
|
-
| `calls.mmd` | **Mermaid** | **📞 Call graph** | Function dependencies (edges only) |
|
|
34
|
-
| `compact_flow.mmd` | **Mermaid** | **📦 Module overview** | Aggregated module-level view |
|
|
35
|
-
| `*.png` | **PNG** | **🖼️ Visual diagrams** | Rendered versions of Mermaid files |
|
|
36
22
|
|
|
37
23
|
## 🚀 Quick Start Commands
|
|
38
24
|
|
|
39
|
-
### Complete LLM Analysis (with Code2Logic)
|
|
40
|
-
```bash
|
|
41
|
-
# Generate complete analysis with code2logic integration
|
|
42
|
-
# Creates: analysis.toon, evolution.toon, project.toon, prompt.txt, README.md
|
|
43
|
-
|
|
44
|
-
# Using specific formats (recommended)
|
|
45
|
-
code2llm ./ -f toon,evolution,code2logic -o ./project
|
|
46
|
-
|
|
47
|
-
# Using 'all' format (includes code2logic)
|
|
48
|
-
code2llm ./ -f all -o ./project
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
The `code2logic` format automatically:
|
|
52
|
-
1. Runs `code2logic` tool to generate `project.toon` (compact module view)
|
|
53
|
-
2. Creates `prompt.txt` - ready-to-send prompt listing all generated files
|
|
54
|
-
|
|
55
25
|
### Basic Analysis
|
|
56
26
|
```bash
|
|
57
27
|
# Quick health check (TOON format only)
|
|
@@ -64,12 +34,6 @@ code2llm ./ -f all
|
|
|
64
34
|
code2llm ./ -f context
|
|
65
35
|
```
|
|
66
36
|
|
|
67
|
-
Przykład z projektu toonic, z użyciem modelu Kimi K2.5 w VScode Windsurf:
|
|
68
|
-

|
|
69
|
-
```bash
|
|
70
|
-
code2llm ./ -f toon,evolution -o ./project
|
|
71
|
-
```
|
|
72
|
-
|
|
73
37
|
### Performance Options
|
|
74
38
|
```bash
|
|
75
39
|
# Fast analysis for large projects
|
|
@@ -82,6 +46,46 @@ code2llm ./ -f all --max-memory 500
|
|
|
82
46
|
code2llm ./ -f all --no-png
|
|
83
47
|
```
|
|
84
48
|
|
|
49
|
+
### Large Repository Analysis (Chunking)
|
|
50
|
+
For repositories >100 files, automatic chunking splits analysis into smaller subprojects:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Auto-chunking when >100 files detected
|
|
54
|
+
code2llm ./ -f toon,evolution,code2logic --verbose
|
|
55
|
+
|
|
56
|
+
# Force chunking with custom size limit
|
|
57
|
+
code2llm ./ -f toon --chunk --chunk-size 256
|
|
58
|
+
|
|
59
|
+
# Analyze only specific subproject
|
|
60
|
+
code2llm ./ -f toon --only-subproject src
|
|
61
|
+
|
|
62
|
+
# Skip tests and examples
|
|
63
|
+
code2llm ./ -f toon --skip-subprojects tests examples
|
|
64
|
+
|
|
65
|
+
# Customize file limit per chunk
|
|
66
|
+
code2llm ./ -f toon --chunk --max-files-per-chunk 50
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Chunking Benefits:**
|
|
70
|
+
- Each subproject analyzed separately (examples/, tests/, src/, etc.)
|
|
71
|
+
- Output limited to ~256KB per file (configurable)
|
|
72
|
+
- Parallel processing of chunks possible
|
|
73
|
+
- Reduced memory usage for large repos
|
|
74
|
+
|
|
75
|
+
**Output Structure:**
|
|
76
|
+
```
|
|
77
|
+
./project/
|
|
78
|
+
├── src/ # Core code analysis
|
|
79
|
+
│ ├── analysis.toon
|
|
80
|
+
│ └── evolution.toon
|
|
81
|
+
├── tests/ # Test code analysis
|
|
82
|
+
│ └── analysis.toon
|
|
83
|
+
├── examples/ # Examples analysis
|
|
84
|
+
│ └── analysis.toon
|
|
85
|
+
├── analysis.toon # Merged summary
|
|
86
|
+
└── evolution.toon # Full refactoring queue
|
|
87
|
+
```
|
|
88
|
+
|
|
85
89
|
### Refactoring Focus
|
|
86
90
|
```bash
|
|
87
91
|
# Get refactoring recommendations
|
|
@@ -163,23 +167,6 @@ cat map.toon | head -50
|
|
|
163
167
|
grep "SIGNATURES" map.toon
|
|
164
168
|
```
|
|
165
169
|
|
|
166
|
-
### `context.md` - LLM Narrative
|
|
167
|
-
**Purpose**: Ready-to-paste context for AI assistants
|
|
168
|
-
**Key sections**:
|
|
169
|
-
- **Overview**: Project statistics
|
|
170
|
-
- **Architecture**: Module breakdown
|
|
171
|
-
- **Entry Points**: Public interfaces
|
|
172
|
-
- **Patterns**: Design patterns detected
|
|
173
|
-
|
|
174
|
-
**Example usage**:
|
|
175
|
-
```bash
|
|
176
|
-
# Copy to clipboard for LLM
|
|
177
|
-
cat context.md | pbcopy # macOS
|
|
178
|
-
cat context.md | xclip -sel clip # Linux
|
|
179
|
-
|
|
180
|
-
# Use with Claude/ChatGPT for code analysis
|
|
181
|
-
```
|
|
182
|
-
|
|
183
170
|
### `project.toon` - Project Logic (Code2Logic)
|
|
184
171
|
**Purpose**: Compact module view generated by code2logic integration
|
|
185
172
|
**Key sections**:
|
|
@@ -189,31 +176,49 @@ cat context.md | xclip -sel clip # Linux
|
|
|
189
176
|
|
|
190
177
|
**When to use**: When you need a lightweight project overview combined with code2llm analysis
|
|
191
178
|
|
|
192
|
-
**
|
|
179
|
+
**Example usage**:
|
|
193
180
|
```bash
|
|
194
|
-
#
|
|
195
|
-
|
|
181
|
+
# View compact project structure
|
|
182
|
+
cat project.toon | head -30
|
|
183
|
+
|
|
184
|
+
# Find largest files
|
|
185
|
+
grep -E "^ .*[0-9]{3,}$" project.toon | sort -t',' -k2 -n -r | head -10
|
|
196
186
|
```
|
|
197
187
|
|
|
198
188
|
### `prompt.txt` - Ready-to-Send LLM Prompt
|
|
199
189
|
**Purpose**: Pre-formatted prompt listing all generated files for LLM conversation
|
|
200
190
|
**Contents**:
|
|
201
|
-
- **Files section**: Lists all existing generated files
|
|
191
|
+
- **Files section**: Lists all existing generated files with descriptions
|
|
202
192
|
- **Missing section**: Shows which files weren't generated (if any)
|
|
203
193
|
- **Task section**: Instructions for LLM analysis
|
|
204
|
-
- **
|
|
194
|
+
- **Requirements section**: Guidelines for suggested changes
|
|
205
195
|
|
|
206
196
|
**Example usage**:
|
|
207
197
|
```bash
|
|
208
198
|
# View the prompt
|
|
209
|
-
cat
|
|
199
|
+
cat prompt.txt
|
|
210
200
|
|
|
211
201
|
# Copy to clipboard and paste into ChatGPT/Claude
|
|
212
|
-
cat
|
|
213
|
-
cat
|
|
202
|
+
cat prompt.txt | pbcopy # macOS
|
|
203
|
+
cat prompt.txt | xclip -sel clip # Linux
|
|
214
204
|
```
|
|
215
205
|
|
|
216
|
-
|
|
206
|
+
### `context.md` - LLM Narrative
|
|
207
|
+
**Purpose**: Ready-to-paste context for AI assistants
|
|
208
|
+
**Key sections**:
|
|
209
|
+
- **Overview**: Project statistics
|
|
210
|
+
- **Architecture**: Module breakdown
|
|
211
|
+
- **Entry Points**: Public interfaces
|
|
212
|
+
- **Patterns**: Design patterns detected
|
|
213
|
+
|
|
214
|
+
**Example usage**:
|
|
215
|
+
```bash
|
|
216
|
+
# Copy to clipboard for LLM
|
|
217
|
+
cat context.md | pbcopy # macOS
|
|
218
|
+
cat context.md | xclip -sel clip # Linux
|
|
219
|
+
|
|
220
|
+
# Use with Claude/ChatGPT for code analysis
|
|
221
|
+
```
|
|
217
222
|
|
|
218
223
|
### Visualization Files (`*.mmd`, `*.png`)
|
|
219
224
|
**Purpose**: Visual understanding of code structure
|
|
@@ -359,10 +364,10 @@ code2llm ./ -f yaml --separate-orphans
|
|
|
359
364
|
---
|
|
360
365
|
|
|
361
366
|
**Generated by**: `code2llm ./ -f all --readme`
|
|
362
|
-
**Analysis Date**: 2026-03-
|
|
363
|
-
**Total Functions**:
|
|
364
|
-
**Total Classes**:
|
|
365
|
-
**Modules**:
|
|
367
|
+
**Analysis Date**: 2026-03-03
|
|
368
|
+
**Total Functions**: 700
|
|
369
|
+
**Total Classes**: 97
|
|
370
|
+
**Modules**: 83
|
|
366
371
|
|
|
367
372
|
For more information about code2llm, visit: https://github.com/tom-sapletta/code2llm
|
|
368
373
|
|