Skip to content

A motion design studio on your own machine: Claude makes the video step by step, you approve every stage. Bring your own Claude Code or API key.

546 B
Raw Blame
import { mkdtempSync, rmSync } from 'node:fs';
import { join } from 'node:path';
import { tmpdir } from 'node:os';
import { ensureStudio, saveConfig } from '../src/studio.mjs';

// A throwaway studio using the demo backend (no Claude, no cost), cleaned up after the test.
export function tempStudio(t, config = {}) {
  const root = mkdtempSync(join(tmpdir(), 'mfx-test-'));
  ensureStudio(root);
  saveConfig(root, { backend: 'demo', demoDelayMs: 0, ...config });
  t.after(() => rmSync(root, { recursive: true, force: true }));
  return root;
}