Your AI secretary, powered by Gemini and your own Google Drive.
GemiHub is a self-hostable web application that turns Google Gemini into a personal AI assistant deeply integrated with your Google Drive. Chat with AI that can read, search, and write your files. Build automated workflows with a visual editor. All your data stays in your own Google Drive — no external database required.
Unlike generic AI chat, GemiHub connects directly to your Google Drive. The AI can read your files, search across them, create new documents, and update existing ones — all through natural conversation. Ask questions about your notes, generate summaries of your documents, or have the AI organize your files for you.
With built-in RAG (Retrieval-Augmented Generation), you can sync your Drive files to Gemini's semantic search. Instead of matching exact keywords, the AI understands the meaning of your question and finds relevant information from your personal knowledge base. Store product manuals, meeting notes, or research papers — then just ask questions in natural language.
Through the Model Context Protocol (MCP), GemiHub can talk to external services. Connect web search, databases, APIs, or any MCP-compatible server — and the AI automatically discovers and uses these tools during conversation. You can also extend GemiHub with plugins — install from GitHub or develop locally — to add custom sidebar views, slash commands, and settings panels.
Build complex automation pipelines with a visual editor. Chain together AI prompts, Drive file operations, HTTP requests, user input dialogs, and more. Workflows are stored as YAML, support loops and conditionals, and run in real-time with streaming output.
All data — chat history, workflows, settings, edit history — is stored in your own Google Drive under a gemihub/ folder. No proprietary database, no vendor lock-in. Optional hybrid encryption (RSA + AES) protects sensitive files. A Python decryption script is provided so you can always access your encrypted data independently.
GemiHub is offline-first. All your files are cached in the browser's IndexedDB, so they load instantly — even without an internet connection. Create and edit files offline, and your changes are tracked automatically. When you're back online, push your changes to Google Drive with one click. If someone else edited the same file, GemiHub detects the conflict and lets you choose which version to keep, with the other safely backed up.
GemiHub works with Obsidian Gemini Helper, an Obsidian plugin that syncs your vault with Google Drive. Edit notes in Obsidian and access them from GemiHub's web interface, or vice versa — both sides share the same _sync-meta.json format for seamless bidirectional sync.
GemiHub-exclusive features that the Obsidian plugin alone cannot replicate:
- Automatic RAG — Files synced to GemiHub are automatically indexed for semantic search
- OAuth2-enabled MCP — Use MCP servers that require OAuth2 authentication (e.g., Google Calendar, Gmail)
- Markdown to PDF/HTML conversion — Convert Markdown notes to formatted PDF or HTML
- Public publishing — Publish documents with a shareable public URL
Features added to Obsidian through the connection:
- Bidirectional sync with diff preview
- Conflict resolution with color-coded unified diff
- Drive edit history tracking changes from both Obsidian and GemiHub
- Conflict backup management
Edit workflow nodes with a form-based UI. Configure LLM prompts, models, Drive file operations, and more.
Run workflows and see real-time streaming output with execution logs.
Create and modify workflows using natural language. AI generates the YAML with streaming preview and thinking display.
Manage Drive files with a context menu — publish to web, view history, encrypt, rename, download, and more.
- AI Chat — Streaming conversations with Gemini, function calling, thinking display, image generation, file attachments. Paid plan uses the Interactions API for simultaneous function tools + RAG + Web Search and conversation chaining
- Slash Commands — User-defined
/commandswith template variables ({content},{selection}with file ID & position),@filementions (resolved to Drive file IDs for tool access), per-command model/tool overrides./run @workflow.yamlexecutes workflows directly from chat with inline streaming logs - Visual Workflow Editor — Visual node-based builder (30 node types), YAML import/export, real-time SSE execution
- AI Workflow Generation — Create and modify workflows via natural language with streaming preview and diff view
- Keyboard Shortcuts — Configurable shortcuts with modifier key support (Ctrl/Cmd, Shift, Alt) via Settings
- RAG — Sync Drive files to Gemini File Search for context-aware AI responses
- MCP — Connect external MCP servers as tools for AI chat, with OAuth support and rich UI rendering (MCP Apps)
- Agent Skills — User-defined AI agent configurations with custom instructions, reference materials, and executable workflows stored on Drive
- Plugins — Install from GitHub or develop locally; API for custom views, slash commands, settings panels, custom file icons, and file extension handling
- Google Drive Integration — All data stored in your own Drive, no external database
- Rich Markdown Editor — WYSIWYG file editing powered by wysimark-lite
- Offline Cache & Sync — Offline-first with IndexedDB caching. Edit files without internet, then Push/Pull to sync with Drive. Automatic conflict detection and resolution with backup. Soft delete with trash recovery. Temp UP/DL lets you preserve specific files across a Pull — upload before pulling, then download to restore. Backup token for external migration tools
- Encryption — Optional hybrid RSA + AES encryption for individual files, chat history, and workflow logs
- Edit History — Unified diff-based change tracking for workflows and Drive files
- Multi-Model Support — Gemini 3.1 Pro, Gemini 3, 2.5, Flash, Pro, Lite, Gemma 4; paid and free plan model lists
- Image Generation — Generate images via Gemini image models
- i18n — English and Japanese UI
Detailed documentation is available in the docs/ directory:
| Topic | English | 日本語 |
|---|---|---|
| Chat & AI | chat.md | chat_ja.md |
| Sync & Offline Cache | sync.md | sync_ja.md |
| Workflow Node Reference | workflow_nodes.md | workflow_nodes_ja.md |
| RAG | rag.md | rag_ja.md |
| MCP | mcp.md | mcp_ja.md |
| Encryption | encryption.md | encryption_ja.md |
| Plugins | plugins.md | plugins_ja.md |
| Infrastructure | infrastructure.md | infrastructure_ja.md |
| Editor | editor.md | editor_ja.md |
| Edit History | history.md | history_ja.md |
| Utils (Context Menu, Trash, Commands) | utils.md | utils_ja.md |
| Workflow Execution Engine | workflow_execution.md | workflow_execution_ja.md |
| Agent Skills | skill.md | — |
| Search | search.md | search_ja.md |
| Premium Plan | premium.md | premium_ja.md |
- Node.js 22+
- Google Cloud project (see setup below)
- Gemini API key
Go to Google Cloud Console and perform the following steps:
- Click "Select a project" at the top left → "New Project" → name it and create
- Go to "APIs & Services" → "Library"
- Search for "Google Drive API" and click "Enable"
- Go to "APIs & Services" → "OAuth consent screen"
- User Type: External
- Fill in App name (e.g., GemiHub), support email, and developer contact
- Add scope:
https://www.googleapis.com/auth/drive.file - Add your Gmail address as a test user (only your account can access before publishing)
Important: Google Drive File Access
This app uses the
drive.filescope, which means it can only access files created by the app itself. Files you upload directly to thegemihub/folder via the Google Drive web UI or other apps will not be visible to GemiHub. To add files, use the upload feature within the app or create them through AI chat.
- Go to "APIs & Services" → "Credentials" → "+ Create Credentials" → "OAuth client ID"
- Application type: Web application
- Name: anything (e.g., GemiHub Local)
- Add Authorized redirect URI:
http://localhost:8132/auth/google/callback - Copy the Client ID and Client Secret
- Go to Google AI Studio
- Left menu → "API keys" → "Create API key"
- Copy the key (you'll enter it in the app's Settings page later)
Free vs. Paid API: The free Gemini API tier has strict rate limits and restricted model access — enough for a quick test, but not for regular use. For the full experience, you'll need a paid plan. Google AI Pro ($19.99/month) is a great option: it includes $10/month in Google Cloud credits that cover extensive Gemini API usage, plus 2 TB Google One storage, Gemini Code Assist, and more. See Gemini API Pricing for details.
git clone <repository-url>
cd gemihub
npm installcp .env.example .envEdit .env:
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-your-client-secret
GOOGLE_REDIRECT_URI=http://localhost:8132/auth/google/callback
SESSION_SECRET=<random string>To generate SESSION_SECRET:
openssl rand -hex 32npm run dev- Open
http://localhost:8132in your browser - Click "Sign in with Google" → authorize with your Google account
- Click the gear icon (Settings) in the top right
- In the General tab, enter your Gemini API Key and click Save
Chat, workflows, and file editing are now ready to use.
Note: The dev server port is configured to
8132invite.config.ts. To change it, update both the config and the redirect URI in.envand Google Cloud Console.
npm run build
npm run startdocker build -t gemihub .
docker run -p 8080:8080 \
-e GOOGLE_CLIENT_ID=... \
-e GOOGLE_CLIENT_SECRET=... \
-e GOOGLE_REDIRECT_URI=https://your-domain/auth/google/callback \
-e SESSION_SECRET=... \
gemihubTwo paid plans extend GemiHub with Google Sheets/Gmail integration and web app builder capabilities. See docs/premium.md for full details.
| Feature | Description |
|---|---|
| Gmail Send | Workflow node: gmail-send. Send emails via Gmail API |
| PDF Generation | Convert Markdown/HTML to PDF |
| Upload Limit Removed | Free plan has 20MB limit; Lite and Pro have no practical limit |
| Migration Token | Export token for external migration tools |
| Temp Edit URL | Generate temporary URLs for external editor integration |
| Interactions API Chat | Chat uses the Gemini Interactions API: function tools + RAG + Web Search simultaneously, conversation chaining via previous_interaction_id |
All Lite features, plus:
| Feature | Description |
|---|---|
| Google Sheets CRUD | Workflow nodes: sheet-read, sheet-write, sheet-update, sheet-delete |
| File-Based Page Hosting | Place files in web/ on Drive — served directly via Drive API + CDN with file-based routing and [param] dynamic routes |
| Built-in Subdomain | {slug}.gemihub.online available immediately on account creation |
| Custom Domains | Optional per-account domain with auto-provisioned SSL via Certificate Manager |
| Multi-Type Auth | Multiple account types (e.g., "talent", "company") with independent magic link sessions per type |
| Workflow API | YAML workflows in web/api/ exposed as JSON endpoints via /__gemihub/api/*, with form POST support |
| Client Helper | /__gemihub/api.js provides gemihub.get(), gemihub.post(), and gemihub.auth.* for frontend integration |
| AI Web Builder Skill | Auto-provisioned "Webpage Builder" skill lets AI create pages and APIs via chat |
| Server-Side Execution | All node types run server-side, including script (via isolated-vm) |
| Scheduled Workflows | Cron-based multi-tenant execution via Cloud Scheduler + Firestore with deferred retry |
Load Balancer + Cloud CDN + Certificate Manager
├── *.gemihub.online → Cloud Run (wildcard subdomain)
├── app.acme.com → Cloud Run (custom domain)
└── app.other.com → Cloud Run (same backend)
Cloud Run (single instance, multi-tenant)
├── GemiHub IDE (free features)
├── Premium API (per-account, resolved by Host header)
├── Page proxy (file-based routing from Drive, CDN-cached)
├── Scheduled workflow execution
└── isolated-vm (server-side script execution)
Firestore
├── accounts + tokens
├── scheduleIndex + runtime
├── form submissions (TTL)
└── magic link tokens (TTL)
| Node | Description |
|---|---|
sheet-read |
Read rows with optional filter and limit |
sheet-write |
Append rows to a sheet |
sheet-update |
Update rows matching a filter |
sheet-delete |
Delete rows matching a filter |
gmail-send |
Send email via Gmail API |
- Subscribe via the Settings > Premium Plan tab — choose your subdomain slug
- Premium features are automatically enabled after subscription
- Configure account types and Sheets integration in
settings.json(accountswith identity/data config) - Optionally set a custom domain — DNS records and SSL certificates are provisioned automatically
- Place HTML/CSS/JS files in
web/and workflow APIs inweb/api/— Push to publish
| Layer | Tech |
|---|---|
| Frontend | React 19, React Router 7, Tailwind CSS v4, Mermaid |
| Backend | React Router server (SSR + API routes) |
| AI | Google Gemini API (@google/genai) |
| Storage | Google Drive API, Firestore |
| Auth | Google OAuth 2.0 → session cookies |
| Infrastructure | Cloud Run, Cloud Build, Artifact Registry, Cloud DNS, Certificate Manager, Cloud Scheduler, Global HTTPS LB + CDN |
| Editor | wysimark-lite (Slate-based WYSIWYG) |
MIT






