A lightweight self-hosted AI companion that runs inside Termux.
It watches your recent bash commands, reads files, suggests fixes, answers questions and learns from you to better suit your needs.
He's called ODB after the GOAT ODB from Wu-Tang Clan.
He is mostly for users who do not understand Termux or coding in Termux making it easier to get help with commands, scripts and errors.
- Chat-style AI powered by Cerebras inference (very fast and secure!)
- Context-aware — automatically includes your ~last 12 executed commands (from
~/.bash_history) - File helpers:
odb read <file>→ shows file content
odb fix <file>→ suggests improvements / patch - Personal knowledge base:
odb teach me about git hooks: pre-commit runs before commit→ remembers forever, learns from you - Safety first — never modifies files automatically, only suggests changes
- Privacy-focused — anonymous requests to the model provider
- Runs in background with a simple command
- Help command:
odb helpfor usage guide
| Item | Purpose | Termux install command |
|---|---|---|
| Termux | Android terminal emulator | (already installed) |
| Python 3 | Runs server & wrapper | pkg install python |
| pip | Installs Python packages | pip install --upgrade pip |
| curl | Used by the odb wrapper | pkg install curl |
| git | Clone the repository | pkg install git |
| Cerebras API key | Access to fast LLM inference | Sign up at https://cloud.cerebras.ai → API Keys → Create key (free tier available) |
Important: You need a Cerebras API key — free tier is generous (~1M tokens/day). Keep it private!
git clone https://github.com/DresOperatingSystems/DresTermuxAI.gitcd DresTermuxAIpip install -r requirements.txtnano odb.pyAPI_KEY = "place cerebras api key here"
Replace "place cerebras api key here" with your real key should start with csk- or cs-.
save it (Ctrl+X, Y, enter).
nohup python odb.py > ~/.odb_server.log 2>&1 &
disownps aux | grep odb.pytail -f ~/.odb_server.log(Use Ctrl+C to stop watching.)
mkdir -p "$HOME/bin"cat > "$HOME/bin/odb" << 'EOF'
#!/usr/bin/env bash
# ODB – simple wrapper that sends your query to the local server
msg="$*"
encoded=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$msg")
curl -s "http://127.0.0.1:8123/chat?q=${encoded}"
EOFchmod +x "$HOME/bin/odb"echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrcsource ~/.bashrcUse odb help to see what he can do or just talk to him.
odb <message>odb helloodb teach me about the termux api systemodb read myscript.shodb fix mycode.py- General chat:
odb <your question>. - Teach:
odb teach me about python(saves to knowledge base). - File read:
odb read <file>. - File fix:
odb fix <file>(describe the issue in the message or paste code snippets). - Recent activity:
odb what have I been doing lately?(references bash history). - Help:
odb help.
ODB will respond right in your terminal.
- Server not starting?
- Check logs:
tail -f ~/.odb_server.log(look for errors like missing modules or bad API key).
- Check logs:
- Connection refused error?
- If server isn't running try to restart it with the nohup command.
- No reply / empty output?
- Check if the server is alive:
ps aux | grep odb.pyorcurl http://127.0.0.1:8123/chat?q=test.
- Check if the server is alive:
- API errors?
- Verify your Cerebras key in odb.py is correct and active (check https://cloud.cerebras.ai).
- Slow or killed in background?
- Run termux-wake-lock and set Termux battery to "Unrestricted" in Android Settings → Apps → Termux → Battery.
- Need to reset knowledge/history?
- Delete ~/.odb_knowledge.json or ~/.odb_history.json.
- If non of that works then run odb in the frontend using
python odb.pyand read what the output says.
pkill -f odb.pyWe recently deployed our own website that gives you access to other DresOS services like our own ecoverse where you can post bug reports and feedback it is also where you can find sneak peeks of our future projects etc etc so please go ahead and check it out. https://dresoperatingsystems.github.io/
Thank you and lets keep building,
The DresOS Team (forever free, forever private)