Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whoiskatrin/npm-copilot
CLI tool for Next.js that can analyze logs in real-time and suggest a solution using OpenAI
https://github.com/whoiskatrin/npm-copilot
clitools copilot devtools nextjs npm npm-cli npm-package openai react yarn
Last synced: 1 day ago
JSON representation
CLI tool for Next.js that can analyze logs in real-time and suggest a solution using OpenAI
- Host: GitHub
- URL: https://github.com/whoiskatrin/npm-copilot
- Owner: whoiskatrin
- Created: 2023-04-03T20:52:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T11:53:36.000Z (about 1 year ago)
- Last Synced: 2025-01-12T22:06:44.972Z (9 days ago)
- Topics: clitools, copilot, devtools, nextjs, npm, npm-cli, npm-package, openai, react, yarn
- Language: JavaScript
- Homepage:
- Size: 430 KB
- Stars: 369
- Watchers: 3
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
npm/yarn/pnpm Copilot
npm/yarn/pnpm copilot is a command-line tool that uses OpenAI's GPT-3 language model to provide suggestions for fixing errors in your code.
## 🌟 Frameworks:
- Next.js
- React
- Angular
- Vue.js## 📖 How to use:
The CLI tool detects the project type and package manager being used in the current directory. It then runs the appropriate development server command (e.g., npm run dev, yarn run dev, pnpm run dev) and listens for logs generated by the running application. When an error is encountered, the CLI tool provides suggestions for error fixes in real-time.
## 🛠️ Installation
To install the npm-copilot package, run the following command:
```
npm install -g npm-copilot
```Disclaimer:
The CLI tool will begin monitoring the logs generated by the Next.js application and provide suggestions for error fixes in real-time.## ⚙️ Configuration
In order to use this package, you need to set your OpenAI API key as an environment variable. You can do this by adding the following line to your `.env` file, or by setting it directly in your terminal:
For Unix-based systems:
```
export OPENAI_API_KEY=your_api_key_here
```For Windows systems:
```
set OPENAI_API_KEY=your_api_key_here
```Replace your_api_key_here with your actual OpenAI API key.
## 🖥️ Usage
To use npm-copilot, navigate to the directory containing your Next.js project and run the following command:
```
npm-copilot
```The CLI tool will begin monitoring the logs generated by the Next.js application and provide suggestions for error fixes in real-time.
## 📜 License
This package is licensed under the MIT [License](LICENSE).