UNPKG

safevibe

Version:

Safevibe CLI - Simple personal secret vault for AI developers and amateur vibe coders

155 lines (111 loc) 3.76 kB
# Safevibe CLI Zero-knowledge secret management for AI developers. Ship agents, not API keys. ## Installation Install globally via npm: ```bash npm install -g safevibe ``` Or use with npx (no installation required): ```bash npx safevibe init ``` ## Quick Start 1. **Initialize Safevibe**: ```bash safevibe init ``` 2. **Authenticate** with Google OAuth (opens browser automatically) 3. **Start the MCP server** for Cursor integration: ```bash safevibe start ``` 4. **Use Cursor** to manage secrets via MCP tools: - "Store my OpenAI API key securely" - "Get my database password" - "What secrets do I have stored?" - "Rotate my API key" ## Commands ### `safevibe init` Initialize Safevibe with Google OAuth authentication. **Options:** - `--force` - Overwrite existing configuration - `--backend-url <url>` - Custom backend URL (default: https://safevibe-backend.vercel.app) **What it does:** - Sets up Google OAuth authentication - Generates local encryption keys - Configures backend connection - Prepares MCP server integration ### `safevibe start` Start the MCP server for Cursor integration. **Options:** - `-d, --daemon` - Run in daemon mode - `-p, --port <port>` - Port number **What it does:** - Starts the Model Context Protocol server - Enables Cursor integration - Provides MCP tools for secret management ## Cursor Integration Safevibe integrates with Cursor via the Model Context Protocol (MCP). After running `safevibe init`, add the generated configuration to your Cursor settings: 1. Open Cursor 2. Press `Cmd+,` (macOS) or `Ctrl+,` (Windows/Linux) 3. Click "Open Settings (JSON)" 4. Add the configuration shown after `safevibe init` 5. Restart Cursor ### Available MCP Tools Once integrated, Cursor provides these tools for secret management: - **`save_key`** - Store encrypted secrets - **`get_key`** - Retrieve encrypted secrets - **`list_keys`** - List all your secrets - **`rotate_key`** - Rotate secret versions ### Usage Examples Ask Cursor natural language questions: ``` "Store my OpenAI API key sk-abc123 securely" "What's my database password?" "List all my secrets" "Rotate my GitHub token" ``` ## Why This Approach? The Safevibe CLI is intentionally minimal: - **🎯 Focused**: Only handles setup and server management - **🔗 Integrated**: All secret operations through Cursor's natural interface - **🚀 Efficient**: No context switching between CLI and editor - **🤖 AI-Native**: Designed for AI-assisted development workflows Traditional CLI commands like `save`, `get`, `list` are replaced by natural language interactions with Cursor. ## Security - **Zero-knowledge encryption**: Secrets are encrypted locally before sending to the server - **End-to-end security**: Safevibe never sees your secrets in plain text - **Google OAuth**: Secure authentication with industry-standard OAuth 2.0 - **Audit logs**: Track all secret access and modifications ## Requirements - Node.js 20 or higher - Google account for authentication - Cursor editor for secret management ## Configuration Configuration is stored in `~/.safevibe/`: - `config.json` - CLI configuration and authentication - `keys.json` - Local encryption keys ## Troubleshooting ### Authentication Issues ```bash # Re-initialize with force flag safevibe init --force ``` ### Connection Issues ```bash # Check backend connectivity curl https://safevibe-backend.vercel.app/api/health ``` ### MCP Server Issues ```bash # Restart the MCP server safevibe start ``` ### Permission Issues ```bash # Check config directory permissions ls -la ~/.safevibe/ ``` ## Support - 📖 [Documentation](https://github.com/safevibe/safevibe) - 🐛 [Report Issues](https://github.com/safevibe/safevibe/issues)