# The AI tool I use every day costs cents and lives in the terminal

> AIChat turns plain English into shell commands you approve before they run. The setup, the three modes I use daily, and why the whole thing costs cents.

Published: 2026-08-08
URL: https://daniliants.com/blog/aichat-terminal-for-cents/
Tags: aichat, terminal, cli, ai-tools, openrouter, deepseek

---

> It writes the shell command, explains every flag, and never runs anything without you. And it runs on a model so cheap the dashboard struggles to show the spend.

Yes, it has AI in the name. Please don't hate me.

The tool is AIChat, and it is a really nifty CLI program that I use every single day. I love the terminal. I use many terminal-based applications, and for some of them I actually prefer the terminal version to the desktop counterpart. So when I say my most-used AI tool is not a chat window in a browser but a little command-line program, that is not a gimmick. That is just where the work happens.

Here is the whole thing: the two-minute setup, the three modes that earn it a place in my day, and what it actually costs.

## Install is the easy part

AIChat installs in a couple of seconds and is available on all operating systems. Homebrew on Mac, pacman on Arch, Scoop on Windows, even Termux on Android, plus pre-built binaries if you want none of that.

![The AIChat README with install commands](../../assets/blog/aichat-terminal-for-cents/01-aichat-github-readme.png)
*"AIChat is an all-in-one LLM CLI tool featuring Shell Assistant, CMD & REPL Mode, RAG, AI Tools & Agents, and More." Version on screen: v0.30.0.*

Then you point it at a provider. This is the part I like: it supports pretty much every popular provider, over 20 of them, from OpenAI and Claude to Ollama, Groq and OpenRouter, and anything OpenAI-compatible. The configuration is one YAML file in `~/.config/aichat/`. You pick who serves the model; the tool does not care.

## The model is where the money question hides

In my case I went with OpenRouter, and I chose DeepSeek V4 Flash. They recently released a new variant, 0731, which is optimized for agentic work. It is a very cheap model, and it is smart enough for everything you want to do in the terminal.

I want to show you what "very cheap" means, because my own dashboard says it better than an adjective can.

![The OpenRouter activity dashboard](../../assets/blog/aichat-terminal-for-cents/02-openrouter-cost-tiles.png)
*Past 24 hours: total spend 0,04$, 24 requests, 283K tokens, blended rate 0,14$ per million tokens.*

Four cents. That covered 24 requests and 283 000 tokens of a normal working day. There are even free models on OpenRouter you could point it at instead. I made the longer argument about cheap open models when I wrote that [open-source AI is turning into a commodity](https://daniliants.com/blog/open-source-ai-commodity/), so I will not repeat it here. The short version: for a bounded job like terminal work, you pick the model by the job, not by the leaderboard.

![Usage by model on OpenRouter](../../assets/blog/aichat-terminal-for-cents/03-openrouter-usage-by-model.png)
*The whole graph is one model: DeepSeek V4 Flash 0731.*

## The chat mode is the part I skip

Once configured, you can just type `aichat` and chat with the model right there in the terminal.

![The AIChat REPL](../../assets/blog/aichat-terminal-for-cents/04-aichat-repl.png)
*"Welcome to aichat 0.30.0."*

Not really useful, in my opinion. If I want a chat, I have a browser for that. What I really like in AIChat are the three flags: -e, -c, and piping. That is where it stops being a novelty.

## -e: it writes the command, you stay in the driving seat

This is the mode I use most. You type a plain-language request with -e, and it comes back with a shell command. Not the answer, the command.

`aichat -e "how many files in this folder"`

It answers with `find . -maxdepth 1 -type f | wc -l` and then just waits, with a little menu: execute, revise, describe, copy, quit. Nothing has run yet.

![Describe mode explaining the generated command](../../assets/blog/aichat-terminal-for-cents/05-e-mode-describe.png)
*Press d and it explains the whole command, flag by flag: what find does, what -maxdepth 1 restricts, why wc -l counts files.*

Press d for describe and it walks through every part of the command it just proposed. This is why I say you can actually learn from this thing: it tells you what those commands mean, what parameters it used, and why. If the command looks right, you press enter and it runs. In my Downloads folder the honest answer was 514 files. Don't judge.

And if the command is not what you meant, you press r for revise and type a follow-up in plain language: no, I actually meant directories. It writes a new command and waits again.

![Execute and revise in one screen](../../assets/blog/aichat-terminal-for-cents/06-e-execute-revise.png)
*The first run returns 514. The second run, after r for revise, asks: "Enter your revision:".*

It never executes anything automatically. You always see the command first, and you can always ask what it does before it touches anything. There is never a danger of it quietly deleting files. You are always in the driving seat.

## -c: code that goes straight into a file

The -c flag makes it output code and nothing else, which means you can redirect it straight into a file:

`aichat -c "Create hello world python program" > hello.py`

![The -c flag piped into a file, then run](../../assets/blog/aichat-terminal-for-cents/07-c-mode-hello.png)
*python hello.py prints Hello, World! No copy-pasting out of a chat window.*

That is the whole trick. No markdown fences to strip out, no "Sure, here is your program!" preamble to delete. The output is the file.

## The killer: pipe anything into it

This one is basically the reason to have AIChat installed at all. Any CLI program's output can be piped into it, with your question attached:

`netstat -n | aichat "What is listening on ssh port"`

netstat runs, its output goes to AIChat, and AIChat hands it to the model together with your prompt. The output of netstat is huge. The answer is not.

![Piping netstat into AIChat](../../assets/blog/aichat-terminal-for-cents/08-pipe-netstat.png)
*"Based on the netstat output you provided, there is no SSH service (port 22) listening on your system."*

Now think about what else produces huge, unreadable output: build errors, stack traces, logs. When something is not working, you pipe it in and ask. That loop, from error to explanation, without leaving the terminal or pasting anything into a browser, is the killer feature.

One honest footnote: I still have not configured it to strip markdown from answers, which is why you can see raw ** marks in the screenshot. There is a setting for it. I will get to it. Not a big deal.

## -f: ask a file a question

Same idea, for files. Give it a file and a prompt:

`aichat -f hello.py "What is this?"`

![Asking AIChat about a file](../../assets/blog/aichat-terminal-for-cents/09-f-mode.png)
*"This is a simple Python program that prints Hello, World! to the console."*

A trivial example, but swap in a config file you inherited or a script somebody left behind three years ago, and it earns its keep fast.

## Who this is for

There are many other ways to use AIChat. These three are just my favorites, and they cover most of what I actually need AI for during a working day.

If you never open a terminal, nothing here will change that, and that is fine. But if you are in the terminal even occasionally, especially if you sometimes paste commands you do not fully understand from a chatbot into a shell, this is a better loop. The command is shown before it runs, explained on request, and revised in plain language. The AI proposes. You stay in the driving seat.

And the cost argument is hard to beat: a little application, a cheap model, cents for a day of real use. Hopefully this is useful.