Skip to content

zmsp/ask-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ask-AI

Generate and run Bash commands using OpenAI’s GPT models.

Demo

Requirements

  • Bash
  • curl
  • OpenAI API key

Install

curl -O https://raw.githubusercontent.com/zmsp/ask-bash/main/ask
chmod +x ask
mv ask ~/.local/bin/
export PATH="$PATH:$HOME/.local/bin"
ask --help

Usage

ask "your task description"

Set your API key by exporting OPENAI_API_KEY or let the script prompt and save it.

Options

ask --help

Env Variables

  • OPENAI_API_KEY — your OpenAI key (required). You can either:

    • Export it in your current shell:

      export OPENAI_API_KEY="your_api_key_here"
    • Or run the script once and it will prompt you to paste the key and save it securely to ~/.openai_api_key.

  • VERBOSE=true — enable debug output (optional)

License

MIT © Zobair

About

simple bash script that helps you with terminal commands with the power of chatgpt

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages