Lines 1-32javascript
2// install-omp-addons.js — Install caveman/rtk/ponytail add-ons on any OMP device.
3// Usage: node install-omp-addons.js [--dry-run] [--scope user|project|both] [--yes] [--verbose] [--doctor] [--uninstall]
4// Requires: node, omp CLI, bun (for rtk binary)
6import https from "node:https";
7import { fileURLToPath } from "node:url";
8import { createWriteStream } from "node:fs";
9import { createHash } from "node:crypto";
10import { promises as fs } from "node:fs";
11import path from "node:path";
12import os from "node:os";
13import { execFile } from "node:child_process";
14import readline from "node:readline";
HighChild Process
Package source references child process execution.
install-omp-addons.jsView on unpkg · L12 16const IS_WINDOWS = process.platform === "win32";
17const HOME = process.env.HOME || process.env.USERPROFILE || "";
18
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
install-omp-addons.jsView on unpkg · L5 21const args = process.argv.slice(2);
22const dryRun = args.includes("--dry-run");
23const yes = args.includes("--yes") || args.includes("-y");
24const verbose = args.includes("--verbose");
25const doctor = args.includes("--doctor");
26const uninstall = args.includes("--uninstall");
27const removePonytail = args.includes("--remove-ponytail");
28const removeRtk = args.includes("--remove-rtk");
30const scopeFlag = (() => {
31 const i = args.indexOf("--scope");
32 if (i === -1) return null;