Files
AFFAANhandClaude Opus 5 19e1e84fb7 Initial commit: MaskanX backend
Independent FastAPI backend for the MaskanX agentic growth platform.

Includes the agent runtime, MCP client integrations (Meta Ads, LinkedIn,
HubSpot, Tavily, Exa, xAI, Citedy, image generation), PostgreSQL storage
for chats and cron jobs, provider and secret management, and the CLI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 10:28:22 +05:30

52 lines
1.3 KiB
JavaScript

#!/usr/bin/env node
const { existsSync } = require("node:fs");
const { join } = require("node:path");
const { spawnSync } = require("node:child_process");
const isWindows = process.platform === "win32";
const candidates = [];
if (process.env.PYTHON) {
candidates.push(process.env.PYTHON);
}
candidates.push(
isWindows
? join(process.cwd(), ".venv311", "Scripts", "python.exe")
: join(process.cwd(), ".venv311", "bin", "python"),
isWindows
? join(process.cwd(), ".venv", "Scripts", "python.exe")
: join(process.cwd(), ".venv", "bin", "python"),
isWindows
? join(process.cwd(), "..", ".venv311", "Scripts", "python.exe")
: join(process.cwd(), "..", ".venv311", "bin", "python"),
"python3",
"python",
"py",
);
const args = process.argv.slice(2);
for (const candidate of candidates) {
const isPath = candidate.includes("/") || candidate.includes("\\");
if (isPath && !existsSync(candidate)) {
continue;
}
const result = spawnSync(candidate, args, {
stdio: "inherit",
shell: false,
env: process.env,
});
if (result.error) {
if (result.error.code === "ENOENT") {
continue;
}
console.error(result.error.message);
process.exit(1);
}
process.exit(result.status ?? 0);
}
console.error("No Python executable found. Set PYTHON or create .venv311.");
process.exit(1);