Lidet from the terminal

One command to ask a model something, write files from a description, or check what you have spent. Same API, same prices, same prepaid wallet as everything else.

Install

It is a single file and needs nothing but Python 3.

# straight onto your path, in one line
sudo curl -fsSL https://lidetai.com/cli/lidet -o /usr/local/bin/lidet
sudo chmod +x /usr/local/bin/lidet

lidet login        # paste a key from the console

Writing straight to the destination rather than the current folder, so it cannot collide with a file or directory already called lidet — and -f so a bad response fails loudly instead of leaving you an HTML error page marked executable.

Ask something

lidet ask "write a polite SMS in Amharic saying an order is ready"
lidet ask -f server.py "what breaks if two workers run this?"
cat error.log | lidet ask "what is failing here?"

Every answer ends with one quiet line: tokens in and out, what it cost in birr, and how long the first token took.

Write files

lidet code asks for whole files, shows you what it would write, and writes nothing until you say so.

$ lidet code "a flask app with a /health route and a test"

         new  requirements.txt   2 lines
         new  src/app.py        11 lines
         new  tests/test_app.py 13 lines
         new  README.md         11 lines

  229 in / 250 out  ·  ETB 0.06  ·  0.4s to first token
  write these? [y/N]

Those are the real numbers from that exact command on the default model, not an illustration. A larger project costs more: the same tool asked for a Node API with a web page wrote nine files for about ETB 1.73 on lidet-reasoning, which thinks longer and charges for it.

Paths outside the current folder are refused, Python that does not parse is flagged before you write it, and if the answer hits the token ceiling it says so rather than leaving you a file that stops mid-line. Add --dry-run to look without writing, -f to show it files it should work from, and --into dir to write somewhere else.

Have a conversation

$ lidet chat
Lidet · lidet-general
  /model <id> to switch, /clear to forget, /cost for the total

› what is 17 percent of 48,000 birr?
8,160 birr.
  83 in / 69 out  ·  ETB 0.06  ·  session ETB 0.06
It will not run up a bill quietly. A chat carries about 1,500 tokens of recent conversation and drops the rest, and says so when it does. Anything that would cost more than ETB 2 asks first, or ETB 6 for lidet code, which is asked for a whole project and priced accordingly. Every turn prints its own cost and the session total.

Commands

CommandWhat it does
lidet loginSave an API key on this machine, readable only by you.
lidet askOne question, one answer, no history. The cheapest way to use it.
lidet codeWrite files from a description, after showing you what they are.
lidet chatA conversation, with the running cost on screen.
lidet balanceWhat is left, what today has cost, and what the rate limit is.
lidet modelsWhat is for sale and what it costs per million tokens.
lidet usageWhat the last few days cost, by model.

Settings

FlagMeaning
--modelWhich model to use for this run.
-m NCeiling on the answer's length. Default 600, and 6,000 for lidet code, which needs the room to finish a project rather than stop mid-file.
-yDo not ask before an expensive turn.
-qAnswer only, no cost line. For scripts.
--urlA different gateway, for testing.

The key and the address live in ~/.lidet/config.json. LIDET_API_KEY and LIDET_API_URL override them, which is what you want in CI.

What it is not

It does not run commands, edit files in place or loop on its own output. It asks a model and writes what comes back, after showing you. That is a deliberate line: an agent that edits your repository unattended is a different tool with a different risk, and a much larger bill.