ghostimport

v0.7.4
io.github.FGuerreir0/ghostimport Checked 11 hours ago Published 14 days ago

Stops AI agents installing npm packages that don't exist, typosquats, or risky install scripts.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_packages

Verify that npm packages actually exist on the public registry before you import or install them. Language models routinely invent plausible-sounding package names that were never published ("slopsquatting"); attackers watch for those names and register them with malicious install scripts. Call this whenever you are about to write an import statement or add a dependency you have not verified in this session.

ParameterTypeDescription
packages *arraynpm package names, e.g. ['axios', '@scope/name']. Omit version ranges and subpaths.
deepbooleanAlso run supply-chain heuristics on packages that do exist (install scripts, age, download volume, typosquat distance). Slower. Default false.

check_install_command

Vet a package-manager command before running it: installs (npm/pnpm/yarn/bun add or install) and commands that download and run a package on the spot (npx, npm exec, npm create / npm init <x>, pnpm dlx, yarn dlx, bunx). Checks every package involved for non-existence, typosquatting, and install-time scripts on packages with no track record. Call this before running any such command, especially one copied from documentation, a README or a skill file.

ParameterTypeDescription
command *stringThe full shell command, e.g. 'npm install axios zod' or 'npx create-vite@latest app'.
cwdstringProject directory. When given, an unpinned npx of a bin the project already has installed is skipped.

scan_project

Scan a project directory for npm packages that do not exist — imported in code or declared in package.json — and for packages imported but missing from package.json. Use this to audit a codebase — for a single package name, use check_packages instead.

ParameterTypeDescription
pathstringDirectory to scan. Defaults to the current working directory.