trimprompt-hub
v1.0.7
Published
TrimPrompt Enterprise Hub Server - Self-Hosted Offline Analytics
Downloads
41
Readme
TrimPrompt.ai — Enterprise Hub Server
TrimPrompt Enterprise Hub is a self-hosted, offline-ready management server and telemetry aggregator designed to compile, normalize, and visualize LLM token savings and cost metrics across your entire organization.
It acts as a secure, B2B on-premise endpoint that receives daily-aggregated token usage statistics sent by developer client machines running the trim CLI.
Features
- Centralized Analytics Dashboard: Track total tokens saved, reduction rate, original vs. compressed AI API bill estimates, and developer leaderboards.
- Flat-rate Security: Zero phone-home calls, zero cloud dependencies, and zero data leaves your company's network.
- Background Daemon Control: Built-in command line control (start, stop, status, restart) to run as a background service.
- Seat-licensed Verification: Enforces organizational developer seat limits dynamically based on an RSA-signed license file.
Quick Start (Easiest Method)
To launch the Enterprise Hub server on port 5000 instantly:
npx trimprompt-hubBy default, the server will start in the foreground and look for or create the database (hub-db.json) and license configuration (license.json) in your current working directory.
Global Installation & Persistent Execution
If you prefer to install it globally on your VM / Server:
npm install -g trimprompt-hub[!IMPORTANT] Auto-Start on Reboot: The installation process will automatically attempt to configure the Hub to start persistently in the background on system boot using PM2. To ensure the startup registry/scripts are injected successfully, you MUST run the installation command above as an Administrator (or using
sudo).
Background Daemon Operations (CLI)
You can run the Hub server permanently in the background:
- Start the server in background:
This runs the server as a detached background process, redirects console output totrimprompt-hub starthub.log, and writes the process ID tohub.pid. - Check running status:
trimprompt-hub status - Stop the background process:
trimprompt-hub stop - Restart / Apply changes (e.g. new port or config):
trimprompt-hub restart
Configuration & Custom Ports
The Hub server reads the following environment variables:
PORT: Custom port (defaults to5000).DATABASE_PATH: Custom database JSON path (defaults to./hub-db.json).LICENSE_PATH: Custom license JSON path (defaults to./license.json).
Running on a custom port in the background:
- Linux/macOS:
PORT=8080 trimprompt-hub start - Windows (PowerShell):
$env:PORT=8080; trimprompt-hub start
Activating Your Enterprise License
- Generate your base64-encoded license key string.
- Open the Hub Dashboard by navigating to the server URL (e.g.,
http://localhost:5000). - Paste the license key string into the License Lockout Overlay and click "Activate Hub".
- The key will be written locally to
license.jsonand the dashboard will unlock automatically.
Connecting Developer CLI Clients
To direct your developers' local telemetry metrics to this Enterprise Hub, developers must configure their global environment variable:
export TRIMPROMPT_TELEMETRY_URL="http://your-internal-hub-url:5000/api/telemetry"Alternatively, developers can set it in their local config file using the CLI:
trim config set telemetry_url "http://your-internal-hub-url:5000/api/telemetry"Once configured, their CLI will sync daily-aggregated cost and token savings metrics to the Hub dashboard automatically in the background.
License
Proprietary — TrimPrompt.ai
