setup-git-repo 1.0.22 → 1.0.24

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
@@ -9,6 +9,15 @@
9
9
  <a href="https://www.npmjs.com/package/setup-git-repo"><img src="https://img.shields.io/npm/types/setup-git-repo" alt="TypeScript types" /></a>
10
10
  <a href="https://packagephobia.com/result?p=setup-git-repo"><img src="https://packagephobia.com/badge?p=setup-git-repo" alt="Install size" /></a>
11
11
  <a href="https://app.codecov.io/gh/OpenSourceAGI/dev-tools-starter-agent/flags"><img src="https://img.shields.io/codecov/c/github/OpenSourceAGI/dev-tools-starter-agent?flag=setup-git-repo&label=setup-git-repo%20coverage&logo=codecov&logoColor=white" alt="Coverage" /></a>
12
+ <br />
13
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/stargazers"><img src="https://img.shields.io/github/stars/OpenSourceAGI/dev-tools-starter-agent" alt="GitHub Stars" /></a>
14
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/issues"><img src="https://img.shields.io/github/issues/OpenSourceAGI/dev-tools-starter-agent?logo=github" alt="GitHub Issues" /></a>
15
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/pulls"><img src="https://img.shields.io/github/issues-pr/OpenSourceAGI/dev-tools-starter-agent?logo=github&label=PRs" alt="Open Pull Requests" /></a>
16
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OpenSourceAGI/dev-tools-starter-agent?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
17
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions"><img src="https://img.shields.io/github/discussions/OpenSourceAGI/dev-tools-starter-agent" alt="GitHub Discussions" /></a>
18
+ <a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/commits/master/"><img src="https://img.shields.io/github/last-commit/OpenSourceAGI/dev-tools-starter-agent.svg" alt="GitHub last commit" /></a>
19
+ <br />
20
+ <img src="https://img.shields.io/badge/Bun-14151A?logo=bun&logoColor=white" alt="Bun" /> <img src="https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=white" alt="Vitest" />
12
21
  </p>
13
22
  <!-- template-git-repo:badges:end -->
14
23
 
@@ -69,7 +78,7 @@ rather than shipped pointing at a placeholder:
69
78
  | --- | --- |
70
79
  | `--package <name>` | npm version + monthly downloads |
71
80
  | `--doi <10.5281/zenodo.N>` | Zenodo DOI |
72
- | `--docs <url>` / `--api <url>` / `--youtube <url>` | link badges |
81
+ | `--website <url>` / `--docs <url>` / `--api <url>` / `--youtube <url>` | link badges |
73
82
  | `--uptime <page-id>` | UptimeRobot status page |
74
83
  | `--discord-id <id>` + `--discord-invite <url>` | Discord (both required) |
75
84
 
@@ -41,6 +41,7 @@ const FLAGS = {
41
41
  description: "DESCRIPTION",
42
42
  package: "PACKAGE",
43
43
  doi: "DOI",
44
+ website: "WEBSITE_URL",
44
45
  docs: "DOCS_URL",
45
46
  api: "API_URL",
46
47
  youtube: "YOUTUBE_URL",
@@ -119,6 +120,7 @@ ${bold("Optional badges")} ${dim("(a badge whose value is omitted is left out of
119
120
 
120
121
  --package <name> npm package, for the version + downloads badges
121
122
  --doi <10.5281/zenodo.N> Zenodo DOI
123
+ --website <url> Live app link
122
124
  --docs <url> Documentation link
123
125
  --api <url> API reference link
124
126
  --youtube <url> Demo video link
@@ -196,6 +198,7 @@ async function main() {
196
198
  console.log(`\n${bold(" Optional badges")} ${dim("— press Enter to leave one out")}`);
197
199
  values.PACKAGE = await prompt(rl, "npm package name", values.PACKAGE);
198
200
  values.DOI = await prompt(rl, "Zenodo DOI", values.DOI);
201
+ values.WEBSITE_URL = await prompt(rl, "Live app URL", values.WEBSITE_URL);
199
202
  values.DOCS_URL = await prompt(rl, "Docs URL", values.DOCS_URL);
200
203
  values.API_URL = await prompt(rl, "API URL", values.API_URL);
201
204
  values.YOUTUBE_URL = await prompt(rl, "YouTube URL", values.YOUTUBE_URL);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "setup-git-repo",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "One command to set up a GitHub repo: Turborepo, CI workflows, README badges, and the docs for each",
5
5
  "type": "module",
6
6
  "bin": {
package/src/template.mjs CHANGED
@@ -11,6 +11,7 @@ import { join, relative, sep } from "node:path";
11
11
  */
12
12
  export const OPTIONAL_BADGES = {
13
13
  doi: ["DOI"],
14
+ website: ["WEBSITE_URL"],
14
15
  docs: ["DOCS_URL"],
15
16
  api: ["API_URL"],
16
17
  youtube: ["YOUTUBE_URL"],
@@ -1,28 +1,44 @@
1
1
  <p align="center">
2
2
  <!-- badge:doi --><a href="https://doi.org/{{DOI}}"><img src="https://zenodo.org/badge/DOI/{{DOI}}.svg" alt="DOI" /></a>
3
3
  <a href="https://deepwiki.com/{{OWNER}}/{{REPO}}"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" /></a>
4
+ <!-- badge:website --><a href="{{WEBSITE_URL}}"><img height="20px" src="https://img.shields.io/badge/App-blueviolet?style=for-the-badge&logo=googlechrome&logoColor=white" alt="Website" /></a>
4
5
  <!-- badge:docs --><a href="{{DOCS_URL}}"><img src="https://img.shields.io/badge/Docs-blue?logo=ReadTheDocs&logoColor=white" alt="Documentation" /></a>
5
6
  <!-- badge:api --><a href="{{API_URL}}"><img src="https://img.shields.io/badge/API-blue?logo=fastapi&logoColor=white" alt="API" /></a>
6
7
  <!-- badge:youtube --><a href="{{YOUTUBE_URL}}"><img height="20px" src="https://img.shields.io/badge/YouTube-red?style=for-the-badge&logo=youtube&logoColor=white" alt="YouTube" /></a>
7
8
  <a href="https://deploy.workers.cloudflare.com/?url=https://github.com/{{OWNER}}/{{REPO}}"><img height="24px" src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare Workers" /></a>
8
- <a href="https://github.com/{{OWNER}}/{{REPO}}/stargazers"><img src="https://img.shields.io/github/stars/{{OWNER}}/{{REPO}}" alt="GitHub Stars" /></a>
9
+ <a href="https://codespaces.new/{{OWNER}}/{{REPO}}"><img height="20px" src="https://github.com/codespaces/badge.svg" alt="Open in GitHub Codespaces" /></a>
9
10
  <br />
11
+ <!-- badge:npm --><a href="https://www.npmjs.com/package/{{PACKAGE}}"><img src="https://img.shields.io/npm/v/{{PACKAGE}}.svg" alt="npm version" /></a>
10
12
  <!-- badge:npm --><a href="https://www.npmjs.com/package/{{PACKAGE}}"><img src="https://img.shields.io/npm/dm/{{PACKAGE}}.svg" alt="NPM Monthly Downloads" /></a>
13
+ <!-- badge:npm --><a href="https://www.npmjs.com/package/{{PACKAGE}}"><img src="https://img.shields.io/npm/dt/{{PACKAGE}}.svg" alt="NPM Total Downloads" /></a>
11
14
  <a href="https://codecov.io/gh/{{OWNER}}/{{REPO}}"><img src="https://codecov.io/gh/{{OWNER}}/{{REPO}}/graph/badge.svg" alt="Coverage" /></a>
12
- <a href="https://github.com/{{OWNER}}/{{REPO}}/graphs/contributors"><img src="https://img.shields.io/github/commit-activity/m/{{OWNER}}/{{REPO}}" alt="Commit Activity" /></a>
13
- <a href="https://github.com/{{OWNER}}/{{REPO}}/commits/{{DEFAULT_BRANCH}}/"><img src="https://img.shields.io/github/last-commit/{{OWNER}}/{{REPO}}.svg" alt="Last Commit" /></a>
14
15
  <a href="https://github.com/{{OWNER}}/{{REPO}}/actions/workflows/tests.yml"><img src="https://github.com/{{OWNER}}/{{REPO}}/actions/workflows/tests.yml/badge.svg?branch={{DEFAULT_BRANCH}}" alt="Tests" /></a>
15
- <br />
16
16
  <!-- badge:uptime --><a href="https://stats.uptimerobot.com/{{UPTIME_ID}}"><img src="https://img.shields.io/badge/Uptime-Status-brightgreen?logo=uptimerobot&logoColor=white" alt="Uptime Status" /></a>
17
- <!-- badge:npm --><a href="https://www.npmjs.com/package/{{PACKAGE}}"><img src="https://img.shields.io/npm/v/{{PACKAGE}}.svg" alt="npm version" /></a>
17
+ <br />
18
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/stargazers"><img src="https://img.shields.io/github/stars/{{OWNER}}/{{REPO}}" alt="GitHub Stars" /></a>
19
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/forks"><img src="https://img.shields.io/github/forks/{{OWNER}}/{{REPO}}" alt="GitHub Forks" /></a>
20
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/graphs/contributors"><img src="https://img.shields.io/github/contributors/{{OWNER}}/{{REPO}}" alt="Contributors" /></a>
21
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/issues"><img src="https://img.shields.io/github/issues/{{OWNER}}/{{REPO}}?logo=github" alt="GitHub Issues" /></a>
22
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/pulls"><img src="https://img.shields.io/github/issues-pr/{{OWNER}}/{{REPO}}?logo=github&label=PRs" alt="Open Pull Requests" /></a>
23
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/{{OWNER}}/{{REPO}}?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
24
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/discussions"><img src="https://img.shields.io/github/discussions/{{OWNER}}/{{REPO}}" alt="GitHub Discussions" /></a>
25
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/graphs/contributors"><img src="https://img.shields.io/github/commit-activity/m/{{OWNER}}/{{REPO}}" alt="Commit Activity" /></a>
26
+ <a href="https://github.com/{{OWNER}}/{{REPO}}/commits/{{DEFAULT_BRANCH}}/"><img src="https://img.shields.io/github/last-commit/{{OWNER}}/{{REPO}}.svg" alt="Last Commit" /></a>
18
27
  <!-- badge:discord --><a href="{{DISCORD_INVITE}}"><img src="https://img.shields.io/discord/{{DISCORD_ID}}.svg?label=Chat&logo=Discord&colorB=7289da&style=flat" alt="Join Discord" /></a>
19
28
  <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a>
20
29
  <a href="./LICENSE.md"><img src="https://img.shields.io/github/license/{{OWNER}}/{{REPO}}" alt="License" /></a>
21
30
  <br />
22
31
  <img src="https://img.shields.io/badge/Claude-D97757?logo=claude&logoColor=fff" alt="Claude AI" />
23
- <img src="https://img.shields.io/badge/Cloudflare-F38020?logo=Cloudflare&logoColor=white" alt="Cloudflare" />
32
+ <img src="https://img.shields.io/badge/Cloudflare%20Workers-F38020?logo=cloudflareworkers&logoColor=white" alt="Cloudflare Workers" />
33
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white" alt="TypeScript" />
34
+ <img src="https://img.shields.io/badge/Next.js-black?logo=nextdotjs&logoColor=white" alt="Next.js" />
35
+ <img src="https://img.shields.io/badge/React-20232A?logo=react&logoColor=white" alt="React" />
36
+ <img src="https://img.shields.io/badge/Tailwind%20CSS-06B6D4?logo=tailwindcss&logoColor=white" alt="Tailwind CSS" />
37
+ <img src="https://img.shields.io/badge/shadcn%2Fui-000000?logo=shadcnui&logoColor=white" alt="shadcn/ui" />
38
+ <img src="https://img.shields.io/badge/Drizzle%20ORM-C5F74F?logo=drizzle&logoColor=white" alt="Drizzle ORM" />
24
39
  <img src="https://img.shields.io/badge/Turborepo-EF4444?logo=turborepo&logoColor=white" alt="Turborepo" />
25
- <img src="https://img.shields.io/badge/Bun-000000?logo=bun&logoColor=white" alt="Bun" />
40
+ <img src="https://img.shields.io/badge/Bun-14151A?logo=bun&logoColor=white" alt="Bun" />
41
+ <img src="https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=white" alt="Vitest" />
26
42
  </p>
27
43
 
28
44
  # {{REPO}}
@@ -4,9 +4,9 @@ Every badge in the README falls into one of three groups:
4
4
 
5
5
  | Group | Setup | Badges |
6
6
  | --- | --- | --- |
7
- | **Zero setup** — works the moment the repo is public | none | Stars, Commit Activity, Last Commit, License, PRs Welcome, Deploy to Cloudflare, DeepWiki, tech-stack chips |
7
+ | **Zero setup** — works the moment the repo is public | none | Stars, Forks, Contributors, Open Issues, Open PRs, Merged PRs, Discussions, Commit Activity, Last Commit, License, PRs Welcome, Deploy to Cloudflare, Codespaces, DeepWiki, tech-stack chips |
8
8
  | **Needs a workflow or service connected** | one repo secret or one app install | Tests status, Coverage, npm version, npm downloads |
9
- | **Needs an account and an id you paste in** | an external account | DOI, Discord, UptimeRobot, YouTube, Docs, API |
9
+ | **Needs an account and an id you paste in** | an external account | DOI, Discord, UptimeRobot, YouTube, Website, Docs, API |
10
10
 
11
11
  `setup-git-repo` drops the badge lines for group 3 unless you pass the id, so the
12
12
  README never ships a badge pointing at `{{DOI}}`. Add them back later by copying
@@ -86,6 +86,69 @@ DeepWiki indexes public repos automatically. The first visit to the link
86
86
  triggers indexing if the repo has not been seen; the badge image itself is
87
87
  static, so it renders even before indexing finishes.
88
88
 
89
+ ### Forks and Contributors
90
+
91
+ ```html
92
+ <a href="https://github.com/OWNER/REPO/forks"><img src="https://img.shields.io/github/forks/OWNER/REPO" alt="GitHub Forks" /></a>
93
+ <a href="https://github.com/OWNER/REPO/graphs/contributors"><img src="https://img.shields.io/github/contributors/OWNER/REPO" alt="Contributors" /></a>
94
+ ```
95
+
96
+ `forks` counts direct forks only, not forks of forks, so a repo forked along a
97
+ chain reads lower than it is. `contributors` counts commit authors GitHub could
98
+ match to an account — commits made with an unregistered email belong to nobody
99
+ and are invisible here. Use `contributors-anon` instead if your history has many
100
+ of those.
101
+
102
+ ### Open Issues
103
+
104
+ ```html
105
+ <a href="https://github.com/OWNER/REPO/issues"><img src="https://img.shields.io/github/issues/OWNER/REPO?logo=github" alt="GitHub Issues" /></a>
106
+ ```
107
+
108
+ Needs Issues enabled (Settings → Features). Read it as work in flight, not a
109
+ defect count. Shields asks GitHub Search, which treats pull requests as issues on
110
+ some endpoints — the `/issues/` path used here already excludes them. Add
111
+ `-raw` (`github/issues-raw/...`) for a bare number with no "open" suffix, and
112
+ `-closed` for the closed count.
113
+
114
+ ### Open PRs and Merged PRs
115
+
116
+ ```html
117
+ <a href="https://github.com/OWNER/REPO/pulls"><img src="https://img.shields.io/github/issues-pr/OWNER/REPO?logo=github&label=PRs" alt="Open Pull Requests" /></a>
118
+ <a href="https://github.com/OWNER/REPO/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OWNER/REPO?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
119
+ ```
120
+
121
+ Two counts rather than one on purpose. An open count alone reads the same whether
122
+ the queue clears in a day or has been stuck for a year; the pair is what tells a
123
+ reader whether maintenance is actually happening.
124
+
125
+ Shields has **no "merged" endpoint**. `issues-pr-closed` counts every PR that is
126
+ no longer open, so PRs closed without merging are in the number too. If you close
127
+ a lot of stale PRs, relabel it `label=PRs%20closed` rather than overstating what
128
+ landed. Both take `label=` because unlabelled they render as bare numbers, and
129
+ two adjacent PR badges then look like one number printed twice.
130
+
131
+ ### Discussions
132
+
133
+ ```html
134
+ <a href="https://github.com/OWNER/REPO/discussions"><img src="https://img.shields.io/github/discussions/OWNER/REPO" alt="GitHub Discussions" /></a>
135
+ ```
136
+
137
+ Discussions is **off by default**. Until you turn it on (Settings → Features →
138
+ Discussions) the badge reads `repo not found`, which looks exactly like the
139
+ private-repo failure — turn it on before adding the badge, not after.
140
+
141
+ ### Open in GitHub Codespaces
142
+
143
+ ```html
144
+ <a href="https://codespaces.new/OWNER/REPO"><img height="20px" src="https://github.com/codespaces/badge.svg" alt="Open in GitHub Codespaces" /></a>
145
+ ```
146
+
147
+ Nothing to configure — the link boots the repo in a default container, billed
148
+ against the *visitor's* free hours, so the button costs you nothing. Add a
149
+ `.devcontainer/devcontainer.json` if the default image is missing something your
150
+ install needs: the visitor is the one who sees that failure.
151
+
89
152
  ### Tech-stack chips
90
153
 
91
154
  Pure decoration — static Shields badges with a brand color and a Simple Icons
@@ -154,6 +217,7 @@ drop to 0%.
154
217
  ```html
155
218
  <a href="https://www.npmjs.com/package/PACKAGE"><img src="https://img.shields.io/npm/v/PACKAGE.svg" alt="npm version" /></a>
156
219
  <a href="https://www.npmjs.com/package/PACKAGE"><img src="https://img.shields.io/npm/dm/PACKAGE.svg" alt="NPM Monthly Downloads" /></a>
220
+ <a href="https://www.npmjs.com/package/PACKAGE"><img src="https://img.shields.io/npm/dt/PACKAGE.svg" alt="NPM Total Downloads" /></a>
157
221
  ```
158
222
 
159
223
  `PACKAGE` is the name in that package's `package.json`, not the repo name. Both
@@ -161,7 +225,10 @@ badges render `invalid` until the package's **first** publish — `npm-publish.y
161
225
  does that on the first push to the default branch. Scoped packages work with the
162
226
  scope included and URL-encoded slash: `npm/v/%40scope%2Fname`.
163
227
 
164
- `dm` is downloads/month; `dw` weekly, `dt` total. In a monorepo, pick the package
228
+ `dm` is downloads/month; `dw` weekly, `dt` total. Show the monthly and the total
229
+ together rather than either alone: a large all-time total with a flat month means
230
+ something very different from the same total still climbing, and only the monthly
231
+ number says the package is still being installed. In a monorepo, pick the package
165
232
  users actually install — or show several, one badge each.
166
233
 
167
234
  ---
@@ -225,6 +292,17 @@ For a badge that reports the *real* number, use a monitor-specific API key
225
292
  That key is read-only for one monitor, which is why it is safe in a README —
226
293
  never paste your account-wide API key there.
227
294
 
295
+ ### Website (live app)
296
+
297
+ ```html
298
+ <a href="https://your.app"><img height="20px" src="https://img.shields.io/badge/App-blueviolet?style=for-the-badge&logo=googlechrome&logoColor=white" alt="Website" /></a>
299
+ ```
300
+
301
+ The deployed thing, not the repo, and first in the row on purpose: a visitor who
302
+ can click straight into a running app decides in seconds whether to read the
303
+ rest. Static — nothing checks the URL is up, which is what the uptime badge is
304
+ for. Pass it with `--website <url>`.
305
+
228
306
  ### Docs / API / YouTube links
229
307
 
230
308
  ```html
@@ -256,8 +334,9 @@ markdown image syntax cannot center or set a height. Consequences:
256
334
  - GitHub's markdown renderer strips `style` attributes. Sizing has to come from
257
335
  the `height` attribute or from Shields' own `style=` parameter.
258
336
 
259
- Group by meaning: identity and links on row one, health and freshness on row two,
260
- community on row three, stack chips last.
337
+ Group by meaning, four rows: identity and links on row one, health and freshness
338
+ on row two, community on row three, stack chips last. Four rows of five reads;
339
+ twenty badges in one run is a wall.
261
340
 
262
341
  ## Verifying
263
342