Skip to content

Nitinref/PackSense

Repository files navigation

πŸš€ PackSense β€” AI-Powered Package Setup for VS Code

Stop wasting time on outdated docs. PackSense fetches real-time package versions from official registries, detects breaking changes, and lets AI set up your entire project automatically β€” all without leaving VS Code.

MIT License Build Passing VS Code Marketplace


πŸ“Œ The Problem

When developers ask AI tools like ChatGPT or Claude how to set up a package (e.g., Prisma, Next.js), the AI often gives outdated commands because:

  • LLMs are trained on static data with a knowledge cutoff
  • Web search may pull from unofficial blogs instead of official docs
  • There is no built-in version verification in standard AI chat

PackSense solves this by adding a deterministic verification layer before the AI ever generates a response.


✨ Features

πŸ” Smart Package Search

  • Type any library name β€” PackSense searches all major registries simultaneously in real-time
  • Fuzzy matching support β€” langchin β†’ finds langchain automatically
  • Shows latest version, release date, weekly downloads across ecosystems

πŸ“‘ Multi-Registry Real-Time APIs

Language Registry What's Fetched
🐍 Python PyPI Latest version, dependencies
πŸ“¦ JavaScript npm Latest version, changelog
πŸ¦€ Rust Crates.io Latest stable release
🎯 Dart/Flutter pub.dev Latest version, compatibility
πŸ’Ž Ruby RubyGems Latest gem version
β˜• Java Maven Central Latest artifact
πŸ™ All GitHub Releases Breaking changes, migration guide

πŸ“‹ What's New β€” Breaking Changes Alert

  • Fetches official GitHub release notes in real-time
  • AI summarizes what changed in simple language
  • Warns about breaking changes before you upgrade

πŸ€– AI Chat Panel (Inside VS Code)

  • Ask anything about any package β€” AI answers using verified real-time data
  • No outdated training data β€” every response backed by official API results
  • Explains concepts, migration steps, and best practices

⚑ Auto Setup β€” One Click Project Config

  • Generates correct install command for your ecosystem (pip install / npm install)
  • Creates boilerplate starter code with latest syntax
  • Auto-generates config files β€” .env, requirements.txt, schema.prisma, etc.
  • Runs everything in terminal with your confirmation

βœ… Confirmation Popup β€” Always In Control

  • Shows exactly what will be run before executing anything
  • Never touches your files without explicit permission

πŸ—οΈ Architecture

πŸ“Έ System Design Diagram

PackSense System Design

πŸ“ Flow Breakdown

Developer (VS Code)
        β”‚
        β–Ό
   Chat Panel  ──────►  package.json Scanner
   (Side Panel)                β”‚
                               β–Ό
                    npm Registry API  +  GitHub Releases API
                               β”‚
                               β–Ό
                    Structured Context Builder
                    (verified version data)
                               β”‚
                               β–Ό
                       Claude / GPT API
                    (explanation engine only)
                               β”‚
                               β–Ό
                    Confirmation Popup  ──► [Allow / Cancel]
                               β”‚
                               β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β–Ό                                   β–Ό
       Terminal Runner                      File Creator
       (npm install, npx)            (.env, schema.prisma, etc.)

🎬 How It Works

Step 1 β€” You type a request

"Latest Prisma setup kardo"

Step 2 β€” Extension fetches verified data

npm Registry  β†’  prisma@5.22.0 (latest)
GitHub        β†’  Breaking changes from v4 β†’ v5

Step 3 β€” Structured prompt is sent to AI

User Request: Prisma setup
Verified Context:
  - Installed: 4.0.0
  - Latest: 5.22.0
  - Breaking Changes: [migration guide]

Step 4 β€” AI generates accurate setup steps

Step 5 β€” Confirmation popup appears

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PackSense wants to:                β”‚
β”‚                                     β”‚
β”‚  ⚑ Run: npm install prisma@5.22.0  β”‚
β”‚  ⚑ Run: npx prisma init            β”‚
β”‚  πŸ“ Create: schema.prisma           β”‚
β”‚  πŸ“ Create: .env                    β”‚
β”‚                                     β”‚
β”‚     [βœ… Allow]      [❌ Cancel]     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Step 6 β€” Done! Your project is set up with the correct version βœ…


πŸ–₯️ UI Preview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ“¦ PackSense                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  βœ… react         18.2  β†’  18.3     β”‚
β”‚  ⚠️  prisma        4.0  β†’  5.22     β”‚
β”‚  ❌ next          13.0  β†’  15.1     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ’¬ Ask AI                          β”‚
β”‚  > Latest prisma setup kardo...     β”‚
β”‚                                     β”‚
β”‚  [Send]  [Auto Setup]               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Layer Technology
VS Code Extension TypeScript + VS Code Extension API
Package Registry npm Registry API (registry.npmjs.org)
Release Notes GitHub REST API
AI Layer Claude API / OpenAI GPT API
File Operations VS Code Workspace FS API
Terminal Runner VS Code Terminal API

πŸ“ Project Structure

packsense/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ extension.ts          # Entry point
β”‚   β”œβ”€β”€ scanner/
β”‚   β”‚   └── packageScanner.ts # package.json reader
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ npmRegistry.ts    # npm latest version fetcher
β”‚   β”‚   └── githubReleases.ts # breaking changes fetcher
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   └── contextBuilder.ts # builds structured AI prompt
β”‚   β”œβ”€β”€ ai/
β”‚   β”‚   └── aiClient.ts       # Claude / GPT API calls
β”‚   β”œβ”€β”€ executor/
β”‚   β”‚   β”œβ”€β”€ terminalRunner.ts # runs terminal commands
β”‚   β”‚   └── fileCreator.ts    # creates config files
β”‚   └── ui/
β”‚       β”œβ”€β”€ chatPanel.ts      # VS Code webview chat
β”‚       └── confirmation.ts   # confirmation popup
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

βš™οΈ Installation

# Clone the repo
git clone https://github.com/yourusername/packsense.git
cd packsense

# Install dependencies
npm install

# Build the extension
npm run build

# Open in VS Code
code .

# Press F5 to launch Extension Development Host

πŸ”‘ Configuration

Add your API key in VS Code settings:

{
  "packsense.aiProvider": "claude",
  "packsense.apiKey": "your-api-key-here",
  "packsense.autoScanOnOpen": true,
  "packsense.confirmBeforeExecute": true
}

πŸ—ΊοΈ Roadmap

  • npm package version checker
  • GitHub release notes fetcher
  • VS Code chat panel
  • Auto terminal command runner
  • Auto file creator
  • PyPI support (Python packages)
  • Support for private registries
  • package.json auto-update on confirm
  • Multi-package bulk setup

🀝 Contributing

Pull requests are welcome! Please open an issue first to discuss what you'd like to change.


πŸ“„ License

MIT License β€” free to use, modify, and distribute.


Built with ❀️ to make developers' lives easier. No more outdated setup headaches.

About

AI-powered VS Code extension that verifies real-time package versions and auto-sets up your project with zero outdated commands.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors