Ragchat IconRagchat
GitHub ↗
What's new in v1.1.6 →

Ragchat — The Local AI Agent for Private Workflows

Like n8n or Zapier, but runs 100% locally with absolute privacy. Ragchat seamlessly connects to Google Workspace, Microsoft 365, Telegram, and local files to automate workflows and query your data without sending information to the cloud.

⚠️ CRITICAL STEP FOR GOOGLE ACCOUNTS: Before linking any Google accounts (Gmail, Drive, sheets, etc.), you must download your personal credentials JSON and run ragchat bind google. See the 60-second setup guide below.
Simple 3-Step Flow
1. Connect Your Apps

Link your Gmail, Outlook, Google Drive, OneDrive, Telegram, or Discord accounts safely.

2. Automatic Sync

Your assistant reads and indexes your files locally on your own computer.

3. Chat & Automate

Query your knowledge base via chat or automate actions directly from your terminal.

🔑 1-Time Setup & Account Limits

Binding your custom Google OAuth credentials (via ragchat bind google) is a one-time process. Once bound, you can link up to 20 Google accounts and 20 Microsoft accounts seamlessly on your device.

🌐 Google OAuth 1-Time Binding Guide (60-Second Setup)
Step 1: Create ProjectGo to GCP Project Create ↗. Type project name Ragchat and click Create.
Step 2: OAuth Consent ScreenGo to Consent Screen ↗. Select External, type app name Ragchat, and add your email.
Step 3: Download JSONGo to Credentials ↗. Click + Create Credentials → OAuth Client ID → Desktop App → Download JSON.
Step 4: Run Bind CommandRun ragchat bind google in terminal. It auto-detects your downloaded JSON file from ~/Downloads!

Why You'll Love RAGChat

Built to be simple, lightweight, and hassle-free for your daily work.

1. Uses Less RAM Than Chrome

Consumes memory literally less than a few open tabs in your Chrome browser.

2. Zero Complex Setup

No complicated server configurations or API key tangles. Run one simple command and you are ready to go.

3. Instant Plain-English Search

Find exact email answers, spreadsheet values, or doc paragraphs by asking simple everyday questions.

4. 100% On-Device Privacy

Your emails, login keys, and documents stay strictly on your local disk. Nothing is ever uploaded or sold.

5. Saves AI Token Costs

Direct CLI commands let you list files and query inbox history without wasting expensive LLM API tokens.

6. Multi-Account Management

Easily link multiple work and personal profiles across Google, Microsoft, Telegram, and Discord in one place.

Apps & Services You Can Connect

Google WorkspaceGmail emails, Drive files, Spreadsheets & Docs
Microsoft 365Outlook emails, OneDrive folders & tasks
Chat & Social AppsTelegram channels and Discord chat servers
Website Crawling & DocsCrawl any public site, documentation page, or URL to index knowledge
Multi-LLM Engine SupportUse local Ollama (Llama 3, Mistral) or bring your OpenAI, Gemini, or Claude key

What's New in v1.1.6

100% Local Google OAuth (No Redirection Servers)NEW

Google OAuth logins now run completely locally on your machine via a local loopback server (`http://127.0.0.1:port`) using your custom bound `client_secret.json` keys, bypassing the Vercel gateway entirely.

Reliable MSAL Cache & Token FallbackNEW

Microsoft Graph integrations now include a robust token fallback helper. In scenarios where MSAL's local cache has not yet initialized, RAGChat seamlessly falls back to valid raw token variables to maintain sync operations.

Low-Latency Async Update CheckerIMPROVED

The client now queries for updates in the background on launch. To ensure zero-latency command executions, updates are fetched asynchronously in a daemon thread, throttled locally to run at most once every 24 hours.

Easy Installation

Copy and paste the command below into your terminal app to get started in under a minute.

macOS / Linux
curl -fsSL https://raw.githubusercontent.com/soumen888/Rag-Chatbot/main/install/macos.sh | bash
Windows
irm https://raw.githubusercontent.com/soumen888/Rag-Chatbot/main/install/windows.ps1 | iex

Available Services & Commands

Google Workspace Commands

CommandWhat It Does
ragchat bind google [file]1-time setup: Bind custom Google OAuth Client JSON with auto ~/Downloads detection
Example: ragchat bind google
ragchat link google <profile>Connect your Google account to start syncing emails & drive files
Example: ragchat link google personal
ragchat profiles googleList all currently connected Google account profiles
Example: ragchat profiles google
ragchat rename-profile google <old> <new>Rename a saved Google account connection
Example: ragchat rename-profile google dev work
ragchat -g <profile> <time>Quickly check recent emails from specific timeframe (e.g. 10 hours, 2 days)
Example: ragchat -g work 10h
ragchat sync google <profile> allSync all your historical emails into your local search
Example: ragchat sync google work all
ragchat sheet <profile> listList all spreadsheets in your Google Drive
Example: ragchat sheet work list
ragchat sheet <profile> create <title>Create a new Google Spreadsheet workbook
Example: ragchat sheet work create "Project Expenses"
ragchat sheet <profile> <id> get-tabsSee all tab names inside a spreadsheet
Example: ragchat sheet work <id> get-tabs
ragchat sheet <profile> <id> add-tab <tab>Add a new tab to an existing spreadsheet
Example: ragchat sheet work <id> add-tab "Q3 Summary"
ragchat sheet <profile> <id> append <range> <val>Add a new row of data to your spreadsheet
Example: ragchat sheet work <id> append "A1" "New Entry"
ragchat drive <profile> listList your Google Drive files and folders
Example: ragchat drive work list
ragchat drive <profile> list --filter <type>Filter drive files by type (docs, sheets, or slides)
Example: ragchat drive work list --filter docs
ragchat drive <profile> download <file_id> [path]Download a file from Google Drive directly to disk (falls back to Desktop)
Example: ragchat drive work download "1aBcXyZ..." "~/Downloads"
ragchat drive <profile> upload <local_path> [parent_id]Upload a file or entire folder recursively to Google Drive (supports drag-and-drop)
Example: ragchat drive work upload "~/Desktop/Report.pdf"

Microsoft Workspace Commands

CommandWhat It Does
ragchat link microsoft <profile>Connect your Microsoft or Outlook account
Example: ragchat link microsoft work
ragchat profiles microsoftList all currently connected Microsoft account profiles
Example: ragchat profiles microsoft
ragchat rename-profile microsoft <old> <new>Rename a saved Microsoft account connection
Example: ragchat rename-profile microsoft work main
ragchat -m <profile> <time>Check recent Outlook emails from a specific timeframe
Example: ragchat -m work 2d
ragchat sync microsoft <profile> allSync your complete Outlook inbox to your local computer
Example: ragchat sync microsoft work all
ragchat onedrive <profile> listList files and folders in your OneDrive
Example: ragchat onedrive work list
ragchat onedrive <profile> list <path>List files inside a specific folder in OneDrive
Example: ragchat onedrive work list "Documents"
ragchat onedrive <profile> download <item_id> [path]Download a file from OneDrive directly to disk (falls back to Desktop)
Example: ragchat onedrive work download "01XYZ..." "~/Downloads"
ragchat onedrive <profile> upload <local_path> [parent_id]Upload a file or entire folder recursively to OneDrive (supports drag-and-drop)
Example: ragchat onedrive work upload "~/Desktop/Presentation.pptx"

Social & Chat App Commands

CommandWhat It Does
ragchat link telegram <profile>Connect your Telegram account
Example: ragchat link telegram main
ragchat telegram <profile> syncSync your saved Telegram channels & group chats
Example: ragchat telegram main sync
ragchat link discord <profile>Connect your Discord account or bot token
Example: ragchat link discord dev
ragchat discord <profile> syncSync selected Discord server channels locally
Example: ragchat discord dev sync

Assistant Commands

CommandWhat It Does
ragchatOpen the visual interactive menu in your terminal
Example: ragchat
ragchat chat <collection>Start asking questions to your AI assistant about your files
Example: ragchat chat work_files
ragchat syncTurn on background syncing so all apps stay automatically up to date
Example: ragchat sync
ragchat updateUpdate the application and core binaries to the latest version
Example: ragchat update
ragchat helpShow the helpful list of commands in terminal
Example: ragchat --help

Timeframe Shortcuts

h(Hours)
10h (look back 10 hours)
d(Days)
3d (look back 3 days)
w(Weeks)
2w (look back 2 weeks)
m(Months)
1m (look back 30 days)
y(Years)
1y (look back 1 year)

Privacy & Security

RAGChat is designed to keep your workspace data private. Your files, search index, and settings reside on your own computer.

Stored Directly on Your Device

All your synced emails, files, and chat messages are saved strictly on your local computer hard drive.

Safe Account Sign-in

When you link Google or Microsoft, you log in through their official websites. Your passwords are never saved, and login passes stay safely on your computer.

Zero Data Tracking

We do not run tracking cookies, analytics scripts, or data harvesting algorithms.

🛡️ Security & Privacy Architecture

🔒
100% On-Device Storage: Your OAuth tokens, index files, and settings stay strictly on your local disk.
🏠
Localhost Isolation: Authorization webservers bind strictly to 127.0.0.1 (localhost) and never broadcast credentials over external networks.
⚡
Compiled Core Engine: Core binary modules (ragchat_core) are compiled C extensions to ensure maximum performance and code integrity.
📦
Official Distribution: Always install RAGChat strictly from the official repository github.com/soumen888/Rag-Chatbot or Homebrew tap brew install soumen888/ragchat/ragchat.