Introduction to Aoi
Aoi, named after the Japanese word for "hollyhock," is a unique project that takes inspiration from "Ghost in the Shell" and is powered by OpenAI's technology. Its main objective is to facilitate natural language conversations with AI directly from the terminal. This means users can ask questions or give commands in plain language, and Aoi will understand and execute them efficiently.
Key Features
Aoi offers several built-in features designed to boost productivity and streamline tasks for its users:
-
Code Generation: With the
/code
command, Aoi can create code snippets and automatically copy them to the clipboard. For instance, using a command like/code go generate random numbers
will generate the corresponding Go code for generating random numbers. -
Database Management: By employing the
/db
command, Aoi can automatically load database schemas and execute SQL queries. This is particularly useful for database management tasks, such as listing tables from a specific database. -
Shell Commands: Users can generate and execute shell commands using
/shell
. For example,/shell view listening ports
allows users to quickly view active listening ports on their system. -
Remote Command Execution: The
/ssh
command enables users to execute shell commands on a remote host, which is exceptionally helpful for managing remote servers. For example, they can view listening TCP ports on a specified host. -
Content Summarization: Aoi can provide summaries of web content with the
/summary
command, even translating the summary if needed. This transforms lengthy articles into concise summaries. -
Brief Command Explanations: The
/tldr
command offers a quick explanation of a shell command, which is beneficial for understanding specific commands without diving into lengthy manuals. -
Translation: By utilizing
/trans
, Aoi can translate text into a specified language, enabling users to communicate across language barriers. -
Copying Text: The
/copy
command allows users to copy the last reply conveniently.
Getting Started
Getting started with Aoi is straightforward. Users can download it from the GitHub release page or use Go to install it on their system using the following command:
go install github.com/shellfly/aoi@latest
OpenAI API Key
To use Aoi, users must set their OpenAI API key as an environment variable and then run the aoi
command:
export OPENAI_API_KEY={your_api_key}
aoi
Customizing OpenAI API Base URL
For those who need it, Aoi also allows the customization of the OpenAI API Base URL via an environment variable:
export OPENAI_API_BASE_URL={your_custom_api_base_url}
Azure OpenAI
For users leveraging Azure's OpenAI service, Aoi provides options to configure Azure-specific environment variables and pass the azure.deployment
command to specify the model deployment:
export OPENAI_API_KEY={azure openai secret}
export OPENAI_API_BASE_URL={azure openai endpoint}
aoi -azure.deployment {model deployment name}
Demos
A variety of demos are available to illustrate Aoi's capabilities, including showing how it works with shell commands and database queries. These visual aids, found in the documentation, provide a clear example of what users can achieve with Aoi.
Contributing
Aoi is an open-source project inviting contributions from the community. Users are encouraged to report issues or suggest new features by creating issues or submitting pull requests on the GitHub repository. The collaborative effort from users worldwide is essential to Aoi's evolution and improvement.