lemma
v0.8.22
Published
A pure, declarative language for business rules.
Maintainers
Readme
lemma
A pure, declarative language for business rules. Command-line interface for Lemma.
Run Lemma without installing anything globally:
npx lemma helpOr install globally:
npm install -g lemma
lemma --helpHow it works
This package is a thin Node.js launcher. The actual lemma binary is shipped as a platform-specific optional dependency (one of @lemmabase/cli-linux-x64, @lemmabase/cli-linux-arm64, @lemmabase/cli-darwin-x64, @lemmabase/cli-darwin-arm64, @lemmabase/cli-win32-x64, @lemmabase/cli-win32-arm64). npm installs only the package matching your OS and CPU; the launcher then execs the native binary directly. No download steps, no postinstall scripts, works offline.
Supported platforms
- Linux x86_64 (musl, statically linked)
- Linux aarch64 (musl, statically linked)
- macOS x86_64
- macOS aarch64 (Apple Silicon)
- Windows x86_64
- Windows aarch64 (ARM64)
If your platform is not supported, install via Cargo instead:
cargo install lemmaCommon commands
npx lemma run shipping
npx lemma run tax_calculation --rules=tax_owed
npx lemma run tax_calculation income=75000 filing_status="married"
npx lemma list
npx lemma schema pricing
npx lemma server --prefix ./examples --port 8012Each command supports --help.
Documentation
- CLI reference: https://github.com/lemma/lemma/blob/main/documentation/reference/cli.md
- Learn guide: https://github.com/lemma/lemma/blob/main/documentation/learn/readme.md
- Examples: https://github.com/lemma/lemma/tree/main/documentation/examples
Local development
To rebuild and test this package locally:
cargo build --release -p lemma
mkdir -p /tmp/lemma-bins/linux-x64
cp target/release/lemma /tmp/lemma-bins/linux-x64/lemma
node cli/packages/npm/build.js --binaries /tmp/lemma-bins
cd cli/packages/npm/dist/lemma && npm pack --dry-runEnd-to-end smoke test:
cd cli/packages/npm/dist
npm pack ./lemma ./platforms/linux-x64
mkdir -p /tmp/lemma-smoke && cd /tmp/lemma-smoke
npm init -y >/dev/null
npm install /path/to/cli/packages/npm/dist/lemma-*.tgz \
/path/to/cli/packages/npm/dist/lemmabase-cli-linux-x64-*.tgz
npx lemma --helpLicense
Apache-2.0
