Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

597 B
Raw Blame
import { mkdir } from "node:fs/promises";
import { join } from "node:path";
import { fileURLToPath } from "node:url";

export async function wranglerEnvironment(parent: NodeJS.ProcessEnv) {
  const root = fileURLToPath(new URL("../../../", import.meta.url));
  const config = join(root, ".cache", "wrangler", "config");
  const logs = join(root, ".cache", "wrangler", "logs");
  await Promise.all([mkdir(config, { recursive: true }), mkdir(logs, { recursive: true })]);
  return {
    ...parent,
    WRANGLER_SEND_METRICS: "false",
    XDG_CONFIG_HOME: config,
    WRANGLER_LOG_PATH: logs,
  };
}