Skip to content

Neurall-build/implit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Implit Logo

Implit

Stop AI hallucinations before they break your code

npm version npm downloads License: MIT GitHub stars



"AI wrote code with fake packages. Implit caught them in 0.3 seconds."


Quick Start โ€ข Features โ€ข Why Implit? โ€ข Examples


๐Ÿ˜ฑ The Problem

// AI generates this code...
import { awesomeAuth } from 'super-auth-lib';  // โŒ DOESN'T EXIST
import { fetchUser } from './api/users';       // โŒ NO export named fetchUser
import { login } from 'magic-auth';            // โŒ TYPO - should be 'magic-auth-lib'

// You run npm install... ๐Ÿ’ฅ BROKEN BUILD

Every developer using AI has experienced this:

  • โŒ AI invents npm packages that don't exist
  • โŒ AI guesses wrong local import paths
  • โŒ Security risk: hackers can register fake packages
  • โŒ Hours wasted debugging phantom dependencies

โœจ The Solution

Implit scans your AI-generated code and validates every import BEFORE you run it.

npx @neurall.build/implit check generated-code.ts
๐Ÿ” Checking generated-code.ts...

โœ“ react - Package exists on npm
โœ“ lodash - Package exists on npm
โœ— super-auth-lib - Package NOT FOUND on npm registry
โœ— ./api/users - No export named 'fetchUser' (available: getUser, deleteUser)
โœ— magic-auth - Package NOT FOUND (did you mean: magic-auth-lib?)

โŒ Found 3 hallucinated imports!

๐Ÿš€ Quick Start

Zero Config (Recommended)

# Check any file instantly - no installation needed
npx @neurall.build/implit check your-file.ts

Global Install

# Install globally for frequent use
npm install -g @neurall.build/implit

# Then run anywhere
implit check your-file.ts

Generate Fix Prompt for AI

# Get a ready-to-paste prompt to feed back to your AI
npx @neurall.build/implit check your-file.ts --fix

Output:

๐Ÿ“‹ Fix prompt (ready to paste):

Your generated code has invalid imports:

1. "super-auth-lib" does not exist on npm.
2. "./api/users" does not export "fetchUser". Available exports: getUser, deleteUser.
3. "magic-auth" does not exist. Did you mean "magic-auth-lib"?

Please fix these imports and regenerate the code.

๐ŸŽฏ Features

โœ“ npm Package Verification

  • Checks every external import against registry.npmjs.org
  • Detects typos with fuzzy matching ("Did you mean...")
  • Prevents supply chain attacks from fake packages

โœ“ Local Import Validation

  • Scans your local files for actual exports
  • Detects missing files
  • Reports available exports for wrong imports

โœ“ Node.js Built-in Detection

  • Automatically recognizes Node.js built-ins (fs, path, http, etc.)
  • No false positives on standard modules

โœ“ Smart Caching

  • Caches npm lookups for 24 hours
  • Blazing fast on repeated runs
  • Minimal network overhead

โœ“ Zero Config

  • Works out of the box
  • No setup required
  • Just npx and go

โœ“ AI-Friendly Output

  • --fix flag generates clipboard-ready prompts
  • Feed directly back to Claude, GPT, or Gemini
  • One-command workflow for AI-assisted coding

๐Ÿ’ก Why Implit?

Feature Implit Manual Review IDE Linter
Catches fake npm packages โœ“ Maybe โœ—
Validates local exports โœ“ Maybe โœ—
Zero setup required โœ“ โ€” โœ—
Works on any file โœ“ โ€” โœ—
Generates AI fix prompts โœ“ โ€” โ€”
Speed 0.3s Minutes Realtime*

*IDE linters only catch already-installed packages, not hallucinated ones


๐Ÿ“ฆ Examples

Basic Check

npx @neurall.build/implit check src/components/App.tsx

Check Multiple Files

npx @neurall.build/implit check src/**/*.ts

CI/CD Integration

# .github/workflows/check.yml
name: Validate Imports

on: [pull_request]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: npx @neurall.build/implit check src/index.ts

JSON Output

npx @neurall.build/implit check your-file.ts --json
[
  {
    "module": "react",
    "valid": true,
    "type": "external",
    "message": "Package exists on npm"
  },
  {
    "module": "super-auth-lib",
    "valid": false,
    "type": "external",
    "message": "Package NOT FOUND on npm registry"
  }
]

๐Ÿ”ง Commands

Command Description
implit check <file> Check a file for hallucinated imports
implit check <file> --security Also run security checks for typosquatting
implit check <file> --fix Generate fix prompt for AI
implit check <file> --json Output results as JSON
implit check <file> --no-cache Skip cache, always query npm
implit audit Run npm audit for vulnerabilities
implit install-hook Install git pre-commit hook
implit clear-cache Clear the dependency cache

๐Ÿ”’ Security Features

โœ“ Typosquatting Detection

  • Warns when packages are similar to popular ones (e.g., "lodas" vs "lodash")
  • Helps prevent supply chain attacks
  • High severity warnings for suspicious packages

โœ“ Git Pre-commit Hook

  • Automatically validates imports before every commit
  • Catches hallucinations before they enter your codebase
  • Easy installation: implit install-hook

โœ“ npm Audit Integration

  • Run implit audit to check for known vulnerabilities
  • Combines import validation with security scanning

๐Ÿ”ฎ Coming Soon

Phase 3: Multi-

Star the repo to get notified when these land!


๐Ÿ† Who Uses Implit?

  • AI Vibe Coders โ€” Validate ChatGPT/Claude code before running
  • DevOps Teams โ€” Catch issues before they hit CI/CD
  • Security Teams โ€” Prevent dependency hijacking attacks
  • Open Source Maintainers โ€” Validate PRs with AI-generated code

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

MIT License - feel free to use in personal and commercial projects.


๐Ÿ™ Credits

Built by Neurall โ€” making AI-assisted development safer.


โฌ† Back to Top


Found this useful? Give us a โญ on GitHub!

GitHub Repo NPM Package

About

Validate imports and catch fake AI-generated dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors