{
  "markdown": "[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENCE)\n\n<a name=\"top\"></a>\n\n# Integrating File Search with the Gemini CLI Extension\n\n<a name=\"abstract\"></a>\n\n## Description\n\nThis repository introduces a new Gemini CLI extension that integrates File Search feature. This tool establishes a fully managed Retrieval-Augmented Generation (RAG) system directly on the command line.\n\nThe extension is designed to simplify the use of the Gemini API's File Search, a powerful new feature that enables RAG grounded in personal or proprietary knowledge bases. While the underlying API requires scripting, this Node.js-built CLI extension allows users to seamlessly manage File Search stores and generate context-aware content grounded in their private documents without having to leave the terminal interface.\n\n## Prerequisites\n\nBefore installing the extension, ensure the following requirements are met:\n\n- **Gemini CLI Installed:** This guide assumes you have already installed and configured the Gemini CLI.\n- **Gemini API Key:** You must have a valid Gemini API key. This key needs to be accessible as an environment variable. You might have already used this for Gemini CLI.\n\n```bash\nexport GEMINI_API_KEY=\"YOUR_API_KEY\"\n```\n\n- **Model Configuration (Optional):** The extension defaults to the `gemini-1.5-flash` model. To use a different model, set the `GEMINI_MODEL` environment variable. Currently, `gemini-1.5-flash` and `gemini-1.5-pro` are supported.\n\n```bash\nexport GEMINI_MODEL=\"gemini-1.5-pro\"\n```\n\n## Installation\n\nWith the prerequisites in place, install the extension by running the following command in your terminal:\n\n```bash\ngemini extensions install https://github.com/tanaikech/FileSearchStore-extension\n```\n\n## Available Tools\n\nOnce installed, you can list the available tools provided by this extension.\n\n**Command:**\n\n```\n> /mcp desc\n```\n\n**Output:**\nThis will display the 11 integrated tools on an MCP server \"file-search-store-extension\" for managing your File Search stores.\n\n```\nConfigured MCP servers:\n\n🟢 file-search-store-extension - Ready (11 tools)\n  Tools:\n  - document_delete\n    Use this to delete a document.\n  - document_get\n    Use this to get information about a specific Document.\n  - document_list\n    Use this to list all Documents in a file search store.\n  - file_search_store_create\n    Use this to create a new file search store.\n  - file_search_store_delete\n    Use this to delete the file search store.\n  - file_search_store_get\n    Use this to get the metadata of the file search store.\n  - file_search_store_import_file\n    Use this to upload a file or a raw text to the file search store.\n  - file_search_store_list\n    Use this to get a list of file search stores.\n  - file_search_store_upload_media\n    Use this to upload a file or a raw text to the file search store.\n  - generate_content\n    Use this to generate content using the file search stores with Gemini API.\n  - operation_get\n    Use this to get the latest state of a long-running operation.\n```\n\n## Usage Examples\n\nBelow are typical workflows for using the extension.\n\n### 1. Create a File Search Store\n\n**Prompt:**\n\n```text\nCreate a new file search store named \"sample\".\n```\n\n![](images/fig2.jpg)\n\n### 2. List File Search Stores\n\n**Prompt:**\n\n```text\nShow the list of file search stores.\n```\n\n![](images/fig3.jpg)\n\n### 3. Upload Data to a File Search Store\n\nYou can upload data from a URL, a local file path, or a referenced file.\n\n**Prompt (from URL):**\n\n```text\nDownload the data from https://tanaikech.github.io/about/ and upload it to the file search store \"sample\".\n```\n\n![](images/fig4.jpg)\n\n**Prompt (from local file):**\n\nYou can also upload the local file.\n\n```text\nUpload ./sample.txt to the file search store \"sample\".\n```\n\nor\n\n```text\nUpload @sample.txt to the file search store \"sample\".\n```\n\n### 4. Generate Content (RAG)\n\nTo demonstrate the power of RAG, let's first ask a question without the File Search store. (Note: My name is Kanshi Tanaike).\n\n**Prompt 1 (without File Search):**\n\n```text\nGenerate content about Kanshi Tanaike using a tool generate_content without the file search stores.\n```\n\n![](images/fig5.jpg)\n\nAs expected, the model has no specific information about me. Now, let's use the file search store we created, which contains my personal data.\n\n**Prompt 2 (with File Search):**\n\n```text\nGenerate content about Kanshi Tanaike using a tool generate_content with the file search store \"sample\".\n```\n\n![](images/fig6.jpg)\n\nThe generated content now accurately includes my information by retrieving it from the specified store.\n\n### 5. Delete a Document\n\n**Prompt:**\n\n```text\nShow the list of documents in \"sample\".\nDelete the document.\n```\n\n![](images/fig7.jpg)\n\n### 6. Delete a File Search Store\n\n**Prompt:**\n\n```text\nShow the list of file search stores.\nDelete it.\n```\n\n![](images/fig8.jpg)\n\n## Summary\n\nThis Gemini CLI extension provides a powerful and convenient way to leverage the File Search API. Here are the key takeaways:\n\n- **Managed RAG in your Terminal:** It integrates a fully managed Retrieval-Augmented Generation (RAG) service directly into the Gemini CLI.\n- **Simple Installation:** A single command is all that is needed to install the extension.\n- **Comprehensive Management:** It offers 11 distinct tools to create, list, delete, and manage File Search stores and documents.\n- **Flexible Data Upload:** Supports uploading data from URLs or local files.\n- **Seamless Workflow:** Enables a complete workflow from data ingestion to grounded content generation without leaving the command line.\n\n---\n\n<a name=\"licence\"></a>\n\n# License\n\n[MIT](LICENCE)\n\n<a name=\"author\"></a>\n\n# Author\n\n[Tanaike](https://tanaikech.github.io/about/)\n\n[Donate](https://tanaikech.github.io/donate/)\n\n<a name=\"updatehistory\"></a>\n\n# Update History\n\n- v1.0.0 (November 11, 2025)\n\n  1.  Initial release.\n\n- v1.0.1 (November 13, 2025)\n\n  1.  A bug was removed.\n\n[TOP](#top)\n",
  "bytes": 5935,
  "sha": "8fef8c5ac87a121ff8f5abea9e5dd99ff3610859f8753fe18db9f6aba0bb74b3",
  "repo_slug": "tanaikech/filesearchstore-extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_tanaikech_filesearchstore_extension_9676ca32/readme"
}