@malikasadjaved/readme-ai 1.2.0 → 1.2.1

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 +406 -406
  2. package/package.json +128 -128
package/README.md CHANGED
@@ -1,406 +1,406 @@
1
- <div align="center">
2
-
3
- # readme-ai
4
-
5
- ### The #1 AI-Powered README Generator for Developers
6
-
7
- > Generate stunning, production-quality READMEs from any codebase in seconds — powered by Claude, GPT-4o, Gemini, or Ollama
8
-
9
- [![npm version](https://img.shields.io/npm/v/@malikasadjaved/readme-ai?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@malikasadjaved/readme-ai)
10
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](#)
11
- [![Node.js](https://img.shields.io/badge/Node.js-%E2%89%A518-5FA04E?style=for-the-badge&logo=nodedotjs&logoColor=white)](#)
12
- [![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](#license)
13
- [![Tests](https://img.shields.io/badge/Tests-186%20passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white)](#)
14
- [![Coverage](https://img.shields.io/badge/Coverage-76%25-yellow?style=for-the-badge)](#)
15
- [![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen?style=for-the-badge)](#contributing)
16
-
17
- **One command. Zero install. Beautiful READMEs.**
18
-
19
- ```bash
20
- npx @malikasadjaved/readme-ai
21
- ```
22
-
23
- [Quick Start](#-quick-start) · [Themes](#-themes) · [AI Providers](#-ai-providers) · [Plugins](#-plugins) · [CLI Options](#-cli-options) · [GitHub Action](#-github-action) · [Contributing](#-contributing)
24
-
25
- </div>
26
-
27
- ---
28
-
29
- <!-- SEO: readme generator, ai readme, auto documentation, markdown generator, github readme, readme template, ai documentation tool, code documentation, auto readme, readme maker, project documentation, npx readme, readme-ai, claude readme, gpt readme, gemini readme, ollama readme, mermaid diagram generator, badge generator, open source documentation, developer tools 2026, best readme generator, ai developer tools, LLM documentation, automated documentation -->
30
-
31
- ## Overview
32
-
33
- **readme-ai** is the most powerful open-source AI README generator available. It reads your actual source code — not just directory names — and generates a complete, polished README with architecture diagrams, badges, install instructions, usage examples, and API docs.
34
-
35
- Point it at any local project or public GitHub repo and get a production-ready README in seconds.
36
-
37
- ### Why readme-ai?
38
-
39
- - **Deep code analysis** — parses actual source files, not just file trees
40
- - **10+ languages supported** — Node.js, Python, Rust, Go, Java (Gradle/Maven), Ruby, Swift, Dart/Flutter, and more
41
- - **Mermaid architecture diagrams** — auto-generated from your code structure
42
- - **Plugin system** — extend with custom analyzers and themes
43
- - **Works with any AI** — Claude, GPT-4o, Gemini, or fully local with Ollama (free)
44
- - **186 tests passing** — battle-tested and reliable
45
-
46
- ## Key Features
47
-
48
- | Feature | Description |
49
- |---------|-------------|
50
- | **Zero Install** | `npx @malikasadjaved/readme-ai` — works instantly, no setup |
51
- | **Deep Code Analysis** | Extracts functions, API endpoints, CLI commands, exports |
52
- | **Auto Mermaid Diagrams** | Architecture diagrams generated from code structure |
53
- | **5 Themes** | Default, Modern, Hacker, Minimal, Academic |
54
- | **4 AI Providers** | Claude, GPT-4o, Gemini Flash, Ollama (local/free) |
55
- | **Smart Badges** | Auto-detects language, frameworks, CI, Docker, license |
56
- | **GitHub URL Support** | Analyze any public repo: `github:user/repo` |
57
- | **GitHub Action** | Auto-regenerate README on every push |
58
- | **Plugin System** | Custom analyzers and themes via plugins |
59
- | **10+ Languages** | Node.js, Python, Rust, Go, Java, Ruby, Swift, Dart, and more |
60
- | **Project Config** | `.readmeairc.json` or `readme-ai.config.js` |
61
- | **API Docs** | Auto-generated from exported functions and classes |
62
-
63
- ## Quick Start
64
-
65
- ```bash
66
- # Generate README for current directory
67
- npx @malikasadjaved/readme-ai
68
-
69
- # Point at a local project
70
- npx @malikasadjaved/readme-ai ./my-project
71
-
72
- # Point at a GitHub repo
73
- npx @malikasadjaved/readme-ai github:expressjs/express
74
-
75
- # Interactive mode (guided prompts)
76
- npx @malikasadjaved/readme-ai --interactive
77
- ```
78
-
79
- ### Install globally (optional)
80
-
81
- ```bash
82
- npm install -g @malikasadjaved/readme-ai
83
- readme-ai ./my-project
84
- ```
85
-
86
- ## Demo
87
-
88
- <div align="center">
89
- <img src="demo/demo.gif" alt="readme-ai demo — AI README generator in action" width="800">
90
- <p><em>Generating a full README in seconds — with architecture diagrams, badges, and more.</em></p>
91
- </div>
92
-
93
- ## Comparison
94
-
95
- | Feature | readme-ai | eli64s/readme-ai | readmeX |
96
- |---------|:---------:|:----------------:|:-------:|
97
- | npx support (zero install) | **Yes** | No | No |
98
- | Mermaid architecture diagrams | **Yes** | No | No |
99
- | Plugin system | **Yes** | No | No |
100
- | GitHub URL analysis | **Yes** | Yes | Yes |
101
- | Multiple themes | **5** | 3 | No |
102
- | GitHub Action template | **Yes** | No | No |
103
- | API docs from code | **Yes** | No | No |
104
- | Badge auto-generation | **Yes** | Yes | Partial |
105
- | Local AI (Ollama) | **Yes** | No | No |
106
- | 10+ language support | **Yes** | Partial | No |
107
- | Pre-commit hooks | **Yes** | No | No |
108
-
109
- ## Themes
110
-
111
- ### Default — Clean & Professional
112
- The standard theme with a centered header, emoji section headers, and shields.io badges.
113
-
114
- ### Modern — Emoji-rich & Colorful
115
- Heavy use of emojis, colorful badge rows, and visual separators for maximum impact.
116
-
117
- ### Hacker — Terminal Aesthetic
118
- ASCII art header, monospace styling, `>` prefixed descriptions — for the terminal lovers.
119
-
120
- ### Minimal — Pure Markdown
121
- No emojis, no badges, no frills. Just clean, readable markdown.
122
-
123
- ### Academic — Formal & Structured
124
- Numbered sections, citation-style references, formal language. Great for research projects.
125
-
126
- ```bash
127
- # Use a specific theme
128
- npx @malikasadjaved/readme-ai --theme modern
129
- npx @malikasadjaved/readme-ai --theme hacker
130
- npx @malikasadjaved/readme-ai --theme minimal
131
- npx @malikasadjaved/readme-ai --theme academic
132
- ```
133
-
134
- > Want a custom theme? Use the [plugin system](#-plugins) to create your own!
135
-
136
- ## AI Providers
137
-
138
- ### Claude (Anthropic) — Default
139
-
140
- ```bash
141
- export ANTHROPIC_API_KEY=sk-ant-...
142
- npx @malikasadjaved/readme-ai
143
- ```
144
-
145
- ### GPT-4o-mini (OpenAI)
146
-
147
- ```bash
148
- export OPENAI_API_KEY=sk-...
149
- npx @malikasadjaved/readme-ai --provider openai
150
- ```
151
-
152
- ### Gemini Flash (Google)
153
-
154
- ```bash
155
- export GEMINI_API_KEY=...
156
- npx @malikasadjaved/readme-ai --provider gemini
157
- ```
158
-
159
- ### Ollama (Local, Free, Private)
160
-
161
- ```bash
162
- # Make sure Ollama is running locally
163
- npx @malikasadjaved/readme-ai --provider ollama
164
- npx @malikasadjaved/readme-ai --provider ollama --model llama3.1
165
- ```
166
-
167
- ## CLI Options
168
-
169
- ```
170
- Usage: readme-ai [repo] [options]
171
-
172
- Arguments:
173
- repo Local path or GitHub URL (github:user/repo)
174
-
175
- Options:
176
- -V, --version Output the version number
177
- -o, --output <file> Output file path (default: "README.md")
178
- -p, --provider <name> AI provider: anthropic | openai | gemini | ollama (default: "anthropic")
179
- -m, --model <name> Model name (depends on provider)
180
- -t, --theme <name> Theme: default | minimal | hacker | modern | academic (default: "default")
181
- --no-diagram Skip Mermaid architecture diagram
182
- --no-badges Skip badge generation
183
- --no-api-docs Skip API documentation section
184
- --interactive Run in interactive mode
185
- --action Generate a GitHub Action for auto-updating README
186
- --overwrite Overwrite existing README without asking
187
- --dry-run Print README to stdout instead of writing to file
188
- -h, --help Display help for command
189
- ```
190
-
191
- ### Examples
192
-
193
- ```bash
194
- # Generate with Modern theme using OpenAI
195
- npx @malikasadjaved/readme-ai ./my-app --provider openai --theme modern
196
-
197
- # Dry run (preview without writing)
198
- npx @malikasadjaved/readme-ai --dry-run
199
-
200
- # Generate without diagram and badges
201
- npx @malikasadjaved/readme-ai --no-diagram --no-badges
202
-
203
- # Overwrite existing README and generate GitHub Action
204
- npx @malikasadjaved/readme-ai --overwrite --action
205
-
206
- # Analyze a remote GitHub repository
207
- npx @malikasadjaved/readme-ai github:tiangolo/fastapi --theme academic
208
- ```
209
-
210
- ## Plugins
211
-
212
- readme-ai supports a **plugin system** for custom analyzers and themes. Plugins can add extra README sections, badges, or entirely new visual themes.
213
-
214
- ```js
215
- // readme-ai.config.js
216
- export default {
217
- plugins: [
218
- './my-local-plugin.js', // local plugin file
219
- 'readme-ai-plugin-example', // npm package
220
- ],
221
- };
222
- ```
223
-
224
- Packages named `readme-ai-plugin-*` in `node_modules` are auto-discovered. See [CONTRIBUTING.md](CONTRIBUTING.md#writing-plugins) for the full plugin authoring guide.
225
-
226
- ### Plugin Example
227
-
228
- ```ts
229
- const myPlugin = {
230
- name: 'my-plugin',
231
- analyzers: [{
232
- name: 'security-scanner',
233
- analyze: async ({ scan, codeAnalysis, deps }) => ({
234
- sections: { 'Security': 'No vulnerabilities found.' },
235
- badges: [{ label: 'security', message: 'passing', color: 'green' }],
236
- }),
237
- }],
238
- themes: [{
239
- name: 'corporate',
240
- render: (data) => `# ${data.projectName}\n\n${data.description}`,
241
- }],
242
- };
243
- export default myPlugin;
244
- ```
245
-
246
- ## GitHub Action
247
-
248
- Auto-regenerate your README on every push to main:
249
-
250
- ```bash
251
- # Generate the action file automatically
252
- npx @malikasadjaved/readme-ai --action
253
- ```
254
-
255
- Or manually create `.github/workflows/readme-update.yml`:
256
-
257
- ```yaml
258
- name: Update README
259
-
260
- on:
261
- push:
262
- branches: [main, master]
263
- paths-ignore:
264
- - 'README.md'
265
-
266
- jobs:
267
- update-readme:
268
- runs-on: ubuntu-latest
269
- permissions:
270
- contents: write
271
-
272
- steps:
273
- - uses: actions/checkout@v4
274
-
275
- - uses: actions/setup-node@v4
276
- with:
277
- node-version: '20'
278
-
279
- - name: Generate README
280
- run: npx @malikasadjaved/readme-ai@latest --overwrite --no-interactive
281
- env:
282
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
283
-
284
- - name: Commit updated README
285
- uses: stefanzweifel/git-auto-commit-action@v5
286
- with:
287
- commit_message: 'docs: auto-update README [skip ci]'
288
- file_pattern: README.md
289
- ```
290
-
291
- ## Supported Languages
292
-
293
- | Language | Package Manager | Install | Build | Test |
294
- |----------|----------------|---------|-------|------|
295
- | **Node.js** | npm / yarn / pnpm | `npm install` | `npm run build` | `npm test` |
296
- | **Python** | pip / pyproject | `pip install -r requirements.txt` | — | `pytest` |
297
- | **Rust** | cargo | `cargo build --release` | `cargo build` | `cargo test` |
298
- | **Go** | go modules | `go mod download` | `go build` | `go test ./...` |
299
- | **Java (Gradle)** | gradle | `gradle build` | `gradle build` | `gradle test` |
300
- | **Java (Maven)** | maven | `mvn install` | `mvn package` | `mvn test` |
301
- | **Ruby** | bundler | `bundle install` | — | `bundle exec rspec` |
302
- | **Swift** | Swift PM | `swift package resolve` | `swift build` | `swift test` |
303
- | **Dart/Flutter** | pub | `dart pub get` | `dart compile` | `dart test` |
304
-
305
- ## Architecture
306
-
307
- ```mermaid
308
- graph TD
309
- A[CLI Input] --> B[Command Parser]
310
- B --> C[Repo Fetcher]
311
- C -->|Local Path| D[File Scanner]
312
- C -->|GitHub URL| E[GitHub API]
313
- E --> D
314
- D --> F[Code Analyzer]
315
- D --> G[Dependency Analyzer]
316
- F --> H[AI Provider]
317
- G --> H
318
- H --> I[Section Generators]
319
- I --> J[Theme Engine]
320
- J --> K[Plugin System]
321
- K --> L[Markdown Writer]
322
- L --> M[README.md]
323
- ```
324
-
325
- ## Project Structure
326
-
327
- ```
328
- readme-ai/
329
- ├── src/
330
- │ ├── index.ts # CLI entry point
331
- │ ├── cli.ts # Interactive mode
332
- │ ├── config.ts # Configuration management
333
- │ ├── commands/
334
- │ │ └── generate.ts # Main generation pipeline
335
- │ ├── analyzers/
336
- │ │ ├── repo-fetcher.ts # Fetch from local or GitHub
337
- │ │ ├── file-scanner.ts # Scan and categorize files
338
- │ │ ├── code-analyzer.ts # Extract functions, endpoints, exports
339
- │ │ ├── dependency-analyzer.ts # 10+ language support
340
- │ │ ├── badge-generator.ts
341
- │ │ └── diagram-builder.ts
342
- │ ├── generators/
343
- │ │ ├── overview.ts # Project summary + features
344
- │ │ ├── install.ts # Install instructions
345
- │ │ ├── usage.ts # Usage examples + API docs
346
- │ │ ├── contributing.ts # Contributing guide
347
- │ │ └── changelog.ts # Changelog section
348
- │ ├── plugins/
349
- │ │ └── index.ts # Plugin loader and registry
350
- │ ├── providers/
351
- │ │ ├── anthropic.ts # Claude
352
- │ │ ├── openai.ts # GPT-4o
353
- │ │ ├── gemini.ts # Gemini Flash
354
- │ │ └── ollama.ts # Local Ollama
355
- │ ├── themes/
356
- │ │ ├── default.ts
357
- │ │ ├── modern.ts
358
- │ │ ├── hacker.ts
359
- │ │ ├── minimal.ts
360
- │ │ └── academic.ts
361
- │ └── utils/
362
- │ ├── file-utils.ts
363
- │ ├── github-api.ts
364
- │ ├── language-detector.ts
365
- │ ├── markdown-writer.ts
366
- │ ├── template-engine.ts
367
- │ └── cache.ts
368
- ├── tests/ # 186 tests (Vitest)
369
- ├── CONTRIBUTING.md # Full contributor guide
370
- ├── CHANGELOG.md
371
- └── LICENSE
372
- ```
373
-
374
- ## Contributing
375
-
376
- Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
377
-
378
- ```bash
379
- git clone https://github.com/malikasadjaved/readme-ai.git
380
- cd readme-ai
381
- npm install
382
- npm test # 186 tests
383
- npm run dev # development mode
384
- ```
385
-
386
- Pre-commit hooks with Husky + lint-staged ensure code quality on every commit.
387
-
388
- ## Star History
389
-
390
- If you find readme-ai useful, please give it a star! It helps others discover the project.
391
-
392
- ## License
393
-
394
- [MIT](LICENSE) — use it freely in personal and commercial projects.
395
-
396
- ---
397
-
398
- <div align="center">
399
-
400
- **Built by [Malik Asad Javed](https://github.com/malikasadjaved)**
401
-
402
- **[readme-ai](https://github.com/malikasadjaved/readme-ai)** — the best AI README generator for developers
403
-
404
- <sub>readme generator | ai documentation | markdown generator | github readme | developer tools | claude | openai | gemini | ollama | mermaid diagrams | open source</sub>
405
-
406
- </div>
1
+ <div align="center">
2
+
3
+ # readme-ai
4
+
5
+ ### The #1 AI-Powered README Generator for Developers
6
+
7
+ > Generate stunning, production-quality READMEs from any codebase in seconds — powered by Claude, GPT-4o, Gemini, or Ollama
8
+
9
+ [![npm version](https://img.shields.io/npm/v/@malikasadjaved/readme-ai?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@malikasadjaved/readme-ai)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](#)
11
+ [![Node.js](https://img.shields.io/badge/Node.js-%E2%89%A518-5FA04E?style=for-the-badge&logo=nodedotjs&logoColor=white)](#)
12
+ [![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](#license)
13
+ [![Tests](https://img.shields.io/badge/Tests-186%20passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white)](#)
14
+ [![Coverage](https://img.shields.io/badge/Coverage-76%25-yellow?style=for-the-badge)](#)
15
+ [![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen?style=for-the-badge)](#contributing)
16
+
17
+ **One command. Zero install. Beautiful READMEs.**
18
+
19
+ ```bash
20
+ npx @malikasadjaved/readme-ai
21
+ ```
22
+
23
+ [Quick Start](#-quick-start) · [Themes](#-themes) · [AI Providers](#-ai-providers) · [Plugins](#-plugins) · [CLI Options](#-cli-options) · [GitHub Action](#-github-action) · [Contributing](#-contributing)
24
+
25
+ </div>
26
+
27
+ ---
28
+
29
+ <!-- SEO: readme generator, ai readme, auto documentation, markdown generator, github readme, readme template, ai documentation tool, code documentation, auto readme, readme maker, project documentation, npx readme, readme-ai, claude readme, gpt readme, gemini readme, ollama readme, mermaid diagram generator, badge generator, open source documentation, developer tools 2026, best readme generator, ai developer tools, LLM documentation, automated documentation -->
30
+
31
+ ## Overview
32
+
33
+ **readme-ai** is the most powerful open-source AI README generator available. It reads your actual source code — not just directory names — and generates a complete, polished README with architecture diagrams, badges, install instructions, usage examples, and API docs.
34
+
35
+ Point it at any local project or public GitHub repo and get a production-ready README in seconds.
36
+
37
+ ### Why readme-ai?
38
+
39
+ - **Deep code analysis** — parses actual source files, not just file trees
40
+ - **10+ languages supported** — Node.js, Python, Rust, Go, Java (Gradle/Maven), Ruby, Swift, Dart/Flutter, and more
41
+ - **Mermaid architecture diagrams** — auto-generated from your code structure
42
+ - **Plugin system** — extend with custom analyzers and themes
43
+ - **Works with any AI** — Claude, GPT-4o, Gemini, or fully local with Ollama (free)
44
+ - **186 tests passing** — battle-tested and reliable
45
+
46
+ ## Key Features
47
+
48
+ | Feature | Description |
49
+ |---------|-------------|
50
+ | **Zero Install** | `npx @malikasadjaved/readme-ai` — works instantly, no setup |
51
+ | **Deep Code Analysis** | Extracts functions, API endpoints, CLI commands, exports |
52
+ | **Auto Mermaid Diagrams** | Architecture diagrams generated from code structure |
53
+ | **5 Themes** | Default, Modern, Hacker, Minimal, Academic |
54
+ | **4 AI Providers** | Claude, GPT-4o, Gemini Flash, Ollama (local/free) |
55
+ | **Smart Badges** | Auto-detects language, frameworks, CI, Docker, license |
56
+ | **GitHub URL Support** | Analyze any public repo: `github:user/repo` |
57
+ | **GitHub Action** | Auto-regenerate README on every push |
58
+ | **Plugin System** | Custom analyzers and themes via plugins |
59
+ | **10+ Languages** | Node.js, Python, Rust, Go, Java, Ruby, Swift, Dart, and more |
60
+ | **Project Config** | `.readmeairc.json` or `readme-ai.config.js` |
61
+ | **API Docs** | Auto-generated from exported functions and classes |
62
+
63
+ ## Quick Start
64
+
65
+ ```bash
66
+ # Generate README for current directory
67
+ npx @malikasadjaved/readme-ai
68
+
69
+ # Point at a local project
70
+ npx @malikasadjaved/readme-ai ./my-project
71
+
72
+ # Point at a GitHub repo
73
+ npx @malikasadjaved/readme-ai github:expressjs/express
74
+
75
+ # Interactive mode (guided prompts)
76
+ npx @malikasadjaved/readme-ai --interactive
77
+ ```
78
+
79
+ ### Install globally (optional)
80
+
81
+ ```bash
82
+ npm install -g @malikasadjaved/readme-ai
83
+ readme-ai ./my-project
84
+ ```
85
+
86
+ ## Demo
87
+
88
+ <div align="center">
89
+ <img src="demo/demo.gif" alt="readme-ai demo — AI README generator in action" width="800">
90
+ <p><em>Generating a full README in seconds — with architecture diagrams, badges, and more.</em></p>
91
+ </div>
92
+
93
+ ## Comparison
94
+
95
+ | Feature | readme-ai | eli64s/readme-ai | readmeX |
96
+ |---------|:---------:|:----------------:|:-------:|
97
+ | npx support (zero install) | **Yes** | No | No |
98
+ | Mermaid architecture diagrams | **Yes** | No | No |
99
+ | Plugin system | **Yes** | No | No |
100
+ | GitHub URL analysis | **Yes** | Yes | Yes |
101
+ | Multiple themes | **5** | 3 | No |
102
+ | GitHub Action template | **Yes** | No | No |
103
+ | API docs from code | **Yes** | No | No |
104
+ | Badge auto-generation | **Yes** | Yes | Partial |
105
+ | Local AI (Ollama) | **Yes** | No | No |
106
+ | 10+ language support | **Yes** | Partial | No |
107
+ | Pre-commit hooks | **Yes** | No | No |
108
+
109
+ ## Themes
110
+
111
+ ### Default — Clean & Professional
112
+ The standard theme with a centered header, emoji section headers, and shields.io badges.
113
+
114
+ ### Modern — Emoji-rich & Colorful
115
+ Heavy use of emojis, colorful badge rows, and visual separators for maximum impact.
116
+
117
+ ### Hacker — Terminal Aesthetic
118
+ ASCII art header, monospace styling, `>` prefixed descriptions — for the terminal lovers.
119
+
120
+ ### Minimal — Pure Markdown
121
+ No emojis, no badges, no frills. Just clean, readable markdown.
122
+
123
+ ### Academic — Formal & Structured
124
+ Numbered sections, citation-style references, formal language. Great for research projects.
125
+
126
+ ```bash
127
+ # Use a specific theme
128
+ npx @malikasadjaved/readme-ai --theme modern
129
+ npx @malikasadjaved/readme-ai --theme hacker
130
+ npx @malikasadjaved/readme-ai --theme minimal
131
+ npx @malikasadjaved/readme-ai --theme academic
132
+ ```
133
+
134
+ > Want a custom theme? Use the [plugin system](#-plugins) to create your own!
135
+
136
+ ## AI Providers
137
+
138
+ ### Claude (Anthropic) — Default
139
+
140
+ ```bash
141
+ export ANTHROPIC_API_KEY=sk-ant-...
142
+ npx @malikasadjaved/readme-ai
143
+ ```
144
+
145
+ ### GPT-4o-mini (OpenAI)
146
+
147
+ ```bash
148
+ export OPENAI_API_KEY=sk-...
149
+ npx @malikasadjaved/readme-ai --provider openai
150
+ ```
151
+
152
+ ### Gemini Flash (Google)
153
+
154
+ ```bash
155
+ export GEMINI_API_KEY=...
156
+ npx @malikasadjaved/readme-ai --provider gemini
157
+ ```
158
+
159
+ ### Ollama (Local, Free, Private)
160
+
161
+ ```bash
162
+ # Make sure Ollama is running locally
163
+ npx @malikasadjaved/readme-ai --provider ollama
164
+ npx @malikasadjaved/readme-ai --provider ollama --model llama3.1
165
+ ```
166
+
167
+ ## CLI Options
168
+
169
+ ```
170
+ Usage: readme-ai [repo] [options]
171
+
172
+ Arguments:
173
+ repo Local path or GitHub URL (github:user/repo)
174
+
175
+ Options:
176
+ -V, --version Output the version number
177
+ -o, --output <file> Output file path (default: "README.md")
178
+ -p, --provider <name> AI provider: anthropic | openai | gemini | ollama (default: "anthropic")
179
+ -m, --model <name> Model name (depends on provider)
180
+ -t, --theme <name> Theme: default | minimal | hacker | modern | academic (default: "default")
181
+ --no-diagram Skip Mermaid architecture diagram
182
+ --no-badges Skip badge generation
183
+ --no-api-docs Skip API documentation section
184
+ --interactive Run in interactive mode
185
+ --action Generate a GitHub Action for auto-updating README
186
+ --overwrite Overwrite existing README without asking
187
+ --dry-run Print README to stdout instead of writing to file
188
+ -h, --help Display help for command
189
+ ```
190
+
191
+ ### Examples
192
+
193
+ ```bash
194
+ # Generate with Modern theme using OpenAI
195
+ npx @malikasadjaved/readme-ai ./my-app --provider openai --theme modern
196
+
197
+ # Dry run (preview without writing)
198
+ npx @malikasadjaved/readme-ai --dry-run
199
+
200
+ # Generate without diagram and badges
201
+ npx @malikasadjaved/readme-ai --no-diagram --no-badges
202
+
203
+ # Overwrite existing README and generate GitHub Action
204
+ npx @malikasadjaved/readme-ai --overwrite --action
205
+
206
+ # Analyze a remote GitHub repository
207
+ npx @malikasadjaved/readme-ai github:tiangolo/fastapi --theme academic
208
+ ```
209
+
210
+ ## Plugins
211
+
212
+ readme-ai supports a **plugin system** for custom analyzers and themes. Plugins can add extra README sections, badges, or entirely new visual themes.
213
+
214
+ ```js
215
+ // readme-ai.config.js
216
+ export default {
217
+ plugins: [
218
+ './my-local-plugin.js', // local plugin file
219
+ 'readme-ai-plugin-example', // npm package
220
+ ],
221
+ };
222
+ ```
223
+
224
+ Packages named `readme-ai-plugin-*` in `node_modules` are auto-discovered. See [CONTRIBUTING.md](CONTRIBUTING.md#writing-plugins) for the full plugin authoring guide.
225
+
226
+ ### Plugin Example
227
+
228
+ ```ts
229
+ const myPlugin = {
230
+ name: 'my-plugin',
231
+ analyzers: [{
232
+ name: 'security-scanner',
233
+ analyze: async ({ scan, codeAnalysis, deps }) => ({
234
+ sections: { 'Security': 'No vulnerabilities found.' },
235
+ badges: [{ label: 'security', message: 'passing', color: 'green' }],
236
+ }),
237
+ }],
238
+ themes: [{
239
+ name: 'corporate',
240
+ render: (data) => `# ${data.projectName}\n\n${data.description}`,
241
+ }],
242
+ };
243
+ export default myPlugin;
244
+ ```
245
+
246
+ ## GitHub Action
247
+
248
+ Auto-regenerate your README on every push to main:
249
+
250
+ ```bash
251
+ # Generate the action file automatically
252
+ npx @malikasadjaved/readme-ai --action
253
+ ```
254
+
255
+ Or manually create `.github/workflows/readme-update.yml`:
256
+
257
+ ```yaml
258
+ name: Update README
259
+
260
+ on:
261
+ push:
262
+ branches: [main, master]
263
+ paths-ignore:
264
+ - 'README.md'
265
+
266
+ jobs:
267
+ update-readme:
268
+ runs-on: ubuntu-latest
269
+ permissions:
270
+ contents: write
271
+
272
+ steps:
273
+ - uses: actions/checkout@v4
274
+
275
+ - uses: actions/setup-node@v4
276
+ with:
277
+ node-version: '20'
278
+
279
+ - name: Generate README
280
+ run: npx @malikasadjaved/readme-ai@latest --overwrite --no-interactive
281
+ env:
282
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
283
+
284
+ - name: Commit updated README
285
+ uses: stefanzweifel/git-auto-commit-action@v5
286
+ with:
287
+ commit_message: 'docs: auto-update README [skip ci]'
288
+ file_pattern: README.md
289
+ ```
290
+
291
+ ## Supported Languages
292
+
293
+ | Language | Package Manager | Install | Build | Test |
294
+ |----------|----------------|---------|-------|------|
295
+ | **Node.js** | npm / yarn / pnpm | `npm install` | `npm run build` | `npm test` |
296
+ | **Python** | pip / pyproject | `pip install -r requirements.txt` | — | `pytest` |
297
+ | **Rust** | cargo | `cargo build --release` | `cargo build` | `cargo test` |
298
+ | **Go** | go modules | `go mod download` | `go build` | `go test ./...` |
299
+ | **Java (Gradle)** | gradle | `gradle build` | `gradle build` | `gradle test` |
300
+ | **Java (Maven)** | maven | `mvn install` | `mvn package` | `mvn test` |
301
+ | **Ruby** | bundler | `bundle install` | — | `bundle exec rspec` |
302
+ | **Swift** | Swift PM | `swift package resolve` | `swift build` | `swift test` |
303
+ | **Dart/Flutter** | pub | `dart pub get` | `dart compile` | `dart test` |
304
+
305
+ ## Architecture
306
+
307
+ ```mermaid
308
+ graph TD
309
+ A[CLI Input] --> B[Command Parser]
310
+ B --> C[Repo Fetcher]
311
+ C -->|Local Path| D[File Scanner]
312
+ C -->|GitHub URL| E[GitHub API]
313
+ E --> D
314
+ D --> F[Code Analyzer]
315
+ D --> G[Dependency Analyzer]
316
+ F --> H[AI Provider]
317
+ G --> H
318
+ H --> I[Section Generators]
319
+ I --> J[Theme Engine]
320
+ J --> K[Plugin System]
321
+ K --> L[Markdown Writer]
322
+ L --> M[README.md]
323
+ ```
324
+
325
+ ## Project Structure
326
+
327
+ ```
328
+ readme-ai/
329
+ ├── src/
330
+ │ ├── index.ts # CLI entry point
331
+ │ ├── cli.ts # Interactive mode
332
+ │ ├── config.ts # Configuration management
333
+ │ ├── commands/
334
+ │ │ └── generate.ts # Main generation pipeline
335
+ │ ├── analyzers/
336
+ │ │ ├── repo-fetcher.ts # Fetch from local or GitHub
337
+ │ │ ├── file-scanner.ts # Scan and categorize files
338
+ │ │ ├── code-analyzer.ts # Extract functions, endpoints, exports
339
+ │ │ ├── dependency-analyzer.ts # 10+ language support
340
+ │ │ ├── badge-generator.ts
341
+ │ │ └── diagram-builder.ts
342
+ │ ├── generators/
343
+ │ │ ├── overview.ts # Project summary + features
344
+ │ │ ├── install.ts # Install instructions
345
+ │ │ ├── usage.ts # Usage examples + API docs
346
+ │ │ ├── contributing.ts # Contributing guide
347
+ │ │ └── changelog.ts # Changelog section
348
+ │ ├── plugins/
349
+ │ │ └── index.ts # Plugin loader and registry
350
+ │ ├── providers/
351
+ │ │ ├── anthropic.ts # Claude
352
+ │ │ ├── openai.ts # GPT-4o
353
+ │ │ ├── gemini.ts # Gemini Flash
354
+ │ │ └── ollama.ts # Local Ollama
355
+ │ ├── themes/
356
+ │ │ ├── default.ts
357
+ │ │ ├── modern.ts
358
+ │ │ ├── hacker.ts
359
+ │ │ ├── minimal.ts
360
+ │ │ └── academic.ts
361
+ │ └── utils/
362
+ │ ├── file-utils.ts
363
+ │ ├── github-api.ts
364
+ │ ├── language-detector.ts
365
+ │ ├── markdown-writer.ts
366
+ │ ├── template-engine.ts
367
+ │ └── cache.ts
368
+ ├── tests/ # 186 tests (Vitest)
369
+ ├── CONTRIBUTING.md # Full contributor guide
370
+ ├── CHANGELOG.md
371
+ └── LICENSE
372
+ ```
373
+
374
+ ## Contributing
375
+
376
+ Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
377
+
378
+ ```bash
379
+ git clone https://github.com/malikasadjaved/readme-ai.git
380
+ cd readme-ai
381
+ npm install
382
+ npm test # 186 tests
383
+ npm run dev # development mode
384
+ ```
385
+
386
+ Pre-commit hooks with Husky + lint-staged ensure code quality on every commit.
387
+
388
+ ## Star History
389
+
390
+ If you find readme-ai useful, please give it a star! It helps others discover the project.
391
+
392
+ ## License
393
+
394
+ [MIT](LICENSE) — use it freely in personal and commercial projects.
395
+
396
+ ---
397
+
398
+ <div align="center">
399
+
400
+ **Built by [Malik Asad Javed](https://github.com/malikasadjaved)**
401
+
402
+ **[readme-ai](https://github.com/malikasadjaved/readme-ai)** — the best AI README generator for developers
403
+
404
+ <sub>readme generator | ai documentation | markdown generator | github readme | developer tools | claude | openai | gemini | ollama | mermaid diagrams | open source</sub>
405
+
406
+ </div>
package/package.json CHANGED
@@ -1,128 +1,128 @@
1
- {
2
- "name": "@malikasadjaved/readme-ai",
3
- "version": "1.2.0",
4
- "description": "The #1 AI-powered README generator — generate stunning docs from any codebase in seconds. Supports Claude, GPT-4o, Gemini, Ollama. 5 themes, Mermaid diagrams, badges, plugin system.",
5
- "keywords": [
6
- "readme",
7
- "readme-generator",
8
- "readme-ai",
9
- "ai-readme",
10
- "documentation",
11
- "documentation-generator",
12
- "ai-documentation",
13
- "auto-documentation",
14
- "markdown",
15
- "markdown-generator",
16
- "github",
17
- "github-readme",
18
- "github-action",
19
- "developer-tools",
20
- "devtools",
21
- "cli",
22
- "npx",
23
- "ai",
24
- "llm",
25
- "claude",
26
- "anthropic",
27
- "openai",
28
- "gpt",
29
- "gpt-4",
30
- "gpt-4o",
31
- "gemini",
32
- "google-ai",
33
- "ollama",
34
- "local-llm",
35
- "mermaid",
36
- "mermaid-diagrams",
37
- "architecture-diagram",
38
- "badges",
39
- "shields-io",
40
- "code-analysis",
41
- "code-documentation",
42
- "project-documentation",
43
- "auto-readme",
44
- "readme-maker",
45
- "readme-template",
46
- "typescript",
47
- "nodejs",
48
- "python",
49
- "rust",
50
- "golang",
51
- "java",
52
- "ruby",
53
- "swift",
54
- "dart",
55
- "flutter",
56
- "open-source",
57
- "plugin-system",
58
- "themes",
59
- "api-docs",
60
- "badge-generator",
61
- "diagram-generator",
62
- "contributing",
63
- "changelog"
64
- ],
65
- "homepage": "https://github.com/malikasadjaved/readme-ai",
66
- "repository": {
67
- "type": "git",
68
- "url": "git+https://github.com/malikasadjaved/readme-ai.git"
69
- },
70
- "license": "MIT",
71
- "type": "module",
72
- "bin": {
73
- "readme-ai": "dist/index.js"
74
- },
75
- "main": "./dist/index.js",
76
- "files": [
77
- "dist",
78
- "templates"
79
- ],
80
- "scripts": {
81
- "build": "tsc",
82
- "dev": "tsx src/index.ts",
83
- "test": "vitest run",
84
- "test:coverage": "vitest run --coverage",
85
- "lint": "eslint src/ tests/",
86
- "lint:fix": "eslint src/ tests/ --fix",
87
- "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
88
- "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
89
- "release": "npm run build && npm publish",
90
- "prepare": "husky"
91
- },
92
- "dependencies": {
93
- "@anthropic-ai/sdk": "^0.28.0",
94
- "@google/generative-ai": "^0.19.0",
95
- "@inquirer/prompts": "^6.0.0",
96
- "@octokit/rest": "^21.0.0",
97
- "chalk": "^5.3.0",
98
- "commander": "^12.0.0",
99
- "conf": "^13.0.0",
100
- "fast-glob": "^3.3.2",
101
- "openai": "^4.57.0",
102
- "ora": "^8.1.0",
103
- "simple-git": "^3.27.0"
104
- },
105
- "devDependencies": {
106
- "@eslint/js": "^10.0.1",
107
- "@types/node": "^22.0.0",
108
- "@vitest/coverage-v8": "^2.1.9",
109
- "eslint": "^10.2.0",
110
- "eslint-config-prettier": "^10.1.8",
111
- "husky": "^9.1.7",
112
- "lint-staged": "^16.4.0",
113
- "prettier": "^3.8.2",
114
- "tsx": "^4.19.0",
115
- "typescript": "^5.5.0",
116
- "typescript-eslint": "^8.58.1",
117
- "vitest": "^2.0.0"
118
- },
119
- "lint-staged": {
120
- "*.ts": [
121
- "eslint --fix",
122
- "prettier --write"
123
- ]
124
- },
125
- "engines": {
126
- "node": ">=18"
127
- }
128
- }
1
+ {
2
+ "name": "@malikasadjaved/readme-ai",
3
+ "version": "1.2.1",
4
+ "description": "The #1 AI-powered README generator — generate stunning docs from any codebase in seconds. Supports Claude, GPT-4o, Gemini, Ollama. 5 themes, Mermaid diagrams, badges, plugin system.",
5
+ "keywords": [
6
+ "readme",
7
+ "readme-generator",
8
+ "readme-ai",
9
+ "ai-readme",
10
+ "documentation",
11
+ "documentation-generator",
12
+ "ai-documentation",
13
+ "auto-documentation",
14
+ "markdown",
15
+ "markdown-generator",
16
+ "github",
17
+ "github-readme",
18
+ "github-action",
19
+ "developer-tools",
20
+ "devtools",
21
+ "cli",
22
+ "npx",
23
+ "ai",
24
+ "llm",
25
+ "claude",
26
+ "anthropic",
27
+ "openai",
28
+ "gpt",
29
+ "gpt-4",
30
+ "gpt-4o",
31
+ "gemini",
32
+ "google-ai",
33
+ "ollama",
34
+ "local-llm",
35
+ "mermaid",
36
+ "mermaid-diagrams",
37
+ "architecture-diagram",
38
+ "badges",
39
+ "shields-io",
40
+ "code-analysis",
41
+ "code-documentation",
42
+ "project-documentation",
43
+ "auto-readme",
44
+ "readme-maker",
45
+ "readme-template",
46
+ "typescript",
47
+ "nodejs",
48
+ "python",
49
+ "rust",
50
+ "golang",
51
+ "java",
52
+ "ruby",
53
+ "swift",
54
+ "dart",
55
+ "flutter",
56
+ "open-source",
57
+ "plugin-system",
58
+ "themes",
59
+ "api-docs",
60
+ "badge-generator",
61
+ "diagram-generator",
62
+ "contributing",
63
+ "changelog"
64
+ ],
65
+ "homepage": "https://github.com/Malikasadjaved/readme-ai",
66
+ "repository": {
67
+ "type": "git",
68
+ "url": "git+https://github.com/Malikasadjaved/readme-ai.git"
69
+ },
70
+ "license": "MIT",
71
+ "type": "module",
72
+ "bin": {
73
+ "readme-ai": "dist/index.js"
74
+ },
75
+ "main": "./dist/index.js",
76
+ "files": [
77
+ "dist",
78
+ "templates"
79
+ ],
80
+ "scripts": {
81
+ "build": "tsc",
82
+ "dev": "tsx src/index.ts",
83
+ "test": "vitest run",
84
+ "test:coverage": "vitest run --coverage",
85
+ "lint": "eslint src/ tests/",
86
+ "lint:fix": "eslint src/ tests/ --fix",
87
+ "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
88
+ "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
89
+ "release": "npm run build && npm publish",
90
+ "prepare": "husky"
91
+ },
92
+ "dependencies": {
93
+ "@anthropic-ai/sdk": "^0.28.0",
94
+ "@google/generative-ai": "^0.19.0",
95
+ "@inquirer/prompts": "^6.0.0",
96
+ "@octokit/rest": "^21.0.0",
97
+ "chalk": "^5.3.0",
98
+ "commander": "^12.0.0",
99
+ "conf": "^13.0.0",
100
+ "fast-glob": "^3.3.2",
101
+ "openai": "^4.57.0",
102
+ "ora": "^8.1.0",
103
+ "simple-git": "^3.27.0"
104
+ },
105
+ "devDependencies": {
106
+ "@eslint/js": "^10.0.1",
107
+ "@types/node": "^22.0.0",
108
+ "@vitest/coverage-v8": "^2.1.9",
109
+ "eslint": "^10.2.0",
110
+ "eslint-config-prettier": "^10.1.8",
111
+ "husky": "^9.1.7",
112
+ "lint-staged": "^16.4.0",
113
+ "prettier": "^3.8.2",
114
+ "tsx": "^4.19.0",
115
+ "typescript": "^5.5.0",
116
+ "typescript-eslint": "^8.58.1",
117
+ "vitest": "^2.0.0"
118
+ },
119
+ "lint-staged": {
120
+ "*.ts": [
121
+ "eslint --fix",
122
+ "prettier --write"
123
+ ]
124
+ },
125
+ "engines": {
126
+ "node": ">=18"
127
+ }
128
+ }