TRMNL LiquidA VSCode extension for authoring TRMNL plugin templates locally — render Install: open Extensions sidebar → search "TRMNL Liquid", or run Features
Usage
Mock data file (
|
| Command | Description |
|---|---|
TRMNL: Open Preview |
Open the preview pane for the active .liquid file |
TRMNL: Set Preview Device |
Switch between OG / OG V2 / X (also available in toolbar) |
TRMNL: Set Preview Layout |
Override the layout auto-detected from filename |
Sample plugins
Two real plugins are vendored under samples/ as reference implementations:
samples/image/— random-image plugin with atrmnl.ymlpointing at a live polling URL. Demonstrates the Refresh flow.samples/gas_prices/— AAA fuel price tracker. Uses Liquidwherefilters and responsive value sizing (value--xxxlarge lg:value--giga). Puresample.json, no live fetch.
Each ships all four layout files (full, half_horizontal, half_vertical, quadrant). Open any of those folders in VSCode, open a .liquid file, and click the eye icon in the editor title to preview.
Development
npm install
npm run build # one-shot esbuild bundle
npm run watch # rebuild on change
Press F5 in VSCode (with this folder open) to launch the Extension Development Host pre-opened to samples/image (live polling demo). Edit .vscode/launch.json to switch to a different sample.
Releasing a new version to the Marketplace
One-time setup (already done): npx @vscode/vsce login objectgraph-llc — paste the Azure DevOps PAT once; vsce caches it.
Each release:
# 1. Make code changes; test in dev host (F5).
# 2. Bump version (auto-commits and tags):
npm version patch # 0.0.1 → 0.0.2 (bug fixes)
# npm version minor # 0.0.x → 0.1.0 (new features)
# npm version major # 0.x.x → 1.0.0 (breaking)
# 3. Build + publish to Marketplace:
npx @vscode/vsce publish
# 4. Mirror code + tag to GitHub:
git push && git push --tags
Listing updates at https://marketplace.visualstudio.com/items?itemName=objectgraph-llc.trmnl-liquid within ~5 minutes.
To ship to Open VSX (used by Cursor / VSCodium / Windsurf) too — first time, get a token at https://open-vsx.org/user-settings/tokens, then:
npx ovsx publish trmnl-liquid-<version>.vsix -p <open-vsx-token>
(You can omit Open VSX entirely; users on those editors can still sideload by downloading the .vsix from GitHub releases.)
Re-vendoring framework CSS
media/plugins.css is fetched from https://usetrmnl.com/css/latest/plugins.css. Asset URLs (url(/fonts/...), url(/images/...)) are rewritten in-place from usetrmnl.com → trmnl.com because the upstream paths 301-redirect and the webview CSP blocks the redirect target. If you re-vendor, re-run:
curl -L -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 14.0; rv:128.0) Gecko/20100101 Firefox/128.0" \
https://usetrmnl.com/css/latest/plugins.css -o media/plugins.css
sed -i '' \
-e 's#url(/fonts/#url(https://trmnl.com/fonts/#g' \
-e 's#url(/images/#url(https://trmnl.com/images/#g' \
media/plugins.css
Status
Phase 2 (live preview) is functional. Snippets / IntelliSense and pixel-perfect 1-bit dithering parity are not yet implemented.
License
MIT © Gavi Narra