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.
- 🔍 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.jsonby 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.
No installation is required! Just run the following command inside the root directory of your project (where your package.json is located):
npx react-analyzerThe tool will then:
- Read and analyze your
package.jsonfile. - Check for unused dependencies.
- Ask if you want to generate a detailed report using AI.
- If yes, it will prompt you to select an AI model and provide an API key.
- Generate a
tech_stack_report.mdfile in your project's root directory.
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.
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.
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
.analyzercfile 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.
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.
This project is licensed under the ISC License.