Skip to main content
Glama

GenAIScript

Official
by microsoft
MIT License
43
2,820
  • Linux
  • Apple
remote.ts1.41 kB
import { GitClient } from "../../core/src/git" import { logInfo } from "../../core/src/util" export interface RemoteOptions { remote?: string remoteBranch?: string remoteForce?: boolean remoteInstall?: boolean } /** * Applies remote repository options by cloning the specified remote repository * and adjusting the working directory. * * @param options - Options for configuring remote repository handling. * - remote: URL of the remote repository to clone. Required. * - remoteBranch: Specifies the branch of the remote repository to clone. * - remoteForce: Indicates whether to force the clone operation. * - remoteInstall: Determines if dependencies should be installed after cloning. * * Performs a shallow clone of the specified remote repository using provided options, * then changes the current working directory to the cloned repository's directory. * Logs the path of the cloned directory upon successful completion. */ export async function applyRemoteOptions(options: RemoteOptions) { const { remote } = options || {} if (!remote) return const git = new GitClient(".") const res = await git.shallowClone(remote, { branch: options.remoteBranch, force: options.remoteForce, install: options.remoteInstall, }) // change cwd to the clone repo process.chdir(res.cwd) logInfo(`remote clone: ${res.cwd}`) }

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/microsoft/genaiscript'

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