🖥️ Memory-powered CLI development with Claude Code and Gemini CLI
This configuration demonstrates Cipher as a memory layer for Claude Code and Gemini CLI. Unlike traditional CLI tools that lose context between sessions, this setup provides persistent memory that grows with your development workflow.
Key Benefits:
- Persistent memory across CLI sessions
- Project-aware assistance that remembers your codebase
- Cross-session learning that builds on previous interactions
Required API Keys:
- Anthropic API Key - Get from console.anthropic.com
- OpenAI API Key - Get from platform.openai.com (required for embeddings)
- Google AI API Key (optional) - Get from Google AI Studio
Set your API keys:
export ANTHROPIC_API_KEY=your_anthropic_api_key
export OPENAI_API_KEY=your_openai_api_key
export GOOGLE_AI_API_KEY=your_google_ai_api_key # optionalCreate or edit .mcp.json in your project root:
{
"mcpServers": {
"cipher": {
"command": "cipher",
"args": ["--mode", "mcp", "--agent", "./cipher.yml"],
"env": {
"ANTHROPIC_API_KEY": "your_anthropic_api_key",
"OPENAI_API_KEY": "your_openai_api_key"
}
}
}
}Add to your Gemini CLI settings.json:
{
"mcpServers": {
"cipher": {
"command": "cipher",
"args": ["--mode", "mcp", "--agent", "./cipher.yml"],
"env": {
"ANTHROPIC_API_KEY": "your_anthropic_api_key",
"OPENAI_API_KEY": "your_openai_api_key"
}
}
}
}Claude Code:
claude
> Analyze my project structure and remember the patternsGemini CLI:
gemini "Use cipher to analyze my codebase"Project Analysis:
claude> Analyze my project structure and remember the patternsCross-Session Learning:
# Session 1
claude> Help me debug this React performance issue
# Session 2 (later)
claude> Apply the optimization techniques we discussed yesterdayCode Review:
claude> Review my authentication changes using the security patterns you've learnedThis setup provides persistent memory for your CLI development workflow, making your coding agents smarter with every interaction.