中文说明
Ghost in the Shell powered by OpenAI.
With Aoi, you can have natural language conversations with an AI in the terminal that can understand your queries and execute appropriate commands.
You can use Aoi as a terminal version of ChatGPT, Besides, Aoi comes with several built-in features that can help you be more productive:
/code
- Generate code snippets and auto copy them to the clipboard, e.g. /code go generate random numbers
/db
- Auto load database schema and execute SQL, e.g. /db postgres://user:passwd@host/db list tables
/shell
- Generate shell command and execute it, e.g. /shell view listening ports
/ssh
- Generate shell command and execute it on the remote host, e.g. /ssh {host} view listening tcp ports
/summary
- Generate a summary of the content from a URL, and translate it if needed e.g. /summary {url}
/summary cn {url}
/tldr
- Get a tl;dr explanation of a shell command/trans
- Translate text to a specified language/copy
- Copy the last replyYou can download Aoi from the GitHub release page. Alternatively, you can use Go to install Aoi on your system:
go install github.com/shellfly/aoi@latest
Set your OpenAI API key as an environment variable, and then run the aoi
command.
export OPENAI_API_KEY={your_api_key}
aoi
If needed, you can also customize the OpenAI API BASE URL as an environment variable.
export OPENAI_API_BASE_URL={your_custom_api_base_url}
Set Azure environment variables and pass the azure.deployment
to use Azure OpenAI service
export OPENAI_API_KEY={azure openai secret}
export OPENAI_API_BASE_URL={azure openai endpoint}
aoi -azure.deployment {model deployment name}
If you find any issues with Aoi or have suggestions for new features, please feel free to create an issue or submit a pull request on the GitHub repository. Contributions from anyone and everyone are welcome!