Two simple CLI tools for interacting with LLMs directly from your terminal:
ai– Uses Hugging Face's router (Qwen model)fa– Uses OpenRouter (Nemotron model)
-
Clone the repository:
git clone https://github.com/yourusername/terminal_helper.git cd terminal_helper -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts�ctivate
-
Install dependencies:
pip install requests rich
-
Set your API keys as environment variables:
export HUGGINGFACE_API_TOKEN="your_huggingface_token" export OPENROUTER_API_KEY="your_openrouter_key"
(Add these to your shell profile for persistence.)
ai "Explain quantum computing in simple terms"
fa "Write a Python function to calculate Fibonacci numbers"- Both scripts require internet access to call the respective APIs.
- API keys are read from environment variables—never hardcode them.
- The
richlibrary is used for pretty markdown output infa; install it if missing.
MIT