{"id":17684566,"url":"https://github.com/sujjeee/gemai","last_synced_at":"2025-11-03T16:05:06.822Z","repository":{"id":215004086,"uuid":"737879714","full_name":"sujjeee/gemai","owner":"sujjeee","description":"GemAI - A Free RAG CLI ChatBot 🤖","archived":false,"fork":false,"pushed_at":"2024-08-26T13:31:27.000Z","size":309,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T03:50:01.121Z","etag":null,"topics":["ai","ai-chatbot","chatbot","cli","gemini","google-gemini","nodejs","npm","npm-package","rag"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gemai","language":"TypeScript","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/sujjeee.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}},"created_at":"2024-01-01T20:33:57.000Z","updated_at":"2024-10-09T00:46:16.000Z","dependencies_parsed_at":"2024-10-24T12:59:58.294Z","dependency_job_id":"4d092105-f56d-41a1-8e74-7a62ff202624","html_url":"https://github.com/sujjeee/gemai","commit_stats":null,"previous_names":["sujjeee/gemai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujjeee%2Fgemai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujjeee%2Fgemai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujjeee%2Fgemai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sujjeee%2Fgemai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sujjeee","download_url":"https://codeload.github.com/sujjeee/gemai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156145,"owners_count":20732371,"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","ai-chatbot","chatbot","cli","gemini","google-gemini","nodejs","npm","npm-package","rag"],"created_at":"2024-10-24T10:23:57.927Z","updated_at":"2025-11-03T16:05:06.730Z","avatar_url":"https://github.com/sujjeee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GemAI - Free ChatBot CLI 🤖\n`GemAI` is a command-line interface (CLI) `AI ChatBot` that uses `Google’s Gemini` API to generate natural language responses. You can chat with GemAI about anything, from images to documents, and have fun and engaging conversations.\n\n## Quick Demo\nhttps://github.com/sujjeee/gemai/assets/101963203/461c7675-33ad-4a91-a98a-ff8a2f29d8f6\n\n## Installation:\nInstalling GemAI is simple. For global access, execute one of the commands below:\n\n* **Using Node Package Manager (NPM):**\n```bash\nnpm install -g gemai\n```\n\n* **or if you are using (PNPM):**\n```bash\npnpm install -g gemai\n```\n\n## Usage:\n\n### Logging In:\nBefore using GemAI, you'll need to log in with your Google Gemini API token. To do this, run the following command:\n\n```bash\ngemai login [token]\n```\n\n**Example:**\n```bash\ngemai login Flqw9TUeaSkRfRii3lmgZLid\n```\n\nThis command sends a request to the Gemini endpoint for authentication. Upon receiving a successful response, your API key will be verified. \n\nTo obtain your free API key, head over to [Google Gemini API Key](https://makersuite.google.com/app/apikey).\n\nIf you encounter any issues, try running `gemai login \u003ctoken\u003e` again to refresh your credentials.\n\n### Viewing Configuration:\nTo view your current GemAI configuration, simply type:\n\n```bash\ngemai config\n```\n\nThis will display the contents of the `gemai.json` file stored on your machine.\n\n### Updating Configuration:\n\nTo update the default values of GemAI, run this command:\n\n```bash\ngemai config set\n```\n\nBy default, when you log in, we have set some default values that are required for the Google Gemini API to work properly, such as:\n\n- `maxOutputTokens`: 2048\n- `topK`: 40\n- `topP`: 1\n- `temperature`: 0.7\n- `kwargs`: 1\n\nTo update these default values, simply run `gemai config set`. After running this command, you will be prompted to enter your desired values in place of the default values.\n\n### Chat with GemAI:\nTo start chatting with the GemAI chatbot, run this command:\n\n```bash\ngemai chat\n```\n\nOnce you are logged in, you can have a natural language conversation with the chatbot.\n\n### Chat with image\nYou can also chat with an image by running:\n\n```bash\ngemai vision \u003cimage path\u003e\n```\n\nWhen you provide the path to an image, it will be converted to `base64`. When you ask a question about the image, `GemAI` will send a request to the `Gemini Vision` endpoint with the image data and your question. The response from Gemini will be used to generate a reply.\n\n**Example:**\n```bash\ngemai vision public/image.jpg\n```\n\nYou can ask questions like \"What's happening in the image?\", \"Who are the people in the image?\", or \"What is the object on the left?\".\n\n### Chat with Document\nYou can also chat with a document by running:\n\n```bash\ngemai read \u003cdocument path\u003e\n```\n\nYou need to provide the `path` of your document, and optionally specify its `file type` using the `-f` flag. Default `file type` is set to `text` because it allows for easier splitting and chunking of content.\n\nHowever, we generally `recommend` using the `text` file type for seamless conversations with any document.\n\n**Example:**\n\n```bash\ngemai read \u003cdocument path\u003e -f pdf\n```\nGemAI supports five file types: `pdf`, `text`, `json`, `csv`, and `url`. \n\n**Note:** The `url` file type is included for convenience, allowing you to fetch data from websites that allow bots to scrape their web pages.\n\nGemAI also provides `verbose` output, displaying the retrieval process of chunks based on your queries.\n\n**Example:**\n```bash\ngemai read resume.pdf -f pdf -t\n```\n**Fun Fact:** We can't use `-v` for `verbose` flag as it is already assigned as version flag.\n\nBy default, GemAI use `MemoryVectorStore` to manage splitted chunks and indexes. \n\nIf you want to save the chunks and indexes to your local machine, you can use the `-s` flag. This will create a directory with a nanoid in `/user/.config/configstore/gemai`. You can also use the `-n` flag to give a `custom name` to the directory.\n\n**Example:**\n```bash\ngemai read resume.pdf -f pdf -s -n resume-store\n```\n\nIf you have already created and saved a `vector store` on your machine, you can load it by using the `-l` flag. This flag requires the location/path of the vector store directory.\n\n**Example:**\n```bash\ngemai read resume.pdf -f pdf -l C:\\Users\\asus\\.config\\configstore\\gemai\\resume-store\n```\n\n## Credits:\nGemAI utilizes `Google's Gemini` API for its chatbot capabilities. To obtain your free API key, head over to [Google Gemini API Key](https://makersuite.google.com/app/apikey).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsujjeee%2Fgemai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsujjeee%2Fgemai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsujjeee%2Fgemai/lists"}