npm package: @kyrvex/kyrvex-sdk-test
Description: Official JavaScript/TypeScript SDK for Kyrvex - Secure API key management and proxy service
Author: Kyrvex Team
Latest version: 1.0.0

# 🔐 Kyrvex SDK

Official JavaScript/TypeScript SDK for Kyrvex - Secure API key management and proxy service.

[![npm version](https://badge.fury.io/js/kyrvex-sdk.svg)](https://badge.fury.io/js/kyrvex-sdk)
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)

## 🚀 Installation

```bash
npm install kyrvex-sdk
# or
yarn add kyrvex-sdk
```

## ⚡ Quick Start

```typescript
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

```typescript
// 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

```typescript
// 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

```typescript
// 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

```typescript
// 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: 'customer@example.com'
}, { 
  vaultId: 'vault_id',
  keyName: 'stripe_key' 
});
```

## 🔧 Configuration

```typescript
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](https://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](https://kyrvex.dev)

## 🤝 Support

- 📧 Email: [support@kyrvex.dev](mailto:support@kyrvex.dev)
- 💬 Discord: [Join our community](https://discord.gg/kyrvex)
- 📖 Documentation: [docs.kyrvex.dev](https://docs.kyrvex.dev)
- 🐛 Issues: [GitHub Issues](https://github.com/kyrvex/kyrvex-sdk-js/issues)