Installation and Configuration

Note: This section is incomplete and will be rewritten shortly.

Installation

Currently, the only option available to install the program is by using the go command:

$ go install aichatflow.dev/aibot/progs/ai@latest

Alternatively, you can clone the repository and then build and install the program:

$ git clone https://aichatflow.dev/aibot/
$ cd aichatflow
$ go install ./progs/ai

Finally, you need to ensure that your PATH contains the GOPATH directory. In Linux, using bash, the following command should suffice (you can add it to you .bashrc file):

$ export PATH=`go env GOPATH`:$PATH

Configuration

Please note that the only configuration required for the ai program is OpenAI’s API key. You can place the key in the “key” file located in $XDG_CONFIG_HOME/aichatflow. Alternatively, you can make the file executable and ai will run it and retrieve the key from its standard output.

In case you need to customize the default settings, you have the option to create a configuration file. By default, ai reads the $XDG_CONFIG_HOME/aichatflow/config.yaml file, if it exists, unless specified otherwise through the --config command line flag.

On Linux, the $XDG_CONFIG_HOME defaults to $HOME/.config. For other operating systems, please consult the internet (the documentation will be updated soon).

As the file name suggests, the configuration is stored in YAML format and consists of key-value pairs. For a list of possible options, please refer to the output of ai --help (which you can find in the “CLI Reference” section of the documentation).

Congratulations! You are now ready to go. Please refer to the “Basic Usage Examples section” for instructions on how to use the AIChatFlow command line utility.