LogicApps.Liquid.Cli
1.1.0
See the version list below for details.
dotnet tool install --global LogicApps.Liquid.Cli --version 1.1.0
dotnet new tool-manifest
dotnet tool install --local LogicApps.Liquid.Cli --version 1.1.0
#tool dotnet:?package=LogicApps.Liquid.Cli&version=1.1.0
nuke :add-package LogicApps.Liquid.Cli --version 1.1.0
Logic Apps Standard - Liquid validator and runner
la-liquid validates Liquid maps and runs them exactly like the Azure Logic Apps Liquid action, without deploying anything. Use it on your machine, in Azure DevOps and in GitHub Actions.
> la-liquid validate --map samples/maps/common-mistakes.liquid --input samples/inputs/common-mistakes.json
samples/maps/common-mistakes.liquid JsonToJson (inferred)
✖ error LQ010 Filter 'upcase' is skipped by Logic Apps
at samples/maps/common-mistakes.liquid:6:32
6 │ "name": "{{ content.name | upcase }}",
│ ^^^^^^
fix Use 'Upcase'.
⚠ warning LQ021 Comparison with nil misses JSON null values
at samples/maps/common-mistakes.liquid:8:40
8 │ "hasEmail": {% if content.email == nil %}false{% else %}true{% endif %},
│ ^^^
fix Also compare with "", for example 'x != nil and x != ""'.
✖ Validation failed 1 map · 1 error · 1 warning
filters 1 error LQ010
values & paths 1 warning LQ021
More about a code: la-liquid explain LQ010
Why
The Liquid that Logic Apps runs is not the Liquid in the Shopify documentation, and most mistakes do not fail the workflow. They silently produce a wrong output:
| You write | Shopify Liquid | Logic Apps |
|---|---|---|
{{ name \| upcase }} |
SAHIN |
sahin: the filter is unknown and skipped |
{{ items \| where: "id", 1 }} |
filtered array | the whole array: there is no where filter |
{% if value == nil %} for JSON null |
true | false: null becomes an empty string |
{{ "2026" \| Plus: 1 }} |
2027 |
20261: text is joined |
{{ 1.5 \| Times: 2 }} on a Dutch machine |
3 |
30: the decimal is read with the host culture |
la-liquid runs the same engine with the same settings as Logic Apps, and reports these problems with file, line, the actual values and a fix.
Install
| Way | Command | Needs |
|---|---|---|
| .NET tool | dotnet tool install --global LogicApps.Liquid.Cli |
.NET 10 |
| Executable | GitHub Releases (Windows, Linux, macOS) | nothing |
| GitHub Action | uses: sahinozd/LogicAppsStandard.Liquid@v1.0.2 |
– |
| Azure DevOps | step template | – |
| .NET library | dotnet add package LogicApps.Liquid |
.NET 10 |
Quick start
# Check every map in a folder
la-liquid validate --map ./Artifacts/Maps
# Run a map with a sample message; the output is only written when there are no errors
la-liquid transform --map ./Artifacts/Maps/order.liquid --input ./samples/order.json --output ./out/order.json
# Run a test suite with expected outputs, with a JUnit report for the pipeline
la-liquid test --suite ./tests/liquid-tests.json --junit ./TestResults/liquid.xml
# What does a code mean?
la-liquid explain LQ102
Usage guide: every command and option with examples, test suites, pipelines, editors and the library.
What it checks
| Check | Needs input | Finds |
|---|---|---|
| Static checks | no | Syntax errors with their location, wrongly cased or unknown tags and filters, nil/null pitfalls, paths that read another property (.@code), risky idioms such as Plus: 0 |
| Engine | yes | Parse and render errors exactly as Logic Apps reports them, missing values, invalid JSON output |
| Differences from Shopify Liquid | yes | Filters that give a different result than in Shopify Liquid for the actual values, for example "2026" \| Plus: 1 giving 20261 |
The diagnostics reference lists every code, the differences from Shopify Liquid, and the patterns found in real-world maps. la-liquid explain shows the same information in the terminal.
How it matches Logic Apps
The Logic Apps Standard runtime (workflow extension bundle 1.170.91) runs Liquid like this, and la-liquid does the same:
- Engine: DotLiquid 2.0.361, the same binary.
- Names: filters in C# style (
Upcase,DividedBy), tags lowercase (if,for), plus theJSONArrayFortag. - Input: available as
content. JSONnullbecomes""and dates stay text; XML lookups ignore namespaces and case. - Errors: render errors don't fail the action, but are written into the output as
Liquid error: .... For*ToJson, invalid JSON output fails the action. - Host: culture
en-USand time zone UTC, unless the app settingWEBSITE_TIME_ZONEis set. The tool emulates both, so a run on a Dutch laptop gives the same result as Azure.
Proven, not assumed: the conformance tests (tests/Liquid.ConformanceTests) load the real Logic Apps Liquid engine from the extension bundle. They run every case through both engines, in en-US and nl-NL, and require identical results. The input handling and JSONArrayFor are written from a specification of the observable behaviour, not from Microsoft's code.
Logic Apps Consumption uses DotLiquid 2.0.361 with the same settings according to Microsoft, so the tool works the same way. The conformance tests can only prove this for Standard, because only that runtime can be installed locally.
Related tools
LiquidTester, the DotLiquid Debugger for VS Code and older CLI renderers show the output of a DotLiquid map while you write it. la-liquid adds the Logic Apps setup (culture, time zone, content, JSONArrayFor) proven by conformance tests, the checks with fixes, and pipeline support: exit codes, annotations, test suites and JUnit reports.
Known limitations
- Differences from Shopify Liquid need input: they are found while rendering, so only for the values in your input.
- Static checks are heuristic: they read the map text, and can miss unusual expressions.
- Not supported yet: the output JSON schema of the Liquid action, UTF-16 XML files, and base64
$contentenvelopes as input files. - One transform at a time per process: DotLiquid's configuration and the emulated time zone are process-wide.
Releases
A release is created when a version tag (v1.2.3) is pushed: NuGet packages on NuGet.org and GitHub Packages, executables for six platforms, and checksums. What changed is in the changelog.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.