Sign In

@llmtrim/cli

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@llmtrim/cli - npm Package Compare versions

Comparing version
0.5.0
to
0.6.1
+22
bin/llmtrim-tray.js
#!/usr/bin/env node
// Resolve the platform package's prebuilt tray binary and exec it with our args.
const { spawnSync } = require("child_process");
const fs = require("fs");
const path = require("path");
const pkg = `@llmtrim/${process.platform}-${process.arch}`;
const bin = process.platform === "win32" ? "llmtrim-tray.exe" : "llmtrim-tray";
let exe;
try {
exe = path.join(path.dirname(require.resolve(`${pkg}/package.json`)), "bin", bin);
} catch {
exe = null;
}
// The Linux platform packages resolve but carry no tray binary, so check the file too.
if (!exe || !fs.existsSync(exe)) {
console.error(`llmtrim-tray: no prebuilt tray for ${process.platform}-${process.arch}.`);
console.error("The npm package bundles the tray on macOS and Windows only.");
console.error("On Linux download llmtrim-tray from https://github.com/fkiene/llmtrim/releases");
process.exit(1);
}
const r = spawnSync(exe, process.argv.slice(2), { stdio: "inherit" });
process.exit(r.status === null ? 1 : r.status);
+9
-8
{
"name": "@llmtrim/cli",
"version": "0.5.0",
"version": "0.6.1",
"description": "Cut your LLM bill: drop-in proxy that compresses input, output, and cache. Any provider, answers unchanged.",

@@ -10,12 +10,13 @@ "mcpName": "io.github.fkiene/llmtrim",

"keywords": ["llm", "tokens", "compression", "proxy", "mcp", "openai", "anthropic", "claude"],
"bin": { "llmtrim": "bin/llmtrim.js" },
"bin": { "llmtrim": "bin/llmtrim.js", "llmtrim-tray": "bin/llmtrim-tray.js" },
"engines": { "node": ">=10" },
"files": ["bin", "README.md"],
"optionalDependencies": {
"@llmtrim/linux-x64": "0.5.0",
"@llmtrim/linux-arm64": "0.5.0",
"@llmtrim/darwin-x64": "0.5.0",
"@llmtrim/darwin-arm64": "0.5.0",
"@llmtrim/win32-x64": "0.5.0",
"@llmtrim/win32-arm64": "0.5.0"
"@llmtrim/linux-x64": "0.6.1",
"@llmtrim/linux-arm64": "0.6.1",
"@llmtrim/darwin-x64": "0.6.1",
"@llmtrim/darwin-arm64": "0.6.1",
"@llmtrim/win32-x64": "0.6.1",
"@llmtrim/win32-arm64": "0.6.1"
}
}