Lines 1-40javascript
3 * merrymen CLI — the terminal front door.
5 * Install (no clone): npm install -g merrymen (or github:millw14/merrymen)
6 * Then: merrymen onboard && merrymen start
8 * merrymen onboard interactive setup wizard (keys, strategy, basket)
9 * merrymen start run web + worker together
10 * merrymen doctor diagnose the whole stack
11 * merrymen status what the band is doing right now
12 * merrymen strategy new scaffold a custom strategy in ~/.merrymen/strategies
13 * merrymen strategy list builtins + your strategies
14 * merrymen selftest one policy-legal no-op through the full pipeline
15 * merrymen kill terminal kill switch (deletes the grant)
17 * Zero dependencies. All user data lives in ~/.merrymen (override with
18 * MERRYMEN_HOME) — the install location stays disposable.
21import { spawn, spawnSync } from "node:child_process";
22import { copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
23import { readdir } from "node:fs/promises";
24import os from "node:os";
25import path from "node:path";
26import readline from "node:readline";
27import { fileURLToPath } from "node:url";
28import { banner, c, spinner, type as typeOut, withSpinner } from "./ui.mjs";
30// Where the PACKAGE lives (npm global dir or a checkout) — code, never data.
31const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
32// Where the USER's data lives — settings, grant, ledger, strategies.
33const HOME = process.env.MERRYMEN_HOME ?? path.join(os.homedir(), ".merrymen");
34const SETTINGS = path.join(HOME, "settings.json");
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
cli/bin.mjsView on unpkg · L20 MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
cli/bin.mjsView on unpkg · L20 35const GRANT = path.join(HOME, "grant.json");
36const HEARTBEAT = path.join(HOME, "heartbeat.json");
37const DB = path.join(HOME, "merrymen.db");
38const STRATEGIES = path.join(HOME, "strategies");
39const PKG_STRATEGIES = path.join(ROOT, "strategies");
40const WELCOMED = path.join(HOME, ".welcomed");