docs/public/cursor/gemini-setup.mdx
This guide walks you through setting up Claude-Mem in Cursor using Google's Gemini API. Gemini offers a generous free tier that handles typical individual usage.
<Info> **Free Tier:** 1,500 requests per day with `gemini-2.5-flash-lite`. No credit card required. </Info># Clone the repository
git clone https://github.com/thedotmack/claude-mem.git
cd claude-mem
# Install dependencies
bun install
# Build the project
bun run build
Run the setup wizard which guides you through everything:
bun run cursor:setup
The wizard will:
Create the settings file manually:
# Create settings directory
mkdir -p ~/.claude-mem
# Create settings file with Gemini configuration
cat > ~/.claude-mem/settings.json << 'EOF'
{
"CLAUDE_MEM_PROVIDER": "gemini",
"CLAUDE_MEM_GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
}
EOF
Replace YOUR_GEMINI_API_KEY with your actual API key.
Then install hooks and start the worker:
bun run cursor:install
bun run worker:start
Close and reopen Cursor IDE for the hooks to take effect.
# Check worker is running
bun run worker:status
# Check hooks are installed
bun run cursor:status
Open http://localhost:37777 to see the memory viewer.
| Model | Free Tier RPM | Notes |
|---|---|---|
gemini-2.5-flash-lite | 10 (4,000 with billing) | Default. Fastest, highest free tier RPM |
gemini-2.5-flash | 5 (1,000 with billing) | Higher capability |
gemini-3-flash-preview | 5 (1,000 with billing) | Latest model |
To change the model, update your settings:
{
"CLAUDE_MEM_PROVIDER": "gemini",
"CLAUDE_MEM_GEMINI_API_KEY": "your-key",
"CLAUDE_MEM_GEMINI_MODEL": "gemini-2.5-flash"
}
Claude-mem automatically handles rate limiting for free tier usage:
To remove rate limiting: Enable billing on your Google Cloud project, then add to settings:
{
"CLAUDE_MEM_GEMINI_BILLING_ENABLED": true
}
You'll still use the free quota but with much higher rate limits.
Ensure your settings file exists and has the correct format:
cat ~/.claude-mem/settings.json
Should output something like:
{
"CLAUDE_MEM_PROVIDER": "gemini",
"CLAUDE_MEM_GEMINI_API_KEY": "AIza..."
}
You're exceeding the free tier limits. Options:
Check the worker logs:
bun run worker:logs
Look for error messages related to Gemini API calls.
You can switch between Gemini, OpenRouter, and Claude SDK at any time by updating your settings. No restart required - changes take effect on the next observation.
{
"CLAUDE_MEM_PROVIDER": "openrouter"
}