explainthisrepo 0.9.1 → 0.9.2

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 (2) hide show
  1. package/README.md +134 -86
  2. package/package.json +5 -3
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # ExplainThisRepo
2
2
 
3
- ExplainThisRepo is a CLI that generates plain-English explanations of any codebase (GitHub repositories and local directories) by analyzing project structure, READMEs, and high signal files.
3
+ _The fastest way to understand any codebase in plain English using real project signals. Not blind AI summarization._
4
4
 
5
- ExplainThisRepo is a command-line tool that analyzes GitHub repositories and local directories to generate plain-English explanations of the codebase architecture.
6
-
7
- It helps developers quickly understand unfamiliar codebases by deriving architectural explanations from real project structure and code signals, producing a clear, structured `EXPLAIN.md`.
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.
8
6
 
9
7
  [![PyPI Version](https://img.shields.io/pypi/v/explainthisrepo?color=blue)](https://pypi.org/project/explainthisrepo/)
10
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)
@@ -14,45 +12,99 @@ It helps developers quickly understand unfamiliar codebases by deriving architec
14
12
  [![Node](https://img.shields.io/node/v/explainthisrepo)](https://www.npmjs.com/package/explainthisrepo)
15
13
  [![Docs](https://img.shields.io/badge/docs-explainthisrepo.com-black)](https://explainthisrepo.com)
16
14
 
17
- ---
18
-
19
15
  ![demo](https://github.com/user-attachments/assets/837e0593-db64-4657-8855-bb1915011eb6)
20
- ---
21
16
 
22
17
  ## Key Features
23
18
 
24
- - Generates architectural summaries from repository structure and code signals
25
- - Fetches public repositories by GitHub URLs (with or without https), `owner/repo` format, issue links, query strings, and SSH clone links
26
- - Analyzes repository data including file tree, configs, entrypoints, and high signal source files
27
- - Extracts repo signals from key files (package.json, pyproject.toml, config files, entrypoints)
28
- - Builds a file tree summary to understand project architecture
29
- - Detects programming languages with the GitHub API
30
- - Analyzes local project directories using the same pipeline as GitHub repositories
31
- - Generates a structured plain-English explanation grounded in actual project files
19
+ - Understand any GitHub repository in seconds
20
+ - Derives architectural summaries from repository structure and code signals.
21
+ Not blind AI summarization.
22
+ - Translates complex code structures into plain English
23
+ - Extract architecture signals from configs, entrypoints, and manifests
24
+ - Works with GitHub repositories, local directories, private repositories, and monorepos
32
25
  - Outputs the explanation to an `EXPLAIN.md` file in your current directory or prints it directly in the terminal
33
- - Multi-mode command-line interface
26
+ - Multiple explanation modes (quick, simple, detailed)
34
27
 
35
- ---
28
+ ## Installation
36
29
 
37
- ## Modes
30
+ ### Option 1: install with pip (recommended):
38
31
 
39
- - (no flag) → Full repository explanation written to EXPLAIN.md
32
+ Requirements: Python 3.9+
40
33
 
41
- - `--quick` → One-sentence summary
34
+ ```bash
35
+ pip install explainthisrepo
36
+ explainthisrepo owner/repo
42
37
 
43
- - `--simple` Short, simplified explanation
38
+ # pip install explainthisrepo
39
+ # explainthisrepo .
40
+ ```
44
41
 
45
- - `--detailed` → Deeper explanation including structure and architecture
42
+ Alternatively,
46
43
 
47
- - `--stack` → Tech stack breakdown from repo signals
44
+ ```bash
45
+ pipx install explainthisrepo
46
+ explainthisrepo owner/repo
47
+ ```
48
48
 
49
- - `--version` Check installed CLI version
49
+ To install support for specific models:
50
50
 
51
- - `--help` → Show usage guide
51
+ ```bash
52
+ pip install explainthisrepo[gemini]
53
+ pip install explainthisrepo[openai]
54
+ pip install explainthisrepo[anthropic]
55
+ pip install explainthisrepo[groq]
56
+ ```
52
57
 
53
- - `--doctor` Check system health and active model diagnostics
58
+ ### Option 2: Install with npm
54
59
 
55
- ---
60
+ Install globally and use forever:
61
+
62
+ ```bash
63
+ npm install -g explainthisrepo
64
+ explainthisrepo owner/repo
65
+
66
+ # npm install -g explainthisrepo
67
+ # explainthisrepo .
68
+ ```
69
+
70
+ Or without install:
71
+
72
+ ```bash
73
+ npx explainthisrepo owner/repo
74
+ ```
75
+
76
+ Replace `owner/repo` with the GitHub repository identifier (e.g., `facebook/react`).
77
+
78
+ ### Option 3: Download standalone binary
79
+
80
+ Prebuilt standalone binaries are available for macOS, Linux, and Windows.
81
+
82
+ > Standalone binaries require no Python or Node installation and run as a single executable.
83
+
84
+ Download the latest release:
85
+
86
+ [github.com/calchiwo/ExplainThisRepo/releases/latest](https://github.com/calchiwo/ExplainThisRepo/releases/latest)
87
+
88
+ Or install directly:
89
+
90
+ macOS
91
+
92
+ ```bash
93
+ curl -L https://github.com/calchiwo/ExplainThisRepo/releases/latest/download/explainthisrepo-darwin-arm64 -o explainthisrepo
94
+ chmod +x explainthisrepo
95
+ ```
96
+
97
+ Linux
98
+ ```bash
99
+ curl -L https://github.com/calchiwo/ExplainThisRepo/releases/latest/download/explainthisrepo-linux-x64 -o explainthisrepo
100
+ chmod +x explainthisrepo
101
+ ```
102
+
103
+ Windows (PowerShell)
104
+
105
+ ```powershell
106
+ curl -L https://github.com/calchiwo/ExplainThisRepo/releases/latest/download/explainthisrepo-win-x64.exe -o explainthisrepo.exe
107
+ ```
56
108
 
57
109
  ## Configuration
58
110
 
@@ -61,8 +113,9 @@ ExplainThisRepo supports multiple LLM models:
61
113
  - Gemini
62
114
  - OpenAI
63
115
  - Ollama (local or cloud-routed)
64
-
65
- ### Quick setup (recommended)
116
+ - Anthropic
117
+ - Groq
118
+ - OpenRouter
66
119
 
67
120
  Use the built-in `init` command to configure your preferred model:
68
121
 
@@ -70,49 +123,35 @@ Use the built-in `init` command to configure your preferred model:
70
123
  explainthisrepo init
71
124
  # or npx explainthisrepo init
72
125
  ```
126
+
73
127
  > For details about how initialization works, see [INIT.md](INIT.md).
74
128
 
75
- ## Installation
76
129
 
77
- ### Option 1: install with pip (recommended):
130
+ ## Flag options
78
131
 
79
- Requirements: Python 3.9+
132
+ - (no flag) → Full repository explanation written to `EXPLAIN.md`
80
133
 
81
- ```bash
82
- pip install explainthisrepo
83
- explainthisrepo owner/repo
84
- ```
134
+ - `--quick` → One-sentence summary
85
135
 
86
- Alternatively,
136
+ - `--simple` → Short, simplified explanation
87
137
 
88
- ```bash
89
- pipx install explainthisrepo
90
- explainthisrepo owner/repo
91
- ```
138
+ - `--detailed` → Deeper explanation including structure and architecture
92
139
 
93
- To install support for specific models:
140
+ - `--stack` Tech stack breakdown from repo signals
94
141
 
95
- ```bash
96
- pip install explainthisrepo[gemini]
97
- pip install explainthisrepo[openai]
98
- ```
142
+ - `--version` → Check installed CLI version
99
143
 
100
- ### Option 2: Install with npm
144
+ - `--help` Show usage guide
101
145
 
102
- Install globally and use forever:
103
- ```bash
104
- npm install -g explainthisrepo
105
- explainthisrepo owner/repo
106
- # or: npx explainthisrepo owner/repo
107
- ```
146
+ - `--doctor` → Check system health and active model diagnostics
108
147
 
109
- Replace `owner/repo` with the GitHub repository identifier (e.g., `facebook/react`).
148
+ - `--llm` Override provider selection
110
149
 
111
- ---
150
+ - `--token/-t` → Set GitHub token for private repositories and to avoid rate limits
112
151
 
113
152
  ## Flexible Repository and Local Directory Input
114
153
 
115
- Accepts various formats for repository input, full GitHub URLs, issue links, and SSH clone links.
154
+ Accepts various formats for repository input, full GitHub URLs (with or without https), `owner/repo` format, issue links, query strings, and SSH clone links
116
155
 
117
156
  ```bash
118
157
  explainthisrepo https://github.com/owner/repo
@@ -126,45 +165,47 @@ explainthisrepo ./path/to/directory
126
165
 
127
166
  All inputs are normalized internally to `owner/repo`.
128
167
 
129
- ---
130
-
131
168
  ## Model selection
132
169
 
133
- The `--llm` flag to selects which configured model backend to use for the current command
170
+ The `--llm` flag selects which configured model backend to use for the current command.
134
171
 
135
172
  ```bash
136
173
  explainthisrepo owner/repo --llm gemini
137
174
  explainthisrepo owner/repo --llm openai
138
175
  explainthisrepo owner/repo --llm ollama
176
+ explainthisrepo owner/repo --llm anthropic
177
+ explainthisrepo owner/repo --llm openrouter
178
+ explainthisrepo owner/repo --llm groq
139
179
  ```
140
180
 
141
181
  `--llm` works with all modes (``--quick``, ``--simple``, ``--detailed``).
142
182
 
143
- ## Usage
183
+ ## Command line usage
144
184
 
145
- ### Basic
185
+ ### Default
146
186
  Writes a full explanation to `EXPLAIN.md`:
147
187
 
148
188
  ```bash
149
189
  explainthisrepo owner/repo
190
+ #e.g. explainthisrepo vercel/next.js
150
191
  ```
151
- Example:
152
- ```bash
153
- explainthisrepo facebook/react
154
- ```
155
- ---
156
192
 
157
193
  ### Quick mode
158
194
 
159
195
  Prints a one-sentence summary to stdout:
160
-
161
196
  ```bash
162
197
  explainthisrepo owner/repo --quick
198
+ # explainthisrepo facebook/react --quick
163
199
  ```
164
- Example:
200
+
165
201
  ```bash
166
- explainthisrepo facebook/react --quick
202
+ $ explainthisrepo vercel/next.js --quick
203
+
204
+ Next.js is a React framework that provides server-side rendering,
205
+ file-based routing, API routes, and build tooling for fullstack
206
+ web applications.
167
207
  ```
208
+
168
209
  ![Quick Mode Output](assets/quick-command-output.png)
169
210
 
170
211
  ---
@@ -222,42 +263,41 @@ explainthisrepo . --stack
222
263
 
223
264
  When analyzing a local directory:
224
265
  - Repository structure is derived from the filesystem
225
- - High signal files (Configs, README, entrypoints) are extracted locally
266
+ - High signal files (configs, entrypoints, manifests) are extracted locally
226
267
  - No GitHub APIs calls are made
227
268
  - All prompts and outputs remain identical
228
269
 
229
270
  This allows analysis of projects directly from the local filesystem, without requiring a GitHub repository.
230
271
 
231
- ### Version
272
+ ### For private repositories, use the --token/-t option.
232
273
 
233
- Print the installed CLI version:
274
+ Setting a `GITHUB_TOKEN` environment variable is recommended to avoid rate limits when analyzing public repositories.
234
275
 
235
276
  ```bash
236
- explainthisrepo --version
277
+ export GITHUB_TOKEN=yourActualTokenHere
237
278
  ```
238
279
 
239
- ---
280
+ ### Version
240
281
 
241
- ### Diagnostics
242
- Use the `--doctor` flag to verify the environment, network connectivity, and API key configuration:
282
+ Check the installed CLI version:
243
283
 
244
284
  ```bash
245
- explainthisrepo --doctor
285
+ explainthisrepo --version
246
286
  ```
247
287
 
248
- ### Set GitHub Token
288
+ ### Diagnostics
249
289
 
250
- Setting a `GITHUB_TOKEN` environment variable is recommended to avoid rate limits when analyzing public repositories.
290
+ Use the `--doctor` flag to verify the environment, network connectivity, and API key configuration:
251
291
 
252
292
  ```bash
253
- export GITHUB_TOKEN=yourActualTokenHere
293
+ explainthisrepo --doctor
254
294
  ```
255
295
 
256
296
  ## Termux (Android) install notes
257
297
 
258
298
  Termux has some environment limitations that can make `pip install explainthisrepo` fail to create the `explainthisrepo` command in `$PREFIX/bin`.
259
299
 
260
- ### Recommended install (Termux)
300
+ However, it's recommended you install using:
261
301
 
262
302
  ```bash
263
303
  pip install --user -U explainthisrepo
@@ -269,7 +309,7 @@ Make sure your user bin directory is on your PATH:
269
309
  export PATH="$HOME/.local/bin:$PATH"
270
310
  ```
271
311
 
272
- > Tip: Add the PATH export to your ~/.bashrc or ~/.zshrc so it persists.
312
+ > Tip: Add the PATH export to your `~/.bashrc` or `~/.zshrc` so it persists.
273
313
 
274
314
  ### Alternative (No PATH changes)
275
315
 
@@ -287,6 +327,18 @@ Installing Gemini support may require building Rust-based dependencies on Androi
287
327
  pip install --user -U "explainthisrepo[gemini]"
288
328
  ```
289
329
 
330
+ For mobile environments like Termux where compiling Python dependencies can be slow,
331
+ you can also run ExplainThisRepo using the Node.js version:
332
+
333
+ ```bash
334
+ npx explainthisrepo owner/repo
335
+ ```
336
+
337
+ ## Special Thanks
338
+
339
+ - @Spectra010s for implementing the Node.js version of ExplainThisRepo and improving installation support for mobile environments like Termux
340
+ - @HalxDocs for implementing the `--detailed` mode for deeper architectural explanations
341
+
290
342
  ## Contributions
291
343
 
292
344
  Contributions are welcome!
@@ -296,14 +348,10 @@ If you find a bug, have an idea, or want to improve the tool:
296
348
  - Open an issue for bugs/feature requests
297
349
  - Or submit a pull request for fixes/improvements
298
350
 
299
- ---
300
-
301
351
  ## License
302
352
 
303
353
  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
304
354
 
305
- ---
306
-
307
355
  ## Author
308
356
 
309
357
  Caleb Wodi
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "explainthisrepo",
3
- "version": "0.9.1",
4
- "description": "CLI that generates plain-English explanations of any codebase",
3
+ "version": "0.9.2",
4
+ "description": "The fastest way to understand any codebase in plain English. Not blind AI summarization",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "author": "Caleb Wodi <calebwodi33@gmail.com>",
@@ -27,7 +27,9 @@
27
27
  "developer-tools"
28
28
  ],
29
29
  "bin": {
30
- "explainthisrepo": "dist/cli.js"
30
+ "explainthisrepo": "dist/cli.js",
31
+ "explain-this-repo": "dist/cli.js",
32
+ "etr": "dist/cli.js"
31
33
  },
32
34
  "files": [
33
35
  "dist",