explainthisrepo 0.20.1 → 0.22.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
@@ -22,7 +22,7 @@ Not blind AI summarization.
22
22
  - Translates complex code structures into plain English
23
23
  - Speeds up understanding of unfamiliar codebases
24
24
  - Extract architecture signals from configs, entrypoints, and manifests
25
- - Works with GitHub repositories, local directories, private repositories, and monorepos
25
+ - Works with GitHub repositories, local directories, private repositories, individual files and monorepos
26
26
  - Outputs the explanation to an `EXPLAIN.md` file in your current directory or prints it directly in the terminal
27
27
  - Multiple explanation modes (quick, simple, detailed)
28
28
 
@@ -182,6 +182,8 @@ For step-by-step instructions, see [docs/GITHUB_TOKEN.md](docs/GITHUB_TOKEN.md)
182
182
 
183
183
  - `--llm` → Override provider selection
184
184
 
185
+ - `--output` / `-o` → Specify output file or directory (default: `EXPLAIN.md`)
186
+
185
187
  ## Flexible Repository and Local Directory Input
186
188
 
187
189
  Accepts various formats for repository input, full GitHub URLs (with or without https), `owner/repo` format, issue links, query strings, and SSH clone links
@@ -318,6 +320,50 @@ When analyzing a local directory:
318
320
 
319
321
  This allows analysis of projects directly from the local filesystem, without requiring a GitHub repository.
320
322
 
323
+
324
+ ## File Analysis
325
+
326
+ ExplanThisRepo analyzes individual files directly
327
+
328
+ ```bash
329
+ explainthisrepo ./path/to/file.py
330
+ ```
331
+
332
+ Supports all explanation modes:
333
+
334
+ ```bash
335
+ explainthisrepo ./file.py --quick
336
+ explainthisrepo ./file.py --simple
337
+ explainthisrepo ./file.py --detailed
338
+ ```
339
+
340
+ When analyzing a file:
341
+ - The file is read safely with encoding and size limits
342
+ - Structure and basic signals (size, lines, type) are extracted
343
+ - The explanation focuses on purpose, logic, and behavior
344
+ - This makes it easy to understand unfamiliar files without scanning entire repositories.
345
+
346
+ ### Custom output
347
+
348
+ - `--output`, `-o` → Specify output file or directory (default: `EXPLAIN.md`)
349
+
350
+ Write to a specific file:
351
+
352
+ ```bash
353
+ explainthisrepo owner/repo --output notes.md
354
+ ```
355
+
356
+ Write to a nested path:
357
+ ```bash
358
+ explainthisrepo owner/repo --output path/to/file.md
359
+ ```
360
+
361
+ Write to a directory (creates EXPLAIN.md inside):
362
+
363
+ ```bash
364
+ explainthisrepo owner/repo --output path/to/directory
365
+ ```
366
+
321
367
  ### Version
322
368
 
323
369
  Check the installed CLI version:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "explainthisrepo",
3
- "version": "0.20.1",
3
+ "version": "0.22.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",