An AI-powered command-line tool that helps you find and execute Unix/Linux commands using OpenAI's GPT models.
-
Install dependencies:
npm install
-
Set up OpenAI API key:
- Get your API key from OpenAI Platform
- Create a
.envfile in the project root - Add your API key:
OPENAI_API_KEY=your_openai_api_key_here
-
Install globally from this git repository
-
Run the following command to install the CLI globally (replace with your repo URL):
npm install -g
-
Now you can use the
unixtipcommand from anywhere two ways:unixtip
unixtip "how to list all running processes"
Start the interactive menu:
node index.js greetQuery for a specific Unix command:
node index.js query "how to find all files larger than 100MB"Interactive Mode:
🚀 Unix AI Assistant - Your AI-powered Unix command helper
? What would you like to do? (Use arrow keys)
❯ Ask AI for Unix command
Create a file
Edit a file
Exit
Direct Query:
$ node index.js query "compress all jpg files in current directory"
🤖 Querying AI for Unix command...
💡 Suggested command:
```bash
find . -name "*.jpg" -exec gzip {} \;
## Requirements
- Node.js 14+
- OpenAI API key
- Internet connection for API calls
## License
ISC