{"id":22118235,"url":"https://github.com/haalven/llm_terminal","last_synced_at":"2026-05-08T08:08:39.992Z","repository":{"id":248155638,"uuid":"827891796","full_name":"haalven/LLM_terminal","owner":"haalven","description":"ask LLMs in the terminal","archived":false,"fork":false,"pushed_at":"2026-02-13T12:12:16.000Z","size":1583,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T21:23:22.056Z","etag":null,"topics":["chatgpt","command-line","gemma2","gpt4o","llama3","ollama-api","openai-api","python","terminal"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haalven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-12T15:51:35.000Z","updated_at":"2026-02-13T12:12:20.000Z","dependencies_parsed_at":"2025-01-29T12:10:37.873Z","dependency_job_id":"cde5c69e-a59e-499a-a4b5-61cce75a1699","html_url":"https://github.com/haalven/LLM_terminal","commit_stats":null,"previous_names":["haalven/q"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haalven/LLM_terminal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haalven%2FLLM_terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haalven%2FLLM_terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haalven%2FLLM_terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haalven%2FLLM_terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haalven","download_url":"https://codeload.github.com/haalven/LLM_terminal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haalven%2FLLM_terminal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32772105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","command-line","gemma2","gpt4o","llama3","ollama-api","openai-api","python","terminal"],"created_at":"2024-12-01T13:48:24.244Z","updated_at":"2026-05-08T08:08:39.984Z","avatar_url":"https://github.com/haalven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ask LLMs in the Terminal\n\n`ask_openai.py` – call the [OpenAI API](https://openai.com/api), `API_KEY` required \n\n`ask_ollama.py` – call the [local Ollama API](https://ollama.com/) (localhost:11434)\n\nrequired:\n* [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) (input)\n* [openai](https://github.com/openai/openai-python) (ask_openai.py)\n* [requests](https://requests.readthedocs.io/) (ask_ollama.py)\n* [rich](https://github.com/Textualize/rich) (output)\n\n## OpenAI API\n\n[ask_openai.py](https://github.com/haalven/LLM_terminal/blob/main/ask_openai.py) uses the [openai Python library](https://github.com/openai/openai-python) to call the [OpenAI API](https://openai.com/api). An internet connection is required.\n\n[ask_openai.toml](https://github.com/haalven/LLM_terminal/blob/main/ask_openai.toml) ➔ you have to insert your `API_KEY` by editing the `my_api_key = \"sk-***\"` line before running the script.\n\nusage: `./ask_openai.py \u003cmodel\u003e [question?]`\n\nChoose a specific OpenAI model ➔ see: [platform.openai.com/docs/models](https://platform.openai.com/docs/models).\n\n## Ollama API\n\n[ask_ollama.py](https://github.com/haalven/LLM_terminal/blob/main/ask_ollama.py) uses the [requests Python library](https://requests.readthedocs.io/) to call the [local Ollama API](https://ollama.com/) (based on [llama.cpp](https://en.wikipedia.org/wiki/Llama.cpp)). An internet connection is not required. Install Ollama first and start the local server (localhost:11434). To download LLMs use the `ollama run \u003cmodel\u003e` command.\n\nusage: `./ask_ollama.py \u003cmodel\u003e [question?]`\n\nGood general LLMs for computers with 8…16 GB of RAM in 2026 are `gemma3:12b` by Google (12B, 8.1GB) and `llama3.1:8b` by Meta (8B, 4.9 GB). See also: [ollama.com/models](https://ollama.com/models). and [canirun.ai](https://www.canirun.ai)\n\n## Example\n\n![example screenshot](example1.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaalven%2Fllm_terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaalven%2Fllm_terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaalven%2Fllm_terminal/lists"}