Getting Started

CLAi is simple to set up and use.

Do the following to get started:

1. After installation, get an OpenAI API key.

  • Use your existing OpenAI account, or create a new account and log in at https://platform.openai.com/.
  • After logging in with OpenAI, navigate to Settings -> API Keys.
  • Create a new secret key, and ensure you keep it in a secure location.
  • CLAi will use this API key to make requests to OpenAI. Be aware that OpenAI charges for the usage of their API. Refer to point 6 below for more information.

2. Open CLAi, and click on Settings.

  • Enter the OpenAI secret key in the designated field under settings. (This key is stored locally on your system.)
  • Leave the other defaults as is.

3. Set up an SSH server.

CLAi connects to any SSH server, including Windows, Linux, and macOS servers. It will also connect to firewalls, routers, and other network devices that support SSH. - Click on the interaction tab within CLAi, then on the gear icon. - Select "Add new SSH Server" and fill in the details of your SSH server, then click Save.

If you want CLAi to execute commands on your local machine, set up an SSH server on your local machine, and add this local SSH server's details to CLAi.

4. Connect and fire away!

  • After setting up an SSH server, select it from the dropdown list.
  • Click "Connect to".
  • CLAi will now connect to your server.

5. Ask CLAi to execute a goal or commands.

  • If the connection was successful, you will see the server's initial output in the "System Output" panel on the right.
  • CLAi will respond with a greeting message.
  • Now, you can type your request in the input box at the bottom left of the screen, for example, "How much disk space do I have left?"
  • CLAi will execute one or multiple commands, which will be displayed in the System Output Panel.
  • Once the command has finished executing, the output of the command will also be shown in the System Output panel.
  • CLAi will now also provide its comments on the output in the Interaction panel.

6. Run your own commands.

  • You have the ability to run your own commands by typing them in the input box at the bottom right of the screen.
  • This feature is useful in cases where you want to run a command that CLAi refuses to run for security reasons.
  • You can also send passwords and other sensitive information by typing 'secure:' followed by the command. For example, "secure:echo 'mysecret' | sudo -S ls -la"
  • Commands prefixed with 'secure:' will not be stored in the conversation history or be sent to the relevant AI provider.

You have now successfully set up CLAi and executed your first command. Time to get creative, ask CLAi something more complicated!

IMPORTANT:
Keep an eye on the total number of tokens at the bottom of the window. The larger the current conversation's tokens, the more costs are incurred to your OpenAI account. Be sure to clear the current conversation (trashcan icon) when CLAi has reached a sufficient goal.

7. Important for AI newcomers

  • CLAi currently integrates with OpenAI via OpenAI's API. In the future, CLAi will support other AI providers as well.
  • CLAi makes requests to OpenAI using your API key. Each time you issue a request to CLAi, or when CLAi executes a command and retrieves system output, costs are incurred to your OpenAI account via your API key.
  • At the bottom of the CLAi interface, you will notice the number of tokens for the current conversation. The larger a conversation gets (or the more the total tokens are), the more costs are incurred on your OpenAI account. Therefore, be sure to clear a conversation with the trashcan icon when CLAi has finished a goal or task.
  • As a built-in protection, you can limit the amount of tokens a single system response can contain. The default is set to 3500 and can be changed under the settings tab. Whenever a system response is longer than 3500 tokens (for example, when displaying a large logfile), only the first 3500 tokens are returned to CLAi, and the rest are truncated. The total conversation length is also limited to 100000 tokens (or as specified under Settings). This means that a conversation with CLAi (your requests, CLAi's comments, as well as system output) will be limited to 100000 tokens.