Skip to content

ranveersequeira/react-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Project Analyzer ⚡️

A simple, fast, and interactive CLI tool to analyze the technology stack of any React, React Native, or Next.js project. It identifies all dependencies, categorizes them, finds unused packages, and uses AI to generate a beautiful Markdown report.

Key Features

  • 🔍 Comprehensive Analysis: Works with React, React Native, and Next.js projects.
  • 📚 Smart Categorization: Groups packages into logical categories like "UI Library," "State Management," and "Routing."
  • 🗑️ Unused Dependency Detection: Helps you clean up your package.json by flagging installed packages that aren't imported in your code.
  • 🤖 AI-Powered Reports: Integrates with leading AI models to generate insightful and well-formatted tech stack reports in Markdown.
  • ✨ Interactive & Easy to Use: A simple command-line interface guides you through the process.

How to Use

No installation is required! Just run the following command inside the root directory of your project (where your package.json is located):

npx react-analyzer

The tool will then:

  1. Read and analyze your package.json file.
  2. Check for unused dependencies.
  3. Ask if you want to generate a detailed report using AI.
  4. If yes, it will prompt you to select an AI model and provide an API key.
  5. Generate a tech_stack_report.md file in your project's root directory.

Required API Keys

To use the AI reporting feature, you will need an API key from your chosen provider.

  • How it works: The tool will prompt you to select a model (e.g., Gemini) and then paste your API key directly into the terminal.
  • Security: Your API key is used only for the single API request to generate the report. It is not stored, saved, or logged anywhere.

🚧 Work in Progress (WIP)

The tool is actively being developed. Here's what's currently in the pipeline:

  • [WIP] Full integration for more AI models:
    • OpenAI (GPT): The API call structure is being built out.
    • Anthropic (Claude): Scaffolding for the API integration is in place.

🚀 Future Plans

We have many exciting ideas for the future of this tool!

  • Deeper Code Analysis: Go beyond dependency lists to analyze how packages are used (e.g., count component imports, identify deprecated functions).
  • Version Health Check: Add a feature to check for outdated packages and security vulnerabilities, recommending updates.
  • Configuration File: Allow users to create a .analyzerc file in their project to pre-configure their preferred AI model, API key, and rules for ignoring certain packages.
  • CI/CD Integration: Provide a silent mode that can be run in a GitHub Action or other CI pipelines to automatically generate reports on pull requests.

Contributing

This project is open-source and contributions are welcome! If you have ideas for new features or improvements, feel free to open an issue or submit a pull request on our GitHub repository.

License

This project is licensed under the ISC License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors