ghostimport
v0.7.4Stops 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.
| Parameter | Type | Description |
|---|---|---|
packages * | array | npm package names, e.g. ['axios', '@scope/name']. Omit version ranges and subpaths. |
deep | boolean | Also 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.
| Parameter | Type | Description |
|---|---|---|
command * | string | The full shell command, e.g. 'npm install axios zod' or 'npx create-vite@latest app'. |
cwd | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
path | string | Directory to scan. Defaults to the current working directory. |