shai-analyzer
Version:
A CLI tool to analyze package dependencies and detect breaking changes
77 lines (53 loc) ⢠2.26 kB
Markdown
# shai-analyzer š ļøš¦
Smart Dependency Analyzer for JavaScript/TypeScript projects
Detect breaking changes before they break your app! š„
## ⨠What is shai-analyzer?
shai-analyzer is a CLI tool designed to analyze your projectās dependencies and detect possible breaking changes when updating packages.
š It uses AI (DeepSeek-R1 B7 with Ollama) to provide precise recommendations on whether updating a package might cause issues in your project.
## ā” Features
- ā
Scans your dependencies in package.json and detects outdated versions.
- ā
Checks for breaking changes using AI-powered analysis.
- ā
Distinguishes TypeScript support:
- š¢ Native TypeScript support
- š” Uses @types/package for TypeScript
- š“ No TypeScript support detected
- ā
Integrates AI to analyze changelogs for better accuracy.
- ā
Works locally with Ollama for privacy & offline AI analysis.
## š¦ Installation
Before installing, make sure you have [Ollama](https://ollama.com/) installed and have downloaded the required AI model:
```bash
ollama pull deepseek-r1:b7
```
Then, install shai-analyzer globally via NPM:
```bash
npm install -g shai-analyzer
```
## š Usage
š Scan your dependencies
Run the following command in the root of your project:
```bash
shai-analyzer scan
```
This will:
- 1ļøā£ Analyze all dependencies in package.json.
- 2ļøā£ Check if updates are available.
- 3ļøā£ Detect breaking changes with AI.
- 4ļøā£ Show TypeScript support for each dependency.
Example output:

## š ļø How AI is used
- š¹ shai-analyzer uses AI to analyze the changelog of each package before updating.
- š¹ AI is powered by Ollama with DeepSeek-R1 B7 to determine:
- āļø If a package update introduces breaking changes.
- āļø If changes impact TypeScript compatibility.
- āļø If a safer version upgrade is recommended.
## š ļø Requirements
- š¹ Node.js (v16+)
- š¹ Ollama installed ā Install Ollama
- š¹ DeepSeek-R1 B7 model ā Install with:
```bash
ollama pull deepseek-r1:b7
```
## š License
This project is licensed under the MIT License.
š Contributions are welcome! If you find a bug or want to add features, feel free to open a pull request.