{"id":15063773,"url":"https://github.com/rishang/heygpt","last_synced_at":"2026-03-09T02:32:22.310Z","repository":{"id":173855990,"uuid":"644794736","full_name":"Rishang/heygpt","owner":"Rishang","description":"CLI and UI interface for OpenAI and Gemini with prompts 🔮","archived":false,"fork":false,"pushed_at":"2025-02-12T17:41:36.000Z","size":1037,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T10:12:01.839Z","etag":null,"topics":["ai","bot","chat-cli","chatgpt","cli","cli-tool","fzf","google-palm","openai","palm","prompt","prompt-engineering","prompt-toolkit","python","streamlit","terminal","wisper"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/heygptcli/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rishang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2023-05-24T09:16:37.000Z","updated_at":"2025-02-12T17:41:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5626238-55c9-4725-b936-4c0d25cb8485","html_url":"https://github.com/Rishang/heygpt","commit_stats":null,"previous_names":["rishang/heygpt"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Fheygpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Fheygpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Fheygpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Fheygpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rishang","download_url":"https://codeload.github.com/Rishang/heygpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208618,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","bot","chat-cli","chatgpt","cli","cli-tool","fzf","google-palm","openai","palm","prompt","prompt-engineering","prompt-toolkit","python","streamlit","terminal","wisper"],"created_at":"2024-09-25T00:07:05.100Z","updated_at":"2026-03-09T02:32:22.292Z","avatar_url":"https://github.com/Rishang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# heygpt 🔮\n\n[![Downloads](https://static.pepy.tech/personalized-badge/heygptcli?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=blue\u0026left_text=Downloads)](https://pepy.tech/project/heygptcli)\n\nA simple command line tool to generate text using any LLM (via litellm) based on ready made templated prompts.\n\n#### Using `heygpt` in Web-UI mode:\n\n```bash\nheygpt stream\n```\n\n![](./.github/images/stream.png)\n\n## Purpose\n\n- To provide a simple command line tool to generate text using any LLM (OpenAI, Anthropic, Gemini, etc.) based on ready made templated prompts, in both `cli` as well as `web-ui` interface.\n\n- [CLI demo](./.github/images/demo.gif)\n\n- [UI demo](./.github/images/stream.png)\n\n## Installation\n\n- There is an optional dependency of `fzf` for interactive prompt selection. You can install it using your package manager.\n- refer: [fzf README](https://github.com/junegunn/fzf#installation) for more info on steps to install `fzf`.\n\n```bash\npip install heygptcli\n```\n\n#### help page:\n\n```bash\nheygpt --help\n```\n\nFor debug logs use: `export LOG_LEVEL=DEBUG` or `set LOG_LEVEL=DEBUG` on windows.\n\n## Configuration\n\nYou will need an API key from your LLM provider to use `heygpt`. Supported providers include OpenAI, Anthropic, Google (Gemini), and many more via [litellm](https://docs.litellm.ai/docs/providers).\n\n```bash\n# gpt custom prompts (optional)\nGPT_PROMPT_URL=\u003curl-to-your-prompt-file\u003e\n\n# API Configuration (via litellm)\nOPENAI_API_KEY=\u003cyour-api-key\u003e  # Works with OpenAI and OpenAI-compatible endpoints\nMODEL=gpt-4o  # optional model name (default: gpt-3.5-turbo)\n              # Supports: gpt-4o, claude-3-5-sonnet, gemini-pro, etc.\n```\n\nIn order to configure them you can use `heygpt config` command:\n\n```bash\n❯ heygpt config --help\n\n Usage: heygpt config [OPTIONS]\n\n Configure heygpt.\n\n╭─ Options --------------------------------------------------------+\n│ --prompt-file         TEXT  Prompt file path.                    |\n│ --prompt-url          TEXT  Prompt file url.                     |\n│ --api-key             TEXT  API key (supports any LLM provider). |\n│ --api-endpoint        TEXT  API endpoint URL.                    |\n│ --model               TEXT  LLM model name.                      |\n│ --help                      Show this message and exit.          |\n-------------------------------------------------------------------+\n```\n\nDefault model name is `gpt-3.5-turbo` for this tool. You can change it to any model supported by litellm (e.g., `gpt-4o`, `claude-3-5-sonnet-20241022`, `gemini-pro`, etc.).\n\n```bash\nheygpt config --api-key \u003cyour-api-key\u003e\nheygpt config --model gpt-4o\n```\n\n### Using local/remote prompts\n\nPrompt YAML formate\n\n```yaml\n# ~/path/to/prompts.yaml\n- Title: Fix Grammar\n  Command:\n    - role: user\n      content: |\n        Review the provided text and correct any grammatical errors. Ensure that the text is clear, concise, and free of any spelling mistakes.\n```\n\nTo use your saved prompts run:\n\n```\nheygpt config --prompt-file ~/path/to/prompts.yaml\n```\n\nHere, `--prompt-url ` and `--prompt-file` is optional. If you want to use own custom\nprompts.\n\nFor providing a URL of `yaml` file containing your prompts.\n\n```bash\n# remote yaml file\nheygpt config --prompt-url \u003curl-to-your-prompt-file.yaml\u003e\n```\n\nNote: This is the default yaml used for prompts: [default-prompts.yaml](./example-prompts.yaml), for using your own prompts, you need to follow the same format as in this file.\n\nFor your own prompts by providing a URL to a `yaml` file containing your prompts. You can also use local `yaml` file by providing a relative path to it.\n\n```bash\n# local yaml file\nheygpt config --prompt-file ~/path/to/prompts.yaml\n```\n\n```yaml\n# ~/.config/heygpt/config.yaml\n# You can manually add list of `available_models` in config file for easy access in streamlit UI.\n\n- api_key: sk-proj-********\n  model: gpt-4o\n  available_models:\n    - gpt-4o\n    - chatgpt-4o-latest\n    - gpt-4o-mini\n    - gpt-3.5-turbo\n    - claude-3-5-sonnet-20241022\n    - gemini-pro\n  prompt_file: /home/user/.config/heygpt/prompt.yaml\n```\n\n## Usage Examples\n\n#### Asking `heygpt` to perform a cretain task based on prompt template:\n\n```bash\nheygpt ask\n```\n\n- `heygpt` will ask you to choose a prompt from a list of available templates.\n- After that, it will ask you to enter your query/task and will provide you with the result based on type of prompt you selected.\n\n- You can specify a different model using the `--model` flag:\n\n```bash\nheygpt ask --model claude-3-5-sonnet-20241022\nheygpt ask --model gemini-pro\n```\n\n- For asking queries without any prompt templates you can use `--no-prompt` flag.\n\n```bash\nheygpt ask --no-prompt\n```\n\n#### Convert audio to text using `heygpt`:\n\n```bash\nheygpt wisper ../path/to/audio.mp3\n```\n\n- You can provide standard output as well to `heygpt ask`\n\n  ```bash\n  echo \"why sky is blue\" | heygpt ask --no-prompt\n  ```\n\n  An other way to use it can be providing `wisper` audio 2 text, output to `heygpt ask`:\n\n  ```bash\n  heygpt wisper ../path/to/audio.mp3 | heygpt ask\n  ```\n\nThis will start a `streamlit` server on `localhost`:\n\n#### Using `heygpt` as an API:\n\n```bash\nheygpt api\n```\n\nThis will start a `fastapi` server on `localhost`:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishang%2Fheygpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishang%2Fheygpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishang%2Fheygpt/lists"}