Dead-Code Ghost: Find Dead JavaScript and TypeScript Functions, Locally, with Gemma 3 1B A developer built Dead-Code Ghost, a zero-dependency Node.js command-line tool that scans JavaScript and TypeScript repositories for functions with no references and writes a read-only Markdown report flagging dead and exported-but-unused functions. The scanner strips comments and strings before building a name-based call graph, and optionally uses Gemma 3 1B via a local Ollama instance to generate a short plain-English note for each dead function. In a test on a separate sample repository it identified 4 dead and 2 exported-but-unused functions out of 10, with identical results reproduced on a Windows 10 machine. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine https://dev.to/challenges/hacktoberfest-week4-2026-10-26 Dead-Code Ghost is a free, local, read-only tool that finds dead functions in JavaScript and TypeScript repos — functions that are never called anywhere — and writes a Markdown report about them, with a plain-English note and a last-touched date for each one. It runs entirely on your machine with Gemma 3 1B via Ollama: no cloud, no API key, no subscription. My interpretation of the theme is literal. A "ghost" in a codebase is a function that was written once and then abandoned — still sitting in the repo, never called by anything. Every real project accumulates them: the helper from a retired feature, the utility left over from a refactor, the exported function nobody imports anymore. They slow down readers, confuse new contributors, and make refactors risky. Ghost finds them so a human can decide what to do. It never deletes or modifies anything itself. It is built for developers and open-source maintainers cleaning up JavaScript and TypeScript codebases, and it is brand-new code written October 27–31, 2026, for this challenge — not a repackage of anything else I have built. Repo: https://github.com/onyxailabs/dead-code-ghost https://github.com/onyxailabs/dead-code-ghost There is no hosted demo — this is a local command-line tool, so the demo is a real terminal run. Here is the exact output from a scan of the sample repo that ships with the tool, run on a Windows 10 PC: npm test PASS: dead= deadTsHelper, idle, oldHelper, unusedCalc exported-unused= formatDate, publicApi files=3 functions=9 sample-untouched=true node ghost.js scan sample-repo --out dead-code-report.md --no-model Report written to dead-code-report.md Files: 3 | Functions: 9 | Dead: 4 | Exported-unused: 2 And the report it writes looks like this excerpt : Dead functions 4 — never referenced anywhere, not exported - deadTsHelper, idle, oldHelper, unusedCalc Exported but never called internally 2 — review, not necessarily dead - formatDate, publicApi sample-untouched=true matters: the scan only reads your code. The only file it ever writes is the report you point it at. To verify the tool computes rather than returning a canned answer, I ran it on a second, completely different folder with different function names — a tiny shop example. It correctly found 4 dead functions applyOldCoupon , removeFromCart , legacyDiscount , unusedHelper and 2 exported-but-unused ones formatPrice , taxRate out of 10 functions. The same check was then repeated on a Windows 10 PC with the identical result. Same tool, unseen code, correct result. https://github.com/onyxailabs/dead-code-ghost https://github.com/onyxailabs/dead-code-ghost Zero-dependency Node.js. Run it with: node ghost.js scan