readme-cli-gen 1.0.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/LICENSE +21 -0
- package/README.md +128 -0
- package/package.json +38 -0
- package/templates/default.md +141 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Beatriz Salles
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h3 align="center">readme-cli-gen</h3>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/3salles/readme-cli-gen">
|
|
7
|
+
<img src="https://img.shields.io/github/repo-size/3salles/readme-cli-gen?style=for-the-badge" alt="GitHub repo size">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://github.com/3salles/readme-cli-gen">
|
|
10
|
+
<img src="https://img.shields.io/github/languages/count/3salles/readme-cli-gen?style=for-the-badge" alt="GitHub language count">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://github.com/3salles/readme-cli-gen">
|
|
13
|
+
<img src="https://img.shields.io/github/forks/3salles/readme-cli-gen?style=for-the-badge" alt="GitHub forks">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/3salles/readme-cli-gen/issues">
|
|
16
|
+
<img src="https://img.shields.io/github/issues/3salles/readme-cli-gen?style=for-the-badge" alt="GitHub open issues">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://github.com/3salles/readme-cli-gen/pulls">
|
|
19
|
+
<img src="https://img.shields.io/github/issues-pr/3salles/readme-cli-gen?style=for-the-badge" alt="GitHub open pull requests">
|
|
20
|
+
</a>
|
|
21
|
+
<img src="https://img.shields.io/static/v1?label=License&message=MIT&color=0000ff&style=for-the-badge" alt="License">
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
## 🗂 Table of Contents
|
|
25
|
+
|
|
26
|
+
- [About the Project](#book-about-the-project)
|
|
27
|
+
- [Usage](#coffee-usage)
|
|
28
|
+
- [Technologies](#computer-technologies)
|
|
29
|
+
- [Installation](#bricks-installation)
|
|
30
|
+
- [Prerequisites](#construction-prerequisites)
|
|
31
|
+
- [Installing Dependencies](#construction-installing-dependencies)
|
|
32
|
+
- [Running](#arrow_forward-running)
|
|
33
|
+
- [Running Tests](#test_tube-running-tests)
|
|
34
|
+
- [Contributing](#handshake-contributing)
|
|
35
|
+
- [License](#page_facing_up-license)
|
|
36
|
+
- [Author](#technologist-author)
|
|
37
|
+
|
|
38
|
+
## :book: About The Project
|
|
39
|
+
|
|
40
|
+
`readme-cli-gen` is a CLI tool that generates README.md files by scanning your project's structure. It automatically detects technologies, configuration files, and scripts — then asks only for the information it couldn't find. Each section is optional and only suggested when the relevant files or scripts are present in your project.
|
|
41
|
+
|
|
42
|
+
### :coffee: Usage
|
|
43
|
+
|
|
44
|
+
The easiest way to use `readme-cli-gen` is via `npx`, with no installation needed:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
$ npx readme-cli-gen
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To generate a README for a specific project, pass the path as an argument:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
$ npx readme-cli-gen /path/to/your/project
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To use a custom template:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
$ npx readme-cli-gen /path/to/your/project /path/to/template.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The tool scans your project and suggests sections based on what it finds:
|
|
63
|
+
|
|
64
|
+
| What it detects | Section suggested |
|
|
65
|
+
| ----------------------------------------------------- | --------------------- |
|
|
66
|
+
| `package.json` | Technologies |
|
|
67
|
+
| `.env.example` | Environment Variables |
|
|
68
|
+
| `Dockerfile` / `docker-compose.yml` | Docker |
|
|
69
|
+
| Test scripts (`test`, `vitest`, `jest`) or test files | Running Tests |
|
|
70
|
+
| `LICENSE` / `package.json` license field | License |
|
|
71
|
+
| `git config` / `remote.origin.url` | Author |
|
|
72
|
+
|
|
73
|
+
### :computer: Technologies
|
|
74
|
+
|
|
75
|
+
- [@clack/prompts](https://npmjs.com/package/@clack/prompts)
|
|
76
|
+
- [@types/node](https://npmjs.com/package/@types/node)
|
|
77
|
+
- [tsx](https://npmjs.com/package/tsx)
|
|
78
|
+
- [typescript](https://npmjs.com/package/typescript)
|
|
79
|
+
- [vitest](https://npmjs.com/package/vitest)
|
|
80
|
+
|
|
81
|
+
## :bricks: Installation
|
|
82
|
+
|
|
83
|
+
### :construction: Prerequisites
|
|
84
|
+
|
|
85
|
+
Clone this project repository:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
$ git clone https://github.com/3salles/readme-cli-gen.git
|
|
89
|
+
$ cd readme-cli-gen
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### :construction: Installing Dependencies
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
$ pnpm install
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### :arrow_forward: Running
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
$ pnpm dev
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### :test_tube: Running Tests
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
$ pnpm test
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## :handshake: Contributing
|
|
111
|
+
|
|
112
|
+
To contribute to readme-cli-gen, follow these steps:
|
|
113
|
+
|
|
114
|
+
1. Fork this repository.
|
|
115
|
+
2. Create a branch: `git checkout -b <branch_name>`.
|
|
116
|
+
3. Make your changes and commit: `git commit -m '<commit_message>'`
|
|
117
|
+
4. Push to the original branch: `git push origin readme-cli-gen/<local>`
|
|
118
|
+
5. Create a pull request.
|
|
119
|
+
|
|
120
|
+
See the GitHub docs on [how to create a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).
|
|
121
|
+
|
|
122
|
+
## :page_facing_up: License
|
|
123
|
+
|
|
124
|
+
This project uses [MIT](LICENSE) license.
|
|
125
|
+
|
|
126
|
+
## :technologist: Author
|
|
127
|
+
|
|
128
|
+
[Beatriz Salles](https://github.com/3salles)
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "readme-cli-gen",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI tool that automatically generates README.md files by reading your project's files and asking only for the missing information.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"readme-cli-gen": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsx src/index.ts",
|
|
13
|
+
"start": "tsx src/index.ts",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"templates"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"readme",
|
|
23
|
+
"generator",
|
|
24
|
+
"cli",
|
|
25
|
+
"markdown"
|
|
26
|
+
],
|
|
27
|
+
"author": "Beatriz Salles",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^25.3.5",
|
|
31
|
+
"tsx": "^4.21.0",
|
|
32
|
+
"typescript": "^5.9.3",
|
|
33
|
+
"vitest": "^4.0.18"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@clack/prompts": "^1.1.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h3 align="center">{{project_name}}</h3>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/{{github_user}}/{{project_name}}">
|
|
7
|
+
<img src="https://img.shields.io/github/repo-size/{{github_user}}/{{project_name}}?style=for-the-badge" alt="GitHub repo size">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://github.com/{{github_user}}/{{project_name}}">
|
|
10
|
+
<img src="https://img.shields.io/github/languages/count/{{github_user}}/{{project_name}}?style=for-the-badge" alt="GitHub language count">
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://github.com/{{github_user}}/{{project_name}}">
|
|
13
|
+
<img src="https://img.shields.io/github/forks/{{github_user}}/{{project_name}}?style=for-the-badge" alt="GitHub forks">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/{{github_user}}/{{project_name}}/issues">
|
|
16
|
+
<img src="https://img.shields.io/github/issues/{{github_user}}/{{project_name}}?style=for-the-badge" alt="GitHub open issues">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://github.com/{{github_user}}/{{project_name}}/pulls">
|
|
19
|
+
<img src="https://img.shields.io/github/issues-pr/{{github_user}}/{{project_name}}?style=for-the-badge" alt="GitHub open pull requests">
|
|
20
|
+
</a>
|
|
21
|
+
{{#if license_badge}}<img src="https://img.shields.io/static/v1?label=License&message={{license}}&color=0000ff&style=for-the-badge" alt="License">{{/if}}
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
## 🗂 Table of Contents
|
|
25
|
+
|
|
26
|
+
{{table_of_contents}}
|
|
27
|
+
|
|
28
|
+
## :book: About The Project
|
|
29
|
+
|
|
30
|
+
{{description}}
|
|
31
|
+
|
|
32
|
+
{{#if usage_command}}
|
|
33
|
+
|
|
34
|
+
### :coffee: Usage
|
|
35
|
+
|
|
36
|
+
To use {{project_name}}, run the following command:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
$ {{usage_command}}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
{{/if}}
|
|
43
|
+
|
|
44
|
+
### :computer: Technologies
|
|
45
|
+
|
|
46
|
+
{{tech_list}}
|
|
47
|
+
|
|
48
|
+
## :bricks: Installation
|
|
49
|
+
|
|
50
|
+
### :construction: Prerequisites
|
|
51
|
+
|
|
52
|
+
Clone this project repository:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
$ git clone https://github.com/{{github_user}}/{{project_name}}.git
|
|
56
|
+
$ cd {{project_name}}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### :construction: Installing Dependencies
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
$ npm install
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
{{#if env_vars}}
|
|
66
|
+
|
|
67
|
+
### :wrench: Environment Variables
|
|
68
|
+
|
|
69
|
+
Create a `.env` file with the following keys:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
{{env_vars}}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
{{/if}}
|
|
76
|
+
|
|
77
|
+
{{#if has_docker}}
|
|
78
|
+
|
|
79
|
+
### :whale: Running with Docker
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
$ docker build -t {{project_name}} .
|
|
83
|
+
$ docker run -d -p {{docker_port}}:{{docker_port}} {{project_name}}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
{{/if}}
|
|
87
|
+
|
|
88
|
+
{{#if run_command}}
|
|
89
|
+
|
|
90
|
+
### :arrow_forward: Running
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
$ {{run_command}}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
{{/if}}
|
|
97
|
+
|
|
98
|
+
{{#if test_command}}
|
|
99
|
+
|
|
100
|
+
### :test_tube: Running Tests
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
$ {{test_command}}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
{{/if}}
|
|
107
|
+
|
|
108
|
+
## :handshake: Contributing
|
|
109
|
+
|
|
110
|
+
To contribute to {{project_name}}, follow these steps:
|
|
111
|
+
|
|
112
|
+
1. Fork this repository.
|
|
113
|
+
2. Create a branch: `git checkout -b <branch_name>`.
|
|
114
|
+
3. Make your changes and commit: `git commit -m '<commit_message>'`
|
|
115
|
+
4. Push to the original branch: `git push origin {{project_name}}/<local>`
|
|
116
|
+
5. Create a pull request.
|
|
117
|
+
|
|
118
|
+
See the GitHub docs on [how to create a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).
|
|
119
|
+
|
|
120
|
+
{{#if contributors_table}}
|
|
121
|
+
|
|
122
|
+
## 🤝 Contributors
|
|
123
|
+
|
|
124
|
+
Thanks to the following people who contributed to this project:
|
|
125
|
+
|
|
126
|
+
{{contributors_table}}
|
|
127
|
+
{{/if}}
|
|
128
|
+
|
|
129
|
+
{{#if license}}
|
|
130
|
+
|
|
131
|
+
## :page_facing_up: License
|
|
132
|
+
|
|
133
|
+
This project uses [{{license}}](LICENSE) license.
|
|
134
|
+
{{/if}}
|
|
135
|
+
|
|
136
|
+
{{#if author}}
|
|
137
|
+
|
|
138
|
+
## :technologist: Author
|
|
139
|
+
|
|
140
|
+
[{{author}}](https://github.com/{{github_user}})
|
|
141
|
+
{{/if}}
|