little-tui is a coding assistant that runs inside your terminal. You describe a task in plain English and it plans, runs tools, and keeps going until the job is done. It talks to OpenAI-compatible APIs: OpenRouter (default) or Groq. Everything stays in your terminal and every conversation is saved so you can pick it up again later.
This guide covers what little-tui is, the tools it has, how to install it on a new device, where to get an API key, how to set the key up, and how to use it.
- Streams replies as they are generated, right in the terminal
- Reads and writes files, searches your project, and runs shell commands on its own
- Works through multiple steps until a task is finished
- Saves every conversation and resumes it later with
/sessions - Switches between providers and models at any time
- Runs on Linux and on Termux (Android)
little-tui has these tools:
| Tool | What it does |
|---|---|
read_file |
Shows a file with numbered lines |
write_file |
Creates or overwrites a file |
edit_file |
Replaces one exact block of text in a file |
list_dir |
Shows the contents of a folder |
glob |
Finds files by pattern, for example **/*.py |
grep |
Searches file contents with a regular expression |
shell |
Runs a shell command (asks for your approval first) |
current_datetime |
Returns the current UTC date and time |
Safety rules:
- All file tools stay inside the workspace folder. Paths that escape the
workspace (like
..) are rejected. - The
shelltool asks for approval before running. Use--allow-shellto auto-approve shell commands, or--yoloto auto-approve every tool call. - Each turn is limited to 50 tool steps and a cost cap, so a run can never spiral out of control.
- Python 3.10 or newer (check with
python3 --version) git- An API key from one of the providers below
On Termux (Android), install Python and git first:
pkg install python gitlittle-tui needs an API key from one provider. Both have a free tier.
- Create a free account at https://console.groq.com (sign in with Google or GitHub).
- Open API Keys at https://console.groq.com/keys.
- Click Create API Key, give it a name, and copy the value.
- Keys start with
gsk_.
- Create an account at https://openrouter.ai.
- Open Keys at https://openrouter.ai/settings/keys.
- Click Create Key and copy the value.
- Keys start with
sk-or-v1-. Free models need no credit.
Keep your key private. Anyone with it can spend money on your account.
Use the quick installer, or install it manually.
git clone https://github.com/Sol0-dev/little_tui
cd little_tui
./install.shWhat the installer does:
- Creates a virtual environment (
.venv) and installs little-tui into it. - Links the
little-tuicommand into~/.local/bin(Linux) or$PREFIX/bin(Termux). - Asks which provider you want and where to paste your API key, then saves
~/.config/little-tui/config.jsonso you can start right away. - Prints the next steps.
Prefer to skip the interactive key prompt (for example, if you will export the keys yourself)?
NONINTERACTIVE=1 ./install.shIf you manage your own Python environment:
git clone https://github.com/Sol0-dev/little_tui
cd little_tui
pip install -e .
little-tui --versionOn Termux the little-tui command goes into $PREFIX/bin, which is already on
your PATH. On Linux it usually goes into ~/.local/bin. Add that folder to your
PATH if the command is not found:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcThe installer does this for you. If you prefer to do it yourself, use one of the two options below. Settings priority: defaults, then config file, then environment variables.
Create a file at ~/.config/little-tui/config.json (or wherever
LITTLE_TUI_CONFIG points):
{
"provider": "groq",
"api_key": "gsk_your_key_here",
"model": "llama-3.3-70b-versatile"
}Add these to ~/.bashrc or ~/.profile, then run source ~/.bashrc:
export GROQ_API_KEY=gsk_your_key_here
export OPENROUTER_API_KEY=sk-or-v1-your_key_here
export LITTLE_TUI_PROVIDER=groqYou only need the key for the provider you are actually using. little-tui uses
the key of the active provider. If you have both keys, switch with
--provider openrouter or --provider groq (or /provider inside the REPL).
little-tuiType a task and press Enter. The assistant streams its reply, shows each tool it
runs, and reports steps and cost when it finishes. Press Ctrl+C to stop the
current response. You can paste multi-line text (for example a code snippet or a
list of steps) into the prompt; it is sent as one task, not one per line.
Example:
> list the files in this project
tool list_dir path='.'
...
done in 3 steps, $0.0001
Run a single task and exit:
little-tui --prompt "summarize the README"
echo "list the files" | little-tui
little-tui --prompt "explain config.py" --workspace ~/myproject| Option | What it does |
|---|---|
--provider |
API provider: openrouter (default) or groq |
--model |
Model slug, for example llama-3.3-70b-versatile |
--prompt |
Run one task non-interactively and exit |
--workspace |
Working folder for tools (default: current folder) |
--allow-shell |
Auto-approve shell commands |
--yolo |
Auto-approve every tool call (edits and shell) |
--max-tokens |
Max output tokens per model call |
--config |
Path to a JSON config file |
--no-color |
Turn off colors |
| Command | What it does |
|---|---|
/help |
List commands |
/model [slug] |
Show or switch the model |
/provider [name] |
Switch API provider (openrouter, groq) |
/sessions |
Pick a past conversation with the arrow keys |
/sessions <id> |
Resume a past conversation by id |
/new |
Start a fresh conversation |
/cost |
Show cost and token usage |
/session |
Show the session log path |
/tools |
List available tools |
/quit |
Exit |
Every conversation is saved to a JSONL log in
~/.local/share/little-tui/sessions/ (for example 20260808-103015.jsonl).
It survives restarts and crashes. Only the 5 most recent sessions are kept; the
oldest are removed automatically when a new session starts.
/sessionsopens a picker. Use the up and down arrow keys to move, Enter to resume, andqorEscto cancel./sessions <id>resumes a conversation directly. The full conversation is shown again, and new turns keep appending to the same log.
The logs are plain text, so you can grep, back up, or share them with any JSONL tool.
Precedence: defaults, then JSON config file, then environment variables.
Environment variables:
| Variable | Purpose |
|---|---|
OPENROUTER_API_KEY |
OpenRouter key |
GROQ_API_KEY |
Groq key |
LITTLE_TUI_PROVIDER |
Active provider |
LITTLE_TUI_MODEL |
Model slug |
LITTLE_TUI_WORKSPACE |
Default workspace |
LITTLE_TUI_MAX_STEPS |
Max tool steps per turn (default 50) |
LITTLE_TUI_MAX_COST |
Max dollars per turn (default 2.0) |
LITTLE_TUI_MAX_TOKENS |
Max output tokens (default 4096) |
LITTLE_TUI_MAX_HISTORY_TOKENS |
Max past-conversation tokens sent per request (default 2000) |
LITTLE_TUI_ALLOW_SHELL |
Auto-approve shell tools |
LITTLE_TUI_ALLOW_ALL |
Auto-approve every tool call (same as --yolo) |
LITTLE_TUI_SYSTEM_PROMPT_FILE |
Path to a custom system prompt |
Long conversations: every request resends the recent history. To keep requests
small, only the newest turns that fit within LITTLE_TUI_MAX_HISTORY_TOKENS are
sent (old turns are dropped whole, so tool calls always stay paired with their
results). Lower it on heavily rate-limited free tiers; raise it to keep more
early context.
| Provider | Key variable | Default model |
|---|---|---|
openrouter |
OPENROUTER_API_KEY |
nvidia/nemotron-3-super-120b-a12b:free |
groq |
GROQ_API_KEY |
openai/gpt-oss-120b |
Pick a provider with --provider, LITTLE_TUI_PROVIDER, the provider key in
the config file, or /provider in the REPL. Switching also switches the API
endpoint, headers, and default model.
Groq note: the free tier caps openai/gpt-oss-120b at 8000 tokens per minute,
which is tight for tool-heavy work. Use llama-3.3-70b-versatile instead. The
installer sets this model automatically when you pick Groq. Groq also counts
max_tokens against that per-minute budget, so a large max_tokens means fewer
requests per minute. If you keep hitting rate limits, lower max_tokens (for
example 2048) or LITTLE_TUI_MAX_HISTORY_TOKENS. Rate-limited requests are
retried with the provider's suggested delay before they fail.
| Problem | Fix |
|---|---|
OPENROUTER_API_KEY is not set |
Export the key for your active provider (see section 3). |
GROQ_API_KEY is not set |
Export GROQ_API_KEY or set api_key in the config file. |
unknown provider 'x' |
Use openrouter or groq. |
Request too large ... TPM (Groq) |
Free-tier per-minute token limit. Lower max_tokens (for example 2048) in the config file, or wait a minute. Rate-limited requests retry automatically. |
little-tui: command not found |
Run ./install.sh again and make sure the bin folder is on your PATH. |
ModuleNotFoundError: little_tui |
Reinstall the package. |
