New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

trmnl-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trmnl-cli

CLI tool for TRMNL e-ink displays - send, validate, and track payloads

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

trmnl-cli

npm

CLI for TRMNL e-ink displays. Send, validate, preview, and track payloads from your terminal.

Documentation · npm

Install

npm install -g trmnl-cli@latest

Requires Node.js 22.6.0 or later. Or run without installing:

npx trmnl-cli@latest send --help

Quick Start

# Add your first plugin (webhook)
trmnl plugin add home "https://trmnl.com/api/custom_plugins/YOUR_UUID"

# Send content
trmnl send --content '<div class="layout">Hello TRMNL!</div>'

# Or from a file
trmnl send --file ./output.html

Commands

trmnl send

Send content to your TRMNL display.

# Direct content
trmnl send --content '<div class="layout">Hello</div>'

# From file
trmnl send --file ./output.html

# To a specific plugin
trmnl send --file ./output.html --plugin office

# From stdin
echo '{"merge_variables":{"content":"..."}}' | trmnl send
FlagDescription
-c, --content <html>HTML content to send
-f, --file <path>Read content from file
-p, --plugin <name>Plugin to use (default: default plugin)
-w, --webhook <url>Override webhook URL directly
--skip-validationSkip payload validation
--skip-logDon't log to history
--jsonOutput result as JSON

trmnl validate

Validate a payload without sending. Checks size against your tier limit.

trmnl validate --file ./output.html
trmnl validate --content "..." --tier plus
FlagDescription
-c, --content <html>HTML content to validate
-f, --file <path>Read content from file
-t, --tier <tier>Override tier (free or plus)
--jsonOutput result as JSON

trmnl preview

Render content locally using the actual TRMNL framework and take a screenshot. Useful for checking layout, overflow, and visual appearance before sending to a device.

Requires Playwright. Install browsers once with npx playwright install chromium.

# Preview a file
trmnl preview --file ./output.html

# Preview and open in default viewer
trmnl preview --file ./output.html --open

# Preview for a specific device
trmnl preview --file ./output.html --device v2

# From stdin
echo '<div class="layout">Hello</div>' | trmnl preview
FlagDescription
-c, --content <html>HTML content to preview
-f, --file <path>Read content from file
-o, --output <path>Screenshot output path
--openOpen screenshot in default viewer
--device <id>Device profile: og, v2, x (default: og)
--no-overflow-checkSkip overflow detection
--update-frameworkForce-update cached TRMNL framework before rendering
--jsonOutput result as JSON

Device profiles:

DeviceResolutionBit depth
og800 x 4802-bit
v21040 x 7804-bit
x1872 x 14044-bit

The exit code is 1 if overflow is detected, 0 otherwise.

trmnl framework

Manage the cached TRMNL CSS/JS framework used by preview.

trmnl framework status    # Show cached framework info
trmnl framework update    # Fetch latest from CDN
trmnl framework check     # Check if an update is available

trmnl plugin

Manage webhook plugins. Each plugin is a named reference to a TRMNL custom plugin webhook URL.

# List plugins
trmnl plugin

# Add a plugin
trmnl plugin add home "https://trmnl.com/api/custom_plugins/abc123"
trmnl plugin add office "https://trmnl.com/api/custom_plugins/xyz789" --desc "Office display"

# Set default
trmnl plugin default home

# Update a plugin
trmnl plugin set home --url "https://..."

# Remove a plugin
trmnl plugin rm office

trmnl config

Show current configuration: plugins, tier, history path, and environment variables.

trmnl config

trmnl tier

Get or set the payload size tier.

trmnl tier         # Show current tier
trmnl tier plus    # Set to plus (5 KB limit)
trmnl tier free    # Set to free (2 KB limit)

trmnl history

View and filter send history.

trmnl history              # Last 10 sends
trmnl history --last 20    # Last N sends
trmnl history --today      # Today's sends
trmnl history --failed     # Failed sends only
trmnl history --plugin home  # Filter by plugin
trmnl history stats        # Statistics
trmnl history clear --confirm  # Clear history

Configuration

Config file

Settings are stored in ~/.trmnl/config.json:

{
  "plugins": {
    "home": {
      "url": "https://trmnl.com/api/custom_plugins/...",
      "description": "Living room display"
    }
  },
  "defaultPlugin": "home",
  "tier": "free"
}

Environment variables

VariableDescription
TRMNL_WEBHOOKWebhook URL (overrides config, highest priority)

Data directory

All data is stored in ~/.trmnl/:

FileDescription
config.jsonPlugin and tier configuration
history.jsonlSend history (one JSON entry per line)

Tier limits

TierPayload limitRate limit
Free2 KB (2,048 bytes)12 requests/hour
Plus5 KB (5,120 bytes)30 requests/hour

License

MIT

Keywords

trmnl

FAQs

Package last updated on 26 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts