- This repository is a small Node.js generator for
README.md. - Source data lives in
data/*.yaml. - The output document is generated from
tmpl/README.mdplus fetched repository metadata. - Main code lives in
script/index.js,script/utils.js, andscript/yaml.js. - Package manager:
pnpm@9.4.0. - Module system: native ESM (
"type": "module").
- No repo-local
.cursorrulesfile was found. - No
.cursor/rules/directory was found. - No
.github/copilot-instructions.mdfile was found. - No prior repo-level
AGENTS.mdexisted in this repository. - Follow this file as the repository-specific agent guide.
data/*.yaml: source records for app categories.tmpl/README.md: README template with the<!-- Apps -->placeholder.script/index.js: generator entrypoint.script/utils.js: repo metadata fetch helpers and markdown helpers.script/yaml.js: YAML file discovery helper.README.md: generated output; do not hand-edit unless the task explicitly asks for it.
- Install dependencies with
pnpm install. - Use Node.js new enough to support ESM, global
fetch, top-levelawait, and--env-file. pnpm buildreads remote GitHub/GitLab metadata; network access is expected.pnpm devloads.envvianode --env-file .env script/index.js.- For GitHub API calls, set
GITHUB_TOKENwhen you need higher rate limits or authenticated access.
- Install:
pnpm install - Build README:
pnpm build - Dev run with
.env:pnpm dev - Lint whole repo:
pnpm lint - Auto-fix lint issues:
pnpm lint:fix - Pre-commit hook installs via
pnpm installand runspnpm lint-staged - Staged-file lint manually:
pnpm lint-staged
- Lint one file:
pnpm exec eslint script/index.js - Lint one YAML file:
pnpm exec eslint data/authentication.yaml - Auto-fix one file:
pnpm exec eslint script/utils.js --fix - Run generator directly:
node script/index.js - Run dev entry directly with env file:
node --env-file .env script/index.js
- There is currently no dedicated automated test suite configured.
- No
testscript exists inpackage.json. - No
vitest,jest,node --test,playwright, orcypressconfig was found. - There is therefore no true single-test command today.
- If a task asks for validation, use
pnpm lintandpnpm buildas the default verification path. - If you add tests in the future, update this file with exact full-suite and single-test commands.
- For code changes in
script/, runpnpm lintfirst. - For data or template changes, run
pnpm buildto regenerateREADME.md. - For broader changes, run both
pnpm lintandpnpm build. - Inspect the resulting diff in
README.mdto ensure generated output changed as expected. - Do not claim test coverage exists when only lint/build were run.
README.mdis generated output.- Prefer editing
tmpl/README.md,data/*.yaml, or generator scripts instead of hand-editingREADME.md. - If
README.mdmust change, regenerate it withpnpm buildunless the task explicitly wants a manual edit. - Keep the
<!-- Apps -->placeholder intact intmpl/README.md.
- Category source files use kebab-case names such as
file-sharing.yamlanda-i.yaml. - Each YAML file contains a top-level array.
- Each item should at minimum contain
nameandurl. descriptionis optional and falls back to repository metadata when absent.- Preserve simple, flat records; do not introduce nested shapes unless the generator is updated first.
- Keep entries readable and consistent across files.
- Use ESM
import/exportonly. - Order imports as: Node built-ins, third-party packages, then local relative imports.
- Keep one import per line.
- Prefer named exports for shared helpers.
- Match existing style: built-ins use the
node:prefix. - Do not switch files to CommonJS.
- Follow ESLint as the source of truth; the repo uses
@antfu/eslint-configwith formatters enabled. - Use 2-space indentation.
- Use single quotes.
- Omit semicolons.
- Keep trailing commas in multiline arrays, objects, and calls when lint expects them.
- Prefer concise arrow functions where readability stays high.
- Avoid unnecessary blank lines, but keep logical sections separated.
- Use
camelCasefor variables and functions. - Use
PascalCaseonly for user-facing derived display labels such as category names. - Use descriptive helper names like
getRepoInfo,getBadge, andgetYAMLFiles. - Keep file names lowercase; use hyphenated names for YAML categories.
- Avoid single-letter variable names except in tiny callback scopes.
- The codebase is plain JavaScript, not TypeScript.
- Preserve the existing lightweight style; do not introduce TypeScript unless explicitly requested.
- Make data contracts obvious through naming and small helper functions.
- When adding richer data fields, update both YAML producers and markdown generation logic together.
- Prefer returning simple plain objects from helpers.
- Handle remote API failures at the network boundary.
- Existing behavior in
script/utils.jslogs context and returns an empty object on fetch failures. - Maintain that tolerant behavior for optional metadata fetches.
- Do not silently swallow local file parsing or template errors that should fail the build.
- Include enough context in logs to identify the failing URL or category.
- Prefer explicit fallbacks over deeply defensive branching.
- Prefer
async/awaitover raw promise chains for non-trivial flows. Promise.allis the established pattern for parallel metadata fetching.- Preserve parallelism when processing many repositories.
- Keep mutation localized and easy to follow.
- Avoid introducing unnecessary abstractions for a three-file codebase.
- Keep changes minimal and easy to audit.
- Prefer direct file reads/writes over elaborate pipelines.
- Avoid adding frameworks, classes, or heavy architecture.
- Do not over-generalize for hypothetical future features.
- Small utility functions are preferred over large reusable systems.
- The generated markdown is table-based.
- Category order is derived from filename labels after normalization and sorting.
- App order within a category is based on fetched star counts.
- Preserve the current output format unless the task explicitly changes presentation.
- Be careful: output changes can touch a very large
README.mddiff.
- Keep YAML valid and easy to scan.
- Preserve the list-item structure and indentation.
- Prefer quoting URLs consistently when touching nearby entries, but avoid noisy reformatting-only diffs.
- Keep names exactly as intended for display in markdown badges and links.
- Avoid duplicate entries within the same category.
- Before editing, inspect whether the requested change belongs in
data/,tmpl/, orscript/. - If a change affects generated output, mention that
README.mdshould be regenerated. - Prefer narrow diffs; avoid repo-wide churn in YAML files.
- When validation is requested, report clearly that this repo has lint/build checks but no formal tests.
- If you introduce a new workflow, script, or rule source, update this file.