{"id":15308610,"url":"https://github.com/ezralazuardy/gem","last_synced_at":"2026-01-05T11:05:56.530Z","repository":{"id":241126033,"uuid":"804368803","full_name":"ezralazuardy/gem","owner":"ezralazuardy","description":"💎 A more fun way to interact with Gemini.","archived":false,"fork":false,"pushed_at":"2024-05-22T15:29:20.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T15:33:44.845Z","etag":null,"topics":["ai","gemini","npm","vercel"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ezralazuardy.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-22T13:14:48.000Z","updated_at":"2024-05-22T15:33:47.669Z","dependencies_parsed_at":"2024-05-22T15:33:46.120Z","dependency_job_id":null,"html_url":"https://github.com/ezralazuardy/gem","commit_stats":null,"previous_names":["ezralazuardy/gem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezralazuardy%2Fgem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezralazuardy%2Fgem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezralazuardy%2Fgem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezralazuardy%2Fgem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezralazuardy","download_url":"https://codeload.github.com/ezralazuardy/gem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244875046,"owners_count":20524591,"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","gemini","npm","vercel"],"created_at":"2024-10-01T08:17:19.422Z","updated_at":"2026-01-05T11:05:56.421Z","avatar_url":"https://github.com/ezralazuardy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n  \u003cimg alt=\"Build\" src=\"https://github.com/ezralazuardy/gem/actions/workflows/build.yml/badge.svg\" /\u003e\n  \u003cimg alt=\"CodeQL Analysis\" src=\"https://github.com/ezralazuardy/gem/actions/workflows/github-code-scanning/codeql/badge.svg\" /\u003e\n  \u003cimg alt=\"NPM License\" src=\"https://img.shields.io/npm/l/%40ezralazuardy%2Fgem\" /\u003e\n  \u003cimg alt=\"NPM Unpacked Size\" src=\"https://img.shields.io/npm/v/%40ezralazuardy%2Fgem\" /\u003e\n  \u003cimg alt=\"NPM Unpacked Size\" src=\"https://img.shields.io/npm/unpacked-size/%40ezralazuardy%2Fgem\" /\u003e\n  \u003cimg alt=\"NPM Type Definitions\" src=\"https://img.shields.io/npm/types/%40ezralazuardy%2Fgem\" /\u003e\n\u003c/div\u003e\n\n## 💎 gem\n\nA more fun way to interact with Gemini.\n\n```typescript\nawait ask(\"am i deserve better?\");\n```\n\nGem is a simple package that allows you to interact with the Gemini API in a more human-friendly way.\n\nIt's like talking to a friend, but in a more professional way. It's simplify the process of sending requests to the Gemini API, so you can focus more on the conversation itself. It's even more simpler than other API wrappers.\n\n\u003e 🚧 This package is still under heavy development. Beware of breaking changes.\n\n\u003cbr/\u003e\n\n### 🚀 Getting Started\n\nIt's only require 3 simple steps to get started.\n\nInstall the package\n\n```bash\nnpm install @ezralazuardy/gem\n```\n\nSet the environment variables\n\n```bash\nGEMINI_API_KEY=\"\u003cYOUR_GEMINI_API_KEY\u003e\"\n```\n\nAsk the Gemini.\n\n```typescript\nimport { ask } from \"@ezralazuardy/gem\";\n\nconst response = await ask(\"what is the weather today?\");\n\nconsole.log(response);\n```\n\nYup, just like that! Simple, right?\n\nFor advanced usage, please read the [documentation](#-documentation) below.\n\n\u003cbr/\u003e\n\n### ⚙️ Using Specific Model\n\nBy default, the model used is `gemini-pro`. You can change it by setting the `GEMINI_MODEL_ID` environment variable.\n\n```bash\nGEMINI_MODEL_ID=\"gemini-pro\"\n```\n\nPlease beware of the pricing and capabilities of each model.\n\nAs of `v0.0.1`, the following models are available:\n\n- `gemini-pro` (default)\n- `gemini-1.5-pro-latest`\n\n\u003e Plase refer to these references:\n\u003e [Gemini API Models](https://ai.google.dev/gemini-api/docs/models/gemini), [Gemini API Pricing](https://ai.google.dev/gemini-api/pricing).\n\n\u003cbr/\u003e\n\n### 🚥 Roadmap\n\nThe following features are planned to be implemented in the future.\n\n| Supported | Method           | Version   | Usage                                                    |\n| --------- | ---------------- | --------- | -------------------------------------------------------- |\n| 🟢        | `ask`            | `v0.0.1+` | Generates text for a given prompt.                       |\n| 🔴        | `askByStream`    | `-`       | Streams a text generations.                              |\n| 🔴        | `object`         | `-`       | Generates a typed, structured object for a given prompt. |\n| 🔴        | `objectByStream` | `-`       | Streams a typed, structured object for a given prompt.   |\n\n\u003cbr/\u003e\n\n### 📖 Documentation\n\nA proper documentation is still in progress 🥲\n\n\u003e Written in [Typescript](https://www.typescriptlang.org). Heavily inspired by [Vercel AI](https://sdk.vercel.ai) and [Gemini](https://gemini.google.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezralazuardy%2Fgem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezralazuardy%2Fgem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezralazuardy%2Fgem/lists"}