@kyrvex/kyrvex-sdk-test
v1.0.0
Published
Official JavaScript/TypeScript SDK for Kyrvex - Secure API key management and proxy service
Maintainers
Readme
🔐 Kyrvex SDK
Official JavaScript/TypeScript SDK for Kyrvex - Secure API key management and proxy service.
🚀 Installation
npm install kyrvex-sdk
# or
yarn add kyrvex-sdk⚡ Quick Start
import { Kyrvex } from 'kyrvex-sdk';
// Initialize the client
const kyrvex = new Kyrvex({
apiKey: 'kv_your_api_key_here'
});
// Create a vault
const vault = await kyrvex.vaults.create({
name: 'production',
environment: 'production'
});
// Store an API key
await kyrvex.apikeys.create(vault.id, {
name: 'openai',
provider: 'OpenAI',
value: 'sk-...'
});
// Retrieve and use the API key securely
const { value } = await kyrvex.apikeys.getValue(vault.id, 'openai');
console.log('Retrieved API key:', value);📦 Features
- 🔐 Secure API Key Storage - Encrypted storage for sensitive API keys
- 🏢 Vault Management - Organize keys by environment and project
- 🔍 Security Scanning - Detect exposed secrets in your code
- 🌐 Proxy Requests - Route API requests through secure proxies
- 📊 Analytics & Monitoring - Track usage and performance
- 🔄 Key Rotation - Automatic and manual key rotation
- 🔒 Access Control - Team permissions and audit logs
🎯 Usage Examples
Vault Management
// List vaults
const vaults = await kyrvex.vaults.list();
// Get vault by ID
const vault = await kyrvex.vaults.get('vault_id');
// Update vault
await kyrvex.vaults.update('vault_id', {
description: 'Production environment vault'
});API Key Operations
// Create API key
const apiKey = await kyrvex.apikeys.create('vault_id', {
name: 'stripe',
provider: 'Stripe',
value: 'sk_live_...',
tags: ['payment', 'production']
});
// List API keys
const keys = await kyrvex.apikeys.list('vault_id');
// Rotate API key
const result = await kyrvex.apikeys.rotate('vault_id', 'key_id');Security Scanning
// Scan content for secrets
const scanResult = await kyrvex.scanner.scanContent({
content: 'const apiKey = "sk_live_123...";',
filename: 'config.js'
});
console.log(`Found ${scanResult.summary.totalFindings} potential secrets`);
// Scan directory
const pathResult = await kyrvex.scanner.scanPath({
path: './src',
recursive: true
});Proxy Requests
// OpenAI proxy request
const response = await kyrvex.proxy.openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello!' }]
}, {
vaultId: 'vault_id',
keyName: 'openai_key'
});
// Stripe proxy request
const customer = await kyrvex.proxy.stripe.customers.create({
email: '[email protected]'
}, {
vaultId: 'vault_id',
keyName: 'stripe_key'
});🔧 Configuration
const kyrvex = new Kyrvex({
apiKey: 'kv_your_api_key', // Your Kyrvex API key
baseUrl: 'https://api.kyrvex.dev', // API base URL (optional)
timeout: 30000, // Request timeout (optional)
retries: 3, // Retry attempts (optional)
debug: false, // Enable debug logging (optional)
cache: true, // Enable response caching (optional)
});🌍 Environment Support
- ✅ Node.js 18+ (ES Modules & CommonJS)
- ✅ Browser (ES Modules & UMD)
- ✅ TypeScript (Full type support)
- ✅ React/Vue/Angular (All modern frameworks)
- ✅ Webpack/Vite/Rollup (All bundlers)
- ✅ Edge Runtime (Vercel, Cloudflare Workers)
📚 API Documentation
For detailed API documentation, visit: docs.kyrvex.dev
🛡️ Security
- All API keys are encrypted at rest
- TLS 1.3 encryption in transit
- Zero-knowledge architecture
- SOC 2 Type II compliant
- Regular security audits
📄 License
MIT © Kyrvex
🤝 Support
- 📧 Email: [email protected]
- 💬 Discord: Join our community
- 📖 Documentation: docs.kyrvex.dev
- 🐛 Issues: GitHub Issues
