| name | twinmind-local-dev-loop |
| description | Set up local development workflow with TwinMind API integration.
Use when building applications that integrate TwinMind transcription,
testing API calls locally, or developing meeting automation tools.
Trigger with phrases like "twinmind dev setup", "twinmind local development",
"twinmind API testing", "build with twinmind".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(curl:*) |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","twinmind","api","testing","transcription"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
TwinMind Local Dev Loop
Overview
Configure a productive local development environment for TwinMind API integration.
Prerequisites
- TwinMind Pro or Enterprise account (API access)
- Node.js 18+ or Python 3.10+
- API key from TwinMind dashboard
- Local development environment
Instructions
Step 1: Project Setup
set -euo pipefail
mkdir twinmind-integration && cd twinmind-integration
npm init -y
npm install dotenv axios zod typescript ts-node @types/node
npx tsc --init
Step 2: Configure Environment
cat > .env << 'EOF'
TWINMIND_API_KEY=your-api-key-here
TWINMIND_API_URL=https://api.twinmind.com/v1
TWINMIND_WEBHOOK_SECRET=your-webhook-secret
NODE_ENV=development
EOF
echo ".env" >> .gitignore
echo "node_modules" >> .gitignore
Step 3: Create TwinMind Client
import axios, { AxiosInstance } from 'axios';
import { z } from 'zod';
const TranscriptSchema = z.object({
id: z.string(),
text: z.string(),
duration_seconds: z.number(),
: z.(),
: z.(z.({
: z.(),
: z.().(),
: z.(z.({
: z.(),
: z.(),
: z.(),
: z.(),
})),
})),
: z.(),
});
= z.({
: z.(),
: z.(),
: z.(),
: z.(z.({
: z.(),
: z.().(),
: z.().(),
})),
: z.(z.()),
});
= z.< >;
= z.< >;
{
: ;
() {
. = axios.({
: baseUrl || ,
: {
: ,
: ,
},
: , # : seconds ms
});
}
(): <> {
response = ..();
response. === ; #
}
(: , ?: {
?: ;
?: ;
?: | ;
}): <> {
response = ..(, {
: audioUrl,
: options?. || ,
: options?. ?? ,
: options?. || ,
});
.(response.);
}
(: ): <> {
response = ..(, {
: transcriptId,
});
.(response.);
}
(: , ?: {
?: ;
?: ;
?: ;
}): <[]> {
response = ..(, {
: {
: query,
: options?. || ,
: options?.,
: options?.,
},
});
z.().(response..);
}
}