@usetrim/trim
v0.1.19
Published
Trim CLI - local AI context optimization proxy (OpenAI-compatible). Installs the official binary from GitHub Releases.
Maintainers
Readme
@usetrim/trim
Official npm installer for the Trim CLI. On install it downloads the matching
binary from GitHub Releases, verifies
SHA-256 against checksums.txt, and exposes the trim command.
npm install -g @usetrim/trim
trim version
trim login
trim start
# everyday Always-on (preference + best-effort OS logon; no admin on normal Windows)
trim autostart enable
trim help autostart
trim help daemonNo environment variables required for Trim Cloud. Self-host overrides: see the Trim repo cli/.env.example.
Always-on docs: Always-on with IDE · trim autostart · Installation.
Or without a global install:
npx @usetrim/trim versionHow it works
postinstallfetchestrim_<os>_<arch>.(tar.gz|zip)for package versionvX.Y.Z- Verifies checksums from the same release
- Places the binary under
vendor/ bin/trim.jsexecs that binary (self-heals ifnpm install --ignore-scriptswas used)
Same assets as https://use-trim.com/install.sh (default CGO-free build).
Environment
| Variable | Meaning |
|----------|---------|
| TRIM_GITHUB_REPO | Override repo (owner/name), default usetrim/trim |
| TRIM_NPM_TAG | Override release tag (default v + package.json version) |
| TRIM_NPM_SKIP_DOWNLOAD=1 | Skip download (packaging/CI only) |
Prefer other installers?
- curl:
curl -fsSL https://use-trim.com/install.sh \| sh - Homebrew (when tap is live):
brew install usetrim/tap/trim - Windows:
irm https://use-trim.com/install.ps1 \| iex
Uninstall
Prefer the product uninstall first (stops proxy + OS logon, then you can remove the package):
trim uninstall
npm uninstall -g @usetrim/trimOn Windows, Always-on registers Startup Run → %LOCALAPPDATA%\Trim\bin\trim.exe (a stable copy outside this package). That means a running OS-logon daemon does not lock vendor\trim.exe, so npm uninstall / upgrades no longer hit EPERM on the npm tree.
preuninstall still best-effort runs daemon uninstall + stop and clears any leftover process that might still hold this package’s vendor\trim.exe (legacy installs that ran the daemon from node_modules).
License
MIT - see the Trim repository.
