{"id":20774362,"url":"https://github.com/maxvfischer/askai","last_synced_at":"2025-06-24T01:09:50.661Z","repository":{"id":65347672,"uuid":"578462065","full_name":"maxvfischer/askai","owner":"maxvfischer","description":"Your simple terminal helper - A CLI integration with OpenAI's GPT3","archived":false,"fork":false,"pushed_at":"2023-01-18T18:55:45.000Z","size":124,"stargazers_count":92,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-03T02:31:34.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxvfischer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-15T05:34:42.000Z","updated_at":"2024-02-27T09:48:29.000Z","dependencies_parsed_at":"2023-02-10T16:55:23.171Z","dependency_job_id":null,"html_url":"https://github.com/maxvfischer/askai","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/maxvfischer/askai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Faskai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Faskai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Faskai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Faskai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxvfischer","download_url":"https://codeload.github.com/maxvfischer/askai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxvfischer%2Faskai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261584234,"owners_count":23180675,"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":[],"created_at":"2024-11-17T12:29:16.466Z","updated_at":"2025-06-24T01:09:50.637Z","avatar_url":"https://github.com/maxvfischer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg style=\"display: block;\" align=\"center\" src=\"https://github.com/maxvfischer/askai/blob/main/images/logo.png?raw=True\"/\u003e\n\u003c/div\u003e\n\n`askai` is a CLI integration with OpenAI's GPT3, enabling you to ask questions and \nreceive the answers straight in your terminal.\n\n![conda](https://github.com/maxvfischer/askai/blob/main/images/question_conda.svg?raw=True)\n\n\n| ❗ **Other model integrations** ❗                                                                                                                            |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Currently, `askai` only supports integration with OpenAI. But as soon as other NLP API-endpoints start popping up, I will work on integrating them as well. |\n\n\n## Installation\n\nYou can either install it through pip\n\n```bash\npip install askai\n```\n\nor directly from the repo\n\n```\ngit clone git@github.com:maxvfischer/askai.git\ncd askai\npip install .\n```\n\n## Initialize askai\n\n`askai` needs to be initialized to set up the default config and to connect your \nOpenAI API key. Note that the key is only stored locally in `~/.askai/key`.\n\n```bash\naskai init\n```\n\n![init](https://github.com/maxvfischer/askai/blob/main/images/init.svg?raw=True)\n\n## Create OpenAI API-key\n\nFor `askai` to work, you need to add an OpenAI API-key. When creating an OpenAI account, \nthey give you $18 to use for free. After that you need to set up a paid account to \ncontinue using their service. \n\nDuring the development and testing of this CLI, I used $0.67.\n\nAn OpenAI API-key can be created by:\n\n1. Creating an account on OpenAI: https://openai.com/api/\n2. Logging in and click on `New API keys`\n3. Click `Create new secret key`\n\n## How to use\n\n\n### Simple question\nAsk a question using your saved config.\n\n```\naskai \"\u003cQUESTION\u003e\"\n```\n![conda](https://github.com/maxvfischer/askai/blob/main/images/question_conda.svg?raw=True)\n\n\n### Override config\nIt's possible to override the default config by using arguments:\n\n```\naskai \"\u003cQUESTION\u003e\" --num-answers \u003cINT\u003e --model \u003cMODEL_STRING\u003e --temperature \u003cFLOAT\u003e --top_p \u003cFLOAT\u003e --max-tokens \u003cINT\u003e --frequency-penalty \u003cFLOAT\u003e --presence_penalty \u003cFLOAT\u003e\n```\n![conda](https://github.com/maxvfischer/askai/blob/main/images/haiku.svg?raw=True)\n\n| **Argument**        | **Allowed values**               | **Description**                                                                                                                                                |\n|---------------------|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| --num-answers or -n | \\\u003e0                              | Number of answers to generate. Note that more answers consume more tokens                                                                                      |\n| --model or -m       | See list below                   | Which model to use. See list of available models below.                                                                                                        |\n| --temperature or -t | 0.0 \u003c= t \u003c= 1.0                  | What sampling temperature to use. Higher value makes the model more  \"creative\". Do not use at the same time as `top-p`.                                       |\n| --top-p             | 0.0 \u003c= top_p \u003c= 1.0              | What sampling nucleus to use. The model considers the results of the  tokens with top_p probability mass. Do not use at the same time as `temperature`.        |\n| --max-tokens        | \\\u003e0                              | Maximum number of tokens used per question (incl. question + answer)                                                                                           |\n| --frequency-penalty | -2.0 \u003c= frequency_penalty \u003c= 2.0 | Positive values penalize new tokens based on whether they appear in the text so  far, increasing the model's likelihood to talk about new topics.              |\n| --presence-penalty  | -2.0 \u003c= presence_penalty \u003c= 2.0  | Positive values penalize new tokens based on their existing frequency in the text  so far, decreasing the model's likelihood to repeat the same line verbatim. |\n\n## Update config\nIf you find yourself overriding the config a lot when asking questions, you can update the default config instead.\n\n### Update all config values\n\n```bash\naskai config update all\n```\n\n### Update individual config values\n\n```bash\naskai config update num-answers\naskai config update model\naskai config update temperature\naskai config update top-p\naskai config update max-tokens\naskai config update frequency-penalty\naskai config update presence-penalty\n```\n\n### Reset to default config\n```bash\naskai config reset\n```\n\n### See current config\n```\naskai config show\n```\n\n## Update API-key\n\nIt's possible to update the API-key without re-initializing the CLI.\n\n### Overwrite current API-key\n```\naskai key add\n```\n\n### Remove current API-key\n```\naskai key remove\n```\n\n## Available models\n\nThis list was updated from OpenAI's website on 2022-12-20 and might go out of date at any time. Please\ncheck [here](https://beta.openai.com/docs/models) to see an accurate list.\n\n#### Text-generating models\n| --model          | Description                                  | Max tokens |\n|------------------|----------------------------------------------|------------|\n| text-davinci-003 | The most capable GPT3 model                  | 4000       |\n| text-curie-001   | Worse than davinci. Still capable and faster | 2048       |\n| text-babbage-001 | Can do straight forward tasks. Very fast     | 2048       |\n| text-ada-001     | Capable of very simple tasks. Very fast      | 2048       |\n\n#### Code-generating models\n| --model          | Description                               | Max tokens |\n|------------------|-------------------------------------------|------------|\n| code-davinci-002 | Most capable code-generating model.       | 8000       |\n| code-cushman-001 | Almost as capable as davinci, but faster. | 2048       |\n\n## Important notes\n\nNote that the answers generated by OpenAI and shown by `askai` is by no means a \"truth\". \nYou always need to be skeptical. And of course, don't execute generated commands or code\nwithout verifying that it does what you asked for.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxvfischer%2Faskai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxvfischer%2Faskai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxvfischer%2Faskai/lists"}