Skip to content

bcwaters/unixtip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unix AI Assistant

An AI-powered command-line tool that helps you find and execute Unix/Linux commands using OpenAI's GPT models.

Setup

  1. Install dependencies:

    npm install
  2. Set up OpenAI API key:

    • Get your API key from OpenAI Platform
    • Create a .env file in the project root
    • Add your API key:
      OPENAI_API_KEY=your_openai_api_key_here
      
  3. 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 unixtip command from anywhere two ways:

    unixtip
    unixtip "how to list all running processes"

Usage without global

Interactive Mode

Start the interactive menu:

node index.js greet

Direct Query

Query for a specific Unix command:

node index.js query "how to find all files larger than 100MB"

Examples

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 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors