Readmeaudit

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 6, 2026

README drift auditor: documented names and flags checked against the actual package.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

比對套件的 README 與 package.json、CLI 原始碼,給出 IN-SYNC 或 DRIFT 結論及逐項證據。

可以做什麼
  • 稽核指定套件目錄的 README,與 package.json 及 src/ 下的 TypeScript 原始碼比對
  • 核對安裝指令中的套件名稱是否與 package.json 名稱一致,以及 README 記載的旗標是否存在於原始碼
  • 回報幽靈旗標、未記載旗標、缺少安裝指令、未知指令詞,以及未聲明的 MCP 伺服器
  • 傳回確定性的 JSON 報告,逐條列出規則、嚴重程度、檔案與行號,並附上結論與結束碼
適用情境
適合維護 npm 套件或 CLI 時使用:讓助理在發佈前或代理工作階段中確認 README 的安裝指令與已記載旗標仍與程式碼一致。
執行需求
以本機 stdio 程序執行,可透過 npx 或已發佈的容器映像啟動。未宣告任何驗證、環境變數或標頭。目標目錄需包含 package.json 以及 README.md 或 README;旗標檢查只讀取 src/ 下的 TypeScript 檔案。
安裝前請注意
它只讀取靜態文字、不執行目標套件,但會讀取你指定目錄中的檔案。檢查範圍僅限名稱、旗標與指令,不判斷說明文字是否屬實;出現在註解、字串常值或非 TypeScript 原始碼中的旗標可能被誤報。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Readmeaudit,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

readmeaudit

READMEs drift. The install command names a package that was renamed, the usage section documents flags the CLI dropped two releases ago, and nobody notices until a user copies a command that does not exist.

readmeaudit compares a package README against the two sources of truth that live next to it: package.json and the CLI source under src/. It checks that the package name used in install commands matches the package.json name, that every long flag the README documents actually appears in the source, that every long flag in the source is documented, and that a package which declares an MCP server says so in its README. The result is a deterministic report with a verdict: IN-SYNC or DRIFT, with per-item evidence (rule, severity, file, line) for every disagreement.

It runs offline, reads only static text, and never executes anything in the target package. It is callable from the CLI or as an MCP server, so the check can run in release workflows and agent sessions, not just by hand.

Install

bash
npx @reneturcios/readmeaudit

That single command runs the tool without a global install. Point it at a package directory with the audit command shown below.

CLI usage

bash
readmeaudit audit [path] [--json]readmeaudit mcpreadmeaudit --version
  • audit checks the package at the given path (default: the current directory) and prints the human readable report. Adding the JSON option prints the same report as JSON instead.
  • mcp starts the MCP server on stdio.
  • The version option prints the tool version and exits.

Exit codes: 0 when the verdict is IN-SYNC, 1 when the verdict is DRIFT, 2 for usage errors and unreadable targets. A reader that closes the output pipe early makes the process exit 141, never 0.

Example output for a package whose docs match reality:

text
readmeaudit 0.1.0Target: .Verdict: IN-SYNCCounts: flagsDocumented=3, flagsInSource=3, phantom=0, undocumented=0, nameDrift=0Findings: noneIN-SYNC: no high or medium findings; 0 low or info finding(s) noted.

The counts in every report tally the --flags documented in the README and the --flags found in source, plus how many documented flags were phantom, how many source flags were undocumented, and how many install commands named the wrong package.

What it checks

ruleseveritywhat it means
NAME-DRIFThighAn install command in the README names a different package than the name field in package.json. The finding carries the line and the offending line as evidence.
NO-INSTALLmediumThe README contains no install invocation at all, so a new user has no copyable command that names the package.
FLAG-PHANTOMmediumA long flag is documented in the README but appears in no source file under src/.
FLAG-UNDOCUMENTEDlowA long flag appears in source under src/ but is never documented in the README.
MCP-UNDOCUMENTEDlowpackage.json declares an mcpName, so the package ships an MCP server, but the README never mentions mcp.
CMD-UNKNOWNinfoA fenced code block line starts with a bare command word that is not a declared bin name for the package, on a line that also carries a long flag or the word mcp.

How each check works

Names. The name check scopes itself to install lines only: lines that carry a package runner command or an install command from the standard JavaScript package manager. On those lines, the first non-option token after the command word is the invoked package name, with any version suffix stripped. Scoped names and plain names are both understood. An invoked name that differs from the package.json name is NAME-DRIFT. Restricting the check to install lines is deliberate: prose and comparison tables legitimately mention other tools by name, and those mentions are not install commands.

Flags. The flag check collects long flag tokens (two dashes, a letter, then letters, digits, or dashes) from the README and from every TypeScript file under src/, recursively. The same collector runs on both sides; it is the collector that picks up a token such as --flags when that token appears as text. The two sets are then diffed in both directions, one finding per flag.

MCP. When package.json has an mcpName field, the package presents itself to MCP clients under that name, and the README should at least mention the protocol. The check is a case-insensitive search for the word mcp anywhere in the README.

Commands. The command check is the most conservative check in the tool, by design. It only looks inside fenced code blocks, only at the first token of a line, and only when that token is a bare word that is neither a declared bin name nor a well known shell or program word (the package managers, the runtime, the container tool, version control, and basic shell words are all excluded). Even then it reports at info severity, it is counted like every other finding, and it never changes the verdict. An unknown command word in a usage block is often a helper, an alias, or a renamed binary from an older release; the finding exists so a human glances at it, not so the gate fails.

Verdict rules

  • IN-SYNC: no high or medium findings. Low and info findings are reported but do not change the verdict. Exit code 0.
  • DRIFT: at least one high or medium finding. Exit code 1.
  • Findings are ordered by rule, then by the flag or name they concern, then by line. Reports contain no timestamps, so two runs on the same tree produce byte-identical output.

MCP server

Add to your MCP client config:

json
{  "mcpServers": {    "readmeaudit": {      "command": "npx",      "args": ["-y", "@reneturcios/readmeaudit", "mcp"]    }  }}

Tool: audit_readme(path) returns the full audit report as JSON, the same object the CLI prints with the JSON option.

Limits, stated plainly

  • This is a static text comparison. readmeaudit can check names, flags, and commands, because those are concrete tokens with a source of truth in package.json and src/. It cannot judge whether prose descriptions are true: a README that describes behavior the code does not have, in flowing sentences with no wrong names or flags in it, passes.
  • Flags are text tokens. A flag that appears in a source comment or a string literal counts as present in source, and a flag assembled dynamically at runtime (built from pieces, or read from configuration) will be missed.
  • Source coverage is the TypeScript files under src/ only. A CLI implemented in another language, or in files elsewhere in the tree, is invisible to the flag check, and its flags will read as phantom.
  • The name check sees only install lines. A stale package name in prose, in a badge URL, or in a heading is not flagged.
  • The bin names come from the bin field of package.json. A package with no bin field gets no command check protection beyond the known-word exclusions, and CMD-UNKNOWN stays info severity for exactly this reason: the tool would rather under-report commands than accuse a README over a guess.
  • Missing inputs are errors, not findings: a target with no package.json, or with neither README.md nor README, fails with a clear message and exit code 2.

來源:README.md,提交 b1a6d6c

工具

1

audit_readme

Audit a package's README against reality: the npx or install name versus package.json name, flags documented in the README (--flags) versus flags present in the CLI source, and flags in the source the README never mentions. Verdict IN-SYNC or DRIFT with per-item evidence.

輸入參數path必填

版本歷史

1
  1. v0.1.0最新Oct 30, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分