Skip to content

BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications.

881 B
Raw Blame
#!/usr/bin/env node
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";

const here = dirname(fileURLToPath(import.meta.url));
const repoRoot = resolve(here, "..", "..");
const sourcePath = resolve(repoRoot, "scripts", "install_extras.py");
const targetPath = resolve(here, "..", "src", "embedded", "install-extras-script.ts");

const script = readFileSync(sourcePath, "utf8");
mkdirSync(dirname(targetPath), { recursive: true });
const out = `// Auto-generated from scripts/install_extras.py — do not edit by hand.
// Regenerate with: npm run sync:install-extras (also runs as prebuild).

export const INSTALL_EXTRAS_SCRIPT = ${JSON.stringify(script)};
`;
writeFileSync(targetPath, out, "utf8");
console.log(`Synced ${sourcePath} → ${targetPath} (${script.length} bytes)`);