mvp-ai's picture
download
raw
1.21 kB
"use strict";
/**
* npm postinstall — auto-wire crew into Claude Code, Codex, and OpenCode.
*
* Runs only on global installs (`npm i -g`). Set CREW_NO_HOOK=1 to opt out.
* Never fails the install: errors are reported and swallowed.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const settings_1 = require("./settings");
function main() {
if (process.env.CREW_NO_HOOK === "1")
return;
const isGlobal = process.env.npm_config_global === "true" ||
process.env.npm_config_location === "global";
if (!isGlobal)
return; // local/dev install: don't touch user settings
for (const agent of settings_1.AGENTS) {
const shown = (0, settings_1.tildify)((0, settings_1.settingsPath)(agent));
try {
if ((0, settings_1.installHook)(agent) === "installed") {
process.stdout.write(`✓ crew wired into ${settings_1.AGENT_LABELS[agent]} (${shown}).\n`);
}
}
catch (err) {
process.stdout.write(`crew: couldn't update ${shown} (${err.message}).\n` +
"crew: run `crew install-hook` to retry, or add the hook manually — see the README.\n");
}
}
}
main();

Xet Storage Details

Size:
1.21 kB
·
Xet hash:
74bdf8d5d05f990c8348e4e7625557988813db4717664adf24c66204658d866b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.