ayo
ayo (pronounced "hey yo!") is a simple command line AI assistant. It can run fully offline using ollama and its bank of pre-trained models.
Quick Start
Pre-requisites
You will need ollama installed and running on your machine, or an accessible server.
Tool support is a recent addition to ollama, and not all models are compatible. Please visit the models page to select a compatible model.
Install
Visit the latest release page and download the appropriate binary for your system. Put the binary somewhere accessible in your PATH.
Add Tools
Put a list of tools you want ayo to be able to use in the toolbox directory.
By default ayo will look into ~/.config/ayo/toolbox.
More about tools in the tools section.
Run
ayo explain my ~/.profile file
Usage
🧰 Tools
Ayo can use all tools from its toolbox to take actions on your local system.
Toolbox
The toolbox is a directory where ayo looks for tools to use.
By default, ayo will look into ~/.config/ayo/toolbox.
You can change the toolbox location by setting the AYO_TOOLBOX environment variable.
Tool
A tool is a JSON file that describes how ayo can use a command on your system.
{
"type": "function",
"function": {
"name": "cat",
"description": "Get the content of a file",
"parameters": {
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "The file to read"
}
},
"required": [
"file"
]
}
},
"cmd": "cat",
"args": [
"{{.file}}"
]
}
Breaking down the JSON file:
typeis the type of tool. Currently, onlyfunctionis supported.functiondescribes the function which will be sent to the model.nameis the name of the function. It must be unique in ayo's toolbox.descriptionis a short description of the function.parametersdescribes the parameters of the function.typeis the type of the parameters. Currently, onlyobjectis supported.propertiesdescribes the properties of the object.requiredis an array of required properties.
cmdis the command to run. It will be executed using theos/execpackage.argsis an array of arguments to pass to the command. The arguments can be templated using Go's text/template package. The template will be executed with the function's parameters values returned by the model.