explainthisrepo 0.22.5 → 0.24.0

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.
package/README.md CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  _The fastest way to understand any codebase in plain English using real project signals. Not blind AI summarization._
4
4
 
5
- ExplainThisRepo analyzes real project signals; configs, entrypoints, manifests, dependencies graph, file structure and high-signal files producing a clear, structured `EXPLAIN.md` that explains what the codebase does and how it is organized in plain English.
6
- This is a deterministic repo signal extractor that feeds LLMs correctly.
5
+ ExplainThisRepo analyzes real project signals; configs, entrypoints, manifests, dependencies graph, file structure and high-signal files producing a clear, structured `EXPLAIN.md` that explains what the codebase actually does and how it is organized in plain English.
7
6
 
8
7
  [![PyPI Version](https://img.shields.io/pypi/v/explainthisrepo?color=blue)](https://pypi.org/project/explainthisrepo/)
9
8
  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/explainthisrepo?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/explainthisrepo)
@@ -20,11 +19,14 @@ This is a deterministic repo signal extractor that feeds LLMs correctly.
20
19
  - Understand any GitHub repository in seconds
21
20
  - Derives architectural summaries from repository structure and code signals.
22
21
  Not blind AI summarization.
22
+ - Deterministic repo signal extractor that feeds LLMs correctly
23
23
  - Translates complex code structures into plain English
24
24
  - Speeds up understanding of unfamiliar codebases
25
+ - Solves the "**garbage in, garbage out**" problem specifically for codebases
25
26
  - Extract architecture signals from configs, entrypoints, and manifests
26
27
  - Works with GitHub repositories, local directories, private repositories, individual files and monorepos
27
- - Outputs the explanation to an `EXPLAIN.md` file in your current directory, prints it directly in the terminal, or a specified output file (`.txt`, `.pdf`, `.docs`)
28
+ - Zero-cloning and remote analysis
29
+ - Outputs the explanation to an `EXPLAIN.md` file in your current directory, prints it directly in the terminal, or a specified output file (`.txt`, `.pdf`, `.docx`)
28
30
  - Multiple explanation modes (quick, simple, detailed)
29
31
 
30
32
  ## Installation
@@ -37,8 +39,10 @@ Requirements: Python 3.9+
37
39
  pip install explainthisrepo
38
40
  explainthisrepo owner/repo
39
41
 
40
- # pip install explainthisrepo
41
42
  # explainthisrepo .
43
+ # explainthisrepo ./path/to/directory
44
+ # explainthisrepo ./path/to/file.py
45
+ # explainthisrepo owner/repo/path/to/file.py
42
46
  ```
43
47
 
44
48
  Alternatively,
@@ -74,18 +78,35 @@ Install globally and use forever:
74
78
  ```bash
75
79
  npm install -g explainthisrepo
76
80
  explainthisrepo owner/repo
81
+ ```
77
82
 
78
- # npm install -g explainthisrepo
83
+ <details>
84
+ <pre>
85
+ <code>
79
86
  # explainthisrepo .
80
- ```
87
+ # explainthisrepo ./path/to/directory
88
+ # explainthisrepo ./path/to/file.py
89
+ # explainthisrepo owner/repo/path/to/file.py
90
+ </details>
91
+ </pre>
92
+ </code>
81
93
 
82
94
  Or without install:
83
95
 
84
96
  ```bash
85
97
  npx explainthisrepo owner/repo
98
+ ```
86
99
 
100
+ <details>
101
+ <pre>
102
+ <code>
87
103
  # npx explainthisrepo .
88
- ```
104
+ # npx explainthisrepo ./path/to/directory
105
+ # npx explainthisrepo ./path/to/file.py
106
+ # npx explainthisrepo owner/repo/path/to/file.py
107
+ </code>
108
+ </pre>
109
+ </details>
89
110
 
90
111
  ## How it works
91
112
 
@@ -195,8 +216,10 @@ explainthisrepo github.com/owner/repo
195
216
  explainthisrepo https://github.com/owner/repo/issues/123
196
217
  explainthisrepo https://github.com/owner/repo?tab=readme
197
218
  explainthisrepo git@github.com:owner/repo.git
219
+ explainthisrepo owner/repo/path/to/file.py
198
220
  explainthisrepo .
199
221
  explainthisrepo ./path/to/directory
222
+ explainthisrepo ./path/to/file.py
200
223
  ```
201
224
 
202
225
  All inputs are normalized internally to `owner/repo`.
@@ -344,6 +367,38 @@ When analyzing a file:
344
367
  - The explanation focuses on purpose, logic, and behavior
345
368
  - This makes it easy to understand unfamiliar files without scanning entire repositories.
346
369
 
370
+ ## GitHub File Analysis
371
+
372
+ ExplainThisRepo can analyze a single file directly from a GitHub repository without cloning it.
373
+
374
+ ```bash
375
+ explainthisrepo owner/repo/path/to/file.py
376
+ ```
377
+ Supports all explanation modes:
378
+
379
+ ```bash
380
+ explainthisrepo owner/repo/path/to/file.py --quick
381
+ explainthisrepo owner/repo/path/to/file.py --simple
382
+ explainthisrepo owner/repo/path/to/file.py --detailed
383
+ ```
384
+
385
+ When analyzing a GitHub file:
386
+ - The file is fetched directly via the GitHub API
387
+ - Only valid text files are processed (binary files are rejected)
388
+ - File size is capped to prevent unsafe or truncated analysis
389
+ - The explanation focuses on the file’s purpose, logic, and behavior
390
+
391
+ Input format must be:
392
+
393
+ ```bash
394
+ explainthisrepo owner/repo/path/to/file
395
+ ```
396
+
397
+ This is different from local file analysis:
398
+
399
+ ```bash
400
+ explainthisrepo ./path/to/file.py
401
+ ```
347
402
  ### Custom output
348
403
 
349
404
  `--output`, `-o` → Specify output file or directory (default: `EXPLAIN.md`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "explainthisrepo",
3
- "version": "0.22.5",
3
+ "version": "0.24.0",
4
4
  "description": "The fastest way to understand any codebase in plain English. Not blind AI summarization",
5
5
  "license": "MIT",
6
6
  "type": "module",