Skip to content

webworn/RAHU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RAHU — your AI coworker, inside Gmail

RAHU turns Claude Code into an AI coworker that lives entirely in your Google apps. It auto-sorts your inbox with your own labels, drafts replies in your own voice, and writes your morning briefing — all landing as Gmail labels/drafts, Calendar notes, Google Tasks, and Docs. No new app, no dashboard. It's a Google-native take on Dimension.dev.


Quickstart (3 steps)

You need Claude Code, plus a one-time Google setup in step 2 (uv + an OAuth client, ≈5 min). Run /doctor at any point and it will tell you exactly what's missing.

1. Drop this repo into a folder and open Claude Code there

git clone https://github.com/webworn/RAHU.git
cd RAHU
claude

2. Connect Google

This repo ships a .mcp.json, so Claude Code auto-detects the Google server the moment you open the folder and asks you to approve it — just say yes. On first use your browser opens for a normal Google sign-in, then RAHU can read labels, draft, and write to Calendar / Tasks / Docs.

One-time prerequisites (≈5 min). The repo ships the recipe, not the server — an MCP server is a program that runs on your machine, so two things must exist first:

# 1. uv — provides `uvx`, which fetches & runs the Google server. Without it,
#    the server fails to start with "command not found".
curl -LsSf https://astral.sh/uv/install.sh | sh     # Windows: irm https://astral.sh/uv/install.ps1 | iex

# 2. Your own Google OAuth *desktop* client — a self-hosted server has to act as
#    you, and there's no way around supplying your own credential.
export GOOGLE_OAUTH_CLIENT_ID=...       # Google Cloud Console → APIs & Services → Credentials
export GOOGLE_OAUTH_CLIENT_SECRET=...
export USER_GOOGLE_EMAIL=you@your-domain.com
export WORKSPACE_MCP_DEFAULT_TIMEZONE=Asia/Kolkata   # optional, defaults to UTC

Check it before you hit a confusing failure:

python3 .claude/memory/store.py doctor    # or just run /doctor inside Claude Code

It tells you exactly what's missing and how to fix it.

Just want a quick taste? Run /mcp and pick the hosted Gmail connector instead — zero setup, but it covers labeling + drafting only (no Tasks/Docs, so /briefing and /memo are unavailable). The full experience uses the .mcp.json server above.

3. Teach it your inbox, then use it

/learn      ← reads your existing labels + how you already sort mail, and learns your scheme
/label      ← auto-labels new mail using what it learned (try "/label dry-run" first to preview)

That's the whole setup. Everything below is optional.


What you can say

Type this What happens
/doctor Preflight — checks uvx, OAuth vars, python3, and your memory store, and says exactly what's missing
/learn Learns your labels, tagging rules, and writing voice from your own Gmail (run once, refresh monthly)
/label Auto-applies your labels to new mail, silently. /label dry-run previews without changing anything
/catchup Summarizes every new email and leaves a ready-to-send draft for each
/briefing Writes today's briefing (overnight mail + meetings + tasks) as a Google Doc
/prep Preps your upcoming meetings into the Calendar event
/memo <company> Drafts a deal / IC memo into a Google Doc

Want it always-on? Keep a session open and run:

/loop --interval 10m /label 15m

It re-labels new mail every 10 minutes.


How it works (the short version)

  • Dynamic, per-user — nothing is hardcoded. RAHU reads your live Gmail labels and learns your sorting rules from your history. A different person gets a different scheme with zero code changes.
  • Local memory. What it learns (your labels, tagging rules, writing voice, contacts) is stored in a small local file (.claude/memory/), never uploaded. It recalls only the few facts it needs each time, so it stays fast and cheap.
  • Right model for the job. Cheap Haiku for high-volume triage, Sonnet for writing, Opus for deal memos.
  • Drafts, doesn't send. RAHU drafts and labels; it does not send email or move your calendar. Two things enforce that: Claude Code asks before any send, and RAHU's send-latch hard-denies one. The latch only runs once you copy settings.json (below) — until then Claude Code's prompt is the only thing standing there. Run /doctor to see which you have. Learned data and the auto-send switch are git-ignored.

What's inside .claude/

commands/    what you type   (/learn /label /catchup /briefing /prep /memo /autopilot)
agents/      the specialists (inbox-triage, voice-drafter, briefing-writer, … model-routed)
skills/      the "how" for each capability
workflows/   multi-step orchestration (briefing, catch-up, autopilot, learn)
hooks/       optional automation + a send-safety guard
memory/      store.py — your local, private learning store

Recommended: turn on the send-latch, permissions & hooks

The Google server itself is already wired via .mcp.json (step 2). But the send-safety latch is not active until you do this — it, the permission allowlist (so RAHU stops asking on every label/draft), and the session-start memory digest all live in the example settings:

cp .claude/settings.example.json .claude/settings.json   # read it first

It ships as .example on purpose: nothing grants permissions or registers hooks until you opt in. That's a deliberate trade — the cost is that a fresh clone has no send-latch, which /doctor will now tell you. Once copied, keep it always-on with /loop --interval 10m /label 15m. The underlying server is the open-source workspace-mcp.


Privacy

RAHU runs on your machine through your own Claude Code. It stores distilled patterns (e.g. "mail from vendor X → label Purchase"), never raw email bodies, passwords, or one-time codes.

Your profile is yours, and it never ships. Nothing learned is in this repo — a fresh clone contains the engine, not the knowledge, which is why you run /learn once (your labels aren't anyone else's). It lives outside the clone at ~/.rahu/memory.db, so re-cloning, moving the folder, or git clean -xdf can't wipe it. Point it elsewhere — or share one profile across several clones — with RAHU_MEMORY_DB=/path/to/memory.db.

About

RAHU — an AI coworker built on Claude Code that lives entirely in Gmail, Calendar, Tasks & Docs. Dynamically learns each user's labels & writing voice into a local memory store, then auto-triages, drafts, briefs & preps. A Google-native reimagining of Dimension.dev

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors