Skip to main content
Glama
Vivek-k3

Models PLUS

by Vivek-k3
build.ts1.53 kB
#!/usr/bin/env bun import { Rendered, Providers } from "../src/render"; import fs from "fs/promises"; import path from "path"; import { $ } from "bun"; await fs.rm("./dist", { recursive: true, force: true }); await Bun.build({ entrypoints: ["./index.html"], outdir: "dist", target: "bun", }); for await (const file of new Bun.Glob("./public/*").scan()) { await Bun.write(file.replace("./public/", "./dist/"), Bun.file(file)); } // Copy provider logos to dist/logos/ await fs.mkdir("./dist/logos", { recursive: true }); // First, copy the default logo const defaultLogoPath = "../../providers/logo.svg"; const defaultLogo = Bun.file(defaultLogoPath); if (await defaultLogo.exists()) { await Bun.write("./dist/logos/default.svg", defaultLogo); } // Then copy provider-specific logos const providersDir = "../../providers"; const entries = await fs.readdir(providersDir, { withFileTypes: true }); for (const entry of entries) { if (entry.isDirectory()) { const provider = entry.name; const logoPath = path.join(providersDir, provider, "logo.svg"); const logoFile = Bun.file(logoPath); if (await logoFile.exists()) { await Bun.write(`./dist/logos/${provider}.svg`, logoFile); } } } let html = await Bun.file("./dist/index.html").text(); html = html.replace("<!--static-->", Rendered); await Bun.write("./dist/index.html", html); await Bun.write("./dist/api.json", JSON.stringify(Providers)); await $`mv ./dist/index.html ./dist/_index.html`; await $`mv ./dist/api.json ./dist/_api.json`;

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/Vivek-k3/modelsplus'

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