@llmtrim/cli
Advanced tools
| #!/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" | ||
| } | ||
| } |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3757
40.24%4
33.33%38
137.5%3
50%2
100%