deepgram-multi-env-setup
БесплатноБез исполняемых скриптовНе проверенConfigure Deepgram multi-environment setup for dev, staging, and production. Use when setting up environment-specific configurations, managing multiple…
от jeremylongshore★ 2 961 звезда на GitHubОб этом скилле
Deepgram Multi-Environment Setup
Prerequisites
- Separate Deepgram projects/credentials, storage/retention policies, and owners for development, staging, and production.
- Reviewed promotion/rollback controls plus sanitized fixtures for each pre-production environment.
Examples
Validate a configuration in development with a licensed fixture, promote the same version to staging with a separate key, and record its quality/latency/alert results. Promote production through an approved canary only; never reuse production keys or recordings in development to make an environment test pass.
Overview
Configure isolated Deepgram environments for development, staging, and production. Each environment uses a separate Deepgram project, scoped API keys, environment-specific model selection, and validated configuration. Includes typed config, client factory, Docker Compose profiles, and Kubernetes overlays.
Environment Strategy
| Setting | Development | Staging | Production |
|---|---|---|---|
| Model | base (fast, cheap) |
nova-3 |
nova-3 |
| Concurrency | 5 | 20 | 100 |
| Diarization | Off | On | On |
| PII Redaction | Off | On | On |
| Callback URL | localhost:3000 | staging.example.com | api.example.com |
| Key Rotation | Manual | Monthly | 90-day auto |
Instructions
Step 1: Typed Environment Configuration
interface DeepgramEnvConfig {
apiKey: string;
projectId: string;
model: 'base' | 'nova-2' | 'nova-3';
maxConcurrency: number;
features: {
diarize: boolean;
smart_format: boolean;
redact: string[] | false;
summarize: boolean;
};
callbackBaseUrl?: string;
timeout: number;
}
function loadConfig(env: string): DeepgramEnvConfig {
const configs: Record<string, DeepgramEnvConfig> = {
development: {
apiKey: process.env.DEEPGRAM_API_KEY_DEV!,
projectId: process.env.DEEPGRAM_PROJECT_ID_DEV!,
model: 'base',
maxConcurrency: 5,
features: {
diarize: false,
smart_format: true,
redact: false,
summarize: false,
},
callbackBaseUrl: 'http://localhost:3000',
timeout: 60000,
},
staging: {
apiKey: process.env.DEEPGRAM_API_KEY_STAGING!,
projectId: process.env.DEEPGRAM_PROJECT_ID_STAGING!,
model: 'nova-3',
maxConcurrency: 20,
features: {
diarize: true,
smart_format: true,
redact: ['pci', 'ssn'],
summarize: true,
},
callbackBaseUrl: 'https://staging.example.com',
timeout: 30000,
},
production: {
apiKey: process.env.DEEPGRAM_API_KEY_PRODUCTION!,
projectId: process.env.DEEPGRAM_PROJECT_ID_PRODUCTION!,
model: 'nova-3',
maxConcurrency: 100,
features: {
diarize: true,
smart_format: true,
redact: ['pci', 'ssn'],
summarize: true,
},
callbackBaseUrl: 'https://api.example.com',
timeout: 30000,
},
};
const config = configs[env];
if (!config) throw new Error(`Unknown environment: ${env}. Use: development, staging, production`);
if (!config.apiKey) throw new Error(`DEEPGRAM_API_KEY_${env.toUpperCase()} not set`);
return config;
}
const env = process.env.NODE_ENV ?? 'development';
const config = loadConfig(env);
Step 2: Client Factory
import { createClient, DeepgramClient } from '@deepgram/sdk';
class DeepgramClientFactory {
private static clients = new Map<string, DeepgramClient>();
static getClient(env?: string): DeepgramClient {
const environment = env ?? process.env.NODE_ENV ?? 'development';
if (!this.clients.has(environment)) {
const config = loadConfig(environment);
this.clients.set(environment, createClient(config.apiKey));
console.log(`Deepgram client created for: ${environment} (model: ${config.model})`);
}
return this.clients.get(environment)!;
}
// Convenience: transcribe with environment defaults
static async transcribe(url: string, overrides: Record<string, any> = {}) {
const environment = process.env.NODE_ENV ?? 'development';
const config = loadConfig(environment);
const client = this.getClient(environment);
const { result, error } = await client.listen.prerecorded.transcribeUrl(
{ url },
{
model: config.model,
smart_format: config.features.smart_format,
diarize: config.features.diarize,
redact: config.features.redact || undefined,
summarize: config.features.summarize ? 'v2' : undefined,
...overrides,
}
);
if (error) throw error;
return result;
}
// Reset for key rotation
static reset(env?: string) {
if (env) {
this.clients.delete(env);
} else {
this.clients.clear();
}
}
}
Step 3: Environment Variables Template
# .env.development
DEEPGRAM_API_KEY_DEV=dev-key-here
DEEPGRAM_PROJECT_ID_DEV=dev-project-id
# .env.staging
DEEPGRAM_API_KEY_STA
Установить deepgram-multi-env-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBash(kubectl:*)Bash(curl:*)Вложенные файлы
FAQ
Что делает скилл deepgram-multi-env-setup?
Configure Deepgram multi-environment setup for dev, staging, and production. Use when setting up environment-specific configurations, managing multiple Deepgram projects, or implementing environment isolation. Trigger: "deepgram environments", "deepgram staging", "deepgram dev prod", "multi-environment deepgram", "deepgram config management".
Как установить скилл deepgram-multi-env-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deepgram-multi-env-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic