babylon-mcp/scripts/clone-repos.ts
Michael Mainguy e82bd1737d Add repository cloning script and update docs
Created npm run clone:repos script to clone required Babylon.js
repositories before indexing. Updated README to document the
two-step setup process:
1. Clone repositories
2. Index all data

This makes the setup process clearer and handles the missing
repository error users were encountering.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 10:46:14 -06:00

25 lines
628 B
TypeScript
Executable File

#!/usr/bin/env tsx
import { RepositoryManager } from '../src/mcp/repository-manager.js';
import { BABYLON_REPOSITORIES } from '../src/mcp/repository-config.js';
async function main() {
console.log('Cloning/updating Babylon.js repositories...\n');
const repoManager = new RepositoryManager();
for (const repo of BABYLON_REPOSITORIES) {
try {
await repoManager.ensureRepository(repo);
console.log(`${repo.name} ready\n`);
} catch (error) {
console.error(`✗ Failed to setup ${repo.name}:`, error);
process.exit(1);
}
}
console.log('✓ All repositories ready!');
}
main();