AI in the terminal with the aio command: installing, logging in and chatting

All in One AI·· 5 views· 3 min read

In short: aio is the All in One AI terminal command. You install it with one line, log in with your API key and chat with the models without writing code. It is free: you only pay credits for what you use, at the same prices as the API.

Installing

You need Node.js 18 or later (check with node --version). On Linux and macOS:

curl -fsSL https://docs.interweb.ao/cli/install.sh | sh

On Windows, in PowerShell: irm https://docs.interweb.ao/cli/install.ps1 | iex. The installer checks the file and never asks for administrator rights. You can also install it with npm: see Install in the documentation.

Logging in with your key

Create a key in the API Center with the ai:read and ai:write permissions. Then run aio auth login and paste it. aio does not show it on screen, checks it with the API and saves it in a file only your user can read. aio auth status shows the key in use, masked, and your balance.

Chatting

Command What it does
aio chat "Explain what an MX record is" Asks the question and shows the reply as the model writes it.
aio chat Opens a conversation in the terminal. /reset starts again and /exit quits.
cat prompt.txt | aio chat Uses the text in the file as the prompt.
--model, --max-tokens, --system Choose the model, limit the reply and give instructions, such as "Reply in English".
aio balance Shows your AI credits and, with a Coding Plan, the points left.
aio models --type text Lists the text models with their price in credits.

After each reply, aio shows the input and output tokens. aio balance, aio models and aio status do not use credits.

On a server or in a pipeline, use the AIO_API_KEY variable instead of the saved key. It takes priority and is never written into any project file.
With a sandbox_ key, aio chat always replies "Resposta de teste (sandbox)." and costs nothing. Handy for testing your scripts. aio also generates images, video and voice: see the CLI page.

Want every command and option? They are on the CLI page in the documentation.

Read the documentation

SEE ALSO

Choosing a text model: price, context window and what each one is for

What a chat request costs through the API: the reservation, max_tokens and the final adjustment

Creating an API key: name, mode, permissions, validity, IP list and spending limit

Testing All in One AI in the Sandbox at no cost: what each answer looks like

Chat and text in All in One AI

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.59/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.