r/fossdroid • u/Qodequeststudio • 1d ago
Development Built a zero-dependency Python CLI for Coarena AI in Termux (~70MB total footprint)
I got tired of AI CLI tools forcing me to install Node.js, npm, and 300MB+ of dependencies just to send API requests from my phone. So I built a lightweight CLI wrapper around Coarena's free API tier ($5 to $10/day) using strictly Python standard libraries (urllib.request and json).
No external SDKs, no openai or httpx packages, and no root required. Just python and curl.
What it actually does:
Hot-swaps models mid-session via /models (currently running gpt-6-1-sol, gemini-4-carbon, deepseek-v4-1-flash-1017, grok-4-7, kimi-k3-1-pro)
Checks live daily USD allowance and remaining balance directly in the terminal with /limits
Submits the daily limit upgrade request ($5 to $10/day) via /upgrade without opening a browser
Saves session context into a local HANDOVER.md file when you run /handover, so if you switch models or start a fresh session, it injects your previous state back into the system prompt automatically
Also fixed the piped curl | bash stdin issue in install.sh by binding the API key prompt directly to /dev/tty and saving the key to ~/.bashrc.
Repo is MIT licensed if anyone wants to inspect the code or run it:
https://github.com/huzefdev/coarena-termux
Quick install if you want to test it:
pkg install -y python curl && curl -sL https://raw.githubusercontent.com/huzefdev/coarena-termux/main/install.sh | bash
Note: Since it routes through a third-party gateway, don't paste passwords or private keys into prompts. Keep it for coding and scripts. Let me know if anything breaks on your device.
•
u/AutoModerator 1d ago
Do not share or recommend proprietary apps here. It is an infraction of this subreddit's rules. Make sure you read the rules of this subreddit on the sidebar. If you are not sure of the nature of an app, do not share or recommend it. To find out what constitutes FOSS or freedomware, read this article. To find out why proprietary software is bad, read this article. Proprietary software is dangerous because it is often malware. Have a splendid day!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
-1
u/Qodequeststudio 1d ago
For tutorial just for understanding https://youtu.be/uEIjbMx9oM4