CLI usage
How to use in browsers
Option 1: Try it out here
- On this page, open the browser console (for Chrome, press
Ctrl+Shift+J
(Windows/Linux) orCmd+Opt+J
(Mac)). - Run
console.log(lawtext.run.help)
in the browser console.
Option 2: Try in other places
- Copy the URL of lawtext.js.
- Open the browser console (for Chrome, press
Ctrl+Shift+J
(Windows/Linux) orCmd+Opt+J
(Mac)). - Run
await import("...")
(replace...
with the copied URL of lawtext.js) in the browser console. - Run
console.log(lawtext.run.help)
in the browser console.
How to use in Node.js
- Prerequisites: Node.js (opens in a new tab)
Option 1: Run the prebuilt bundle
- Download the prebuilt bundle from here: lawtext_cli.js
- Run
node lawtext_cli.js --help
Option 2: Run using npx
globally
- Run
npx lawtext --help
Option 3: Run as a package
- Run the following command in your working directory (or just an empty directory).
npm install lawtext
- Run
npx lawtext --help
Option 4: Run independently
- Clone or download the Lawtext repository (opens in a new tab), move to the
core
directory, and runnpm install
. - Run
npm run lawtext -- --help
(note that you need--
before the lawtext options.)