{"id":35005678,"url":"https://github.com/tanmayvaij/diagem-cli-bot","last_synced_at":"2025-12-27T04:37:11.283Z","repository":{"id":322423546,"uuid":"1089431924","full_name":"tanmayvaij/diagem-cli-bot","owner":"tanmayvaij","description":"A minimal TypeScript CLI chatbot built using the diaflow-gemini SDK. This example demonstrates how to connect to Google Gemini 2.0 Flash via DiaFlow and interact through your terminal.","archived":false,"fork":false,"pushed_at":"2025-11-04T10:38:31.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-04T12:19:48.011Z","etag":null,"topics":["ai","ai-agents","demo","diaflow","framework","gemini"],"latest_commit_sha":null,"homepage":"","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/tanmayvaij.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":"2025-11-04T10:35:39.000Z","updated_at":"2025-11-04T10:40:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tanmayvaij/diagem-cli-bot","commit_stats":null,"previous_names":["tanmayvaij/diagem-cli-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tanmayvaij/diagem-cli-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmayvaij%2Fdiagem-cli-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmayvaij%2Fdiagem-cli-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmayvaij%2Fdiagem-cli-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmayvaij%2Fdiagem-cli-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanmayvaij","download_url":"https://codeload.github.com/tanmayvaij/diagem-cli-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanmayvaij%2Fdiagem-cli-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28072389,"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","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","ai-agents","demo","diaflow","framework","gemini"],"created_at":"2025-12-27T04:37:10.575Z","updated_at":"2025-12-27T04:37:11.275Z","avatar_url":"https://github.com/tanmayvaij.png","language":"TypeScript","readme":"# 🧠 DiaGem CLI Bot\n\nA **minimal TypeScript CLI chatbot** built using the [`diaflow-gemini`](https://www.npmjs.com/package/diaflow-gemini) SDK.  \nThis example demonstrates how to connect to **Google Gemini 2.0 Flash** via DiaFlow and interact through your terminal.\n\n---\n\n## 🚀 Features\n\n- ⚡ Minimal setup — less than 50 lines of code  \n- 💬 Interactive terminal chat (type \u0026 get instant responses)  \n- 🔐 Secure API key loading via `.env`  \n- 🧩 Built with modern TypeScript and Node 22+\n\n---\n\n## 🛠️ Setup\n\n### 1️⃣ Clone this repo\n```bash\ngit clone https://github.com/tanmayvaij/diagem-cli-bot.git\ncd diagem-cli-bot\n````\n\n### 2️⃣ Install dependencies\n\n```bash\nnpm install\n```\n\n### 3️⃣ Configure your Gemini API key\n\nCopy the example file and edit it:\n\n```bash\ncp .env.example .env\n```\n\nThen open `.env` and paste your Gemini API key:\n\n```\nGEMINI_API_KEY=your_api_key_here\n```\n\nYou can get a key from the [Google AI Studio Console](https://aistudio.google.com/).\n\n---\n\n## 💻 Run the bot\n\nRun with `tsx`:\n\n```bash\nnpx tsx main.ts\n```\n\nExample session:\n\n```\nUSER : hi\nAI : Hello! How can I help you today?\n\nUSER : write a haiku about TypeScript\nAI : Static types sing loud,\nJavaScript’s calm evolution,\nErrors fade away.\n```\n\nType `exit` to quit the session.\n\n---\n\n## 🧩 Project Structure\n\n```\ndiagem-cli-bot/\n├── .env.example     # Template for API key\n├── main.ts          # Core CLI logic\n├── package.json     # Dependencies \u0026 metadata\n└── README.md        # You're reading it!\n```\n\n---\n\n## 🧠 How It Works\n\n1. Loads your API key from `.env`\n2. Initializes a `diaflow-gemini` Agent with Gemini 2.0 Flash\n3. Opens a readline interface to accept user prompts\n4. Sends each prompt to the LLM and prints the response\n\n---\n\n## 🧰 Tech Stack\n\n* Node.js (v22+)\n* TypeScript\n* diaflow-gemini\n* dotenv\n* readline/promises\n\n---\n\n## 🧪 Example Use Cases\n\n* Quick LLM experimentation\n* Local chatbot or CLI assistant\n* Base for plugin-style terminal tools\n* Teaching resource for `diaflow-gemini` SDK\n\n---\n\n## 📜 License\n\nMIT © [Tanmay Vaij](https://github.com/tanmayvaij)\n\n---\n\n### ⭐ If you find this helpful, consider starring the repo!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmayvaij%2Fdiagem-cli-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanmayvaij%2Fdiagem-cli-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanmayvaij%2Fdiagem-cli-bot/lists"}