10 unstable releases (3 breaking)
|0.8.2||Nov 21, 2023|
|0.8.0||Nov 10, 2023|
|0.7.5||Sep 25, 2023|
|0.6.0||Sep 6, 2023|
|0.5.0||Sep 5, 2023|
#150 in Parser implementations
141 downloads per month
aio - Streamlined AI Terminal Interactions
Welcome to the README for the
aio command line tool – your gateway to seamless communication with AI engines via the terminal. This tool streamlines interactions with AI APIs, including the OpenAI API, and conveniently formats the results using integrated markdown formatting. Whether you're seeking information, generating content, or experimenting with AI,
aio has you covered.
0.8 BREAKING CHANGES
The default credentials path has changed from
Table of Contents
- aio - Streamlined AI Terminal Interactions
NEW : Run code from code blocks
You can now run code from code blocks using the flag
aio command line tool is designed to simplify your interactions with AI engines by providing an intuitive interface directly within your terminal. Harness the power of large language models such as the OpenAI API without leaving your command line environment.
Install from crates.io
You can now install aio from crates.io using the following command:
cargo install aio-cli
The program will be installed to your
Install from Github releases
aio, follow these steps:
Download the latest release based on you operating system and architecture.
Extract the downloaded archive.
(optional) Add the path of the directory where the binary was extracted to your
PATH. Write this in your
or you can copy the
aioexecutable into your
# sudo may be required sudo cp aio /usr/local/bin
Install from source
aio, follow these steps:
Prerequisites: Make sure you have Rust installed on your system. If not, you can install Rust.
Clone Repository: Clone the
aiorepository to your local machine:
git clone https://github.com/yourusername/aio.git
Build and Install: Navigate to the
aiodirectory and build the tool:
cd aio cargo install --path .
aio is straightforward. In your terminal, simply invoke the tool with appropriate arguments to communicate with AI engines and receive formatted responses.
aio --engine openai:ask "Write an informative article about space exploration."
aio command line tool supports the following arguments:
--config_path: Path to the configuration file. Default is
--creds_path: Path to the credentials file. Default is
-e|--engine <ENGINE>: Name of the AI engine to use. You can optionally append a custom prompt name from the configuration file (e.g.,
openai:command). List of ENGINEs:
openai: OpenAI API
from-file: Read prompts from a file. Useful to debug or test a file.
-f|--formatter <FORMATTER>: Formatter to use. Possible FORMATTERs:
markdown: Parse the text response as markdown and format it in the console.
raw: Doesn't parse the response text. Just displays the raw text response.
By default the formatter is set to
markdownif in terminal/tty, otherwise
-r|--run <METHOD>: Run code block if the language is supported. Possible METHODs:
no: Doesn't run anything.
ask: Ask to run code.
force: Run code without asking.
runis set to
input: User text prompt that will be used for interaction with the AI engine.
-h|--help: Display the help message.
-V|--version: Display the version.
aio can now read input from stdin instead of from parameters.
To fine-tune your AI interactions, you can create and modify a configuration file in YAML format. This file allows you to define prompts, messages, and parameters for different AI engines. Refer to the Configuration Details file for more information.
Secure your API credentials by storing them in a credentials file. This ensures a safe and convenient way to authenticate with AI engines. Credentials can be set up using the
creds.yaml file. Refer to the Credentials Details file for more information.
Here are a few examples to get you started:
Generate a creative story using the OpenAI engine:
aio --engine openai "Once upon a time in a distant galaxy..."
Ask for a command to extract a compressed archive:
aio --engine openai:command "Extract a compressed archive `./archive.tar.gz` to the current directory."
The whole command can be long to type in. You can use aliases in your shell to shorten the command.
alias ask='aio --engine openai:ask' alias command='aio --engine openai:command' ask "Write an informative article about space exploration." command "Extract a compressed archive `./archive.tar.gz` to the current directory."
We welcome contributions from the community to enhance the
aio project. If you're interested in making improvements, fixing issues, or adding new features, feel free to contribute.
By contributing to
aio, you become part of an open-source community working to improve AI interactions in the terminal.
For more detailed guidelines, please refer to our Contribution Guide.
We appreciate your contributions and look forward to collaborating with you!