Skip to main content
Glama
cloneRepository.ts576 B
import fs from "fs-extra"; import simpleGit from "simple-git"; export const cloneRepository = async ( repoUrl: string, tempDir: string, branchName: string, isVerbose: boolean, ) => { if (fs.existsSync(tempDir)) { if (isVerbose) console.log("Removing existing repository..."); await fs.remove(tempDir); } if (isVerbose) console.log(`Cloning repository (branch: ${branchName})...`); const git = simpleGit(); await git.clone(repoUrl, tempDir, ["--branch", branchName, "--depth=1"]); if (isVerbose) console.log("Repository cloned successfully."); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ExpertVagabond/universal-blockchain'

If you have feedback or need assistance with the MCP directory API, please join our Discord server