CLI Quickstart
Get up and running with the LexBuild CLI in under 5 minutes.
Prerequisites
- Node.js 22 or later
- npm, pnpm, or yarn
Install
Run the CLI directly with npx (no global install required):
npx @lexbuild/cli --version
Or install globally:
npm install -g @lexbuild/cli
Download and Convert
Download and convert U.S. Code Title 1 (General Provisions):
# Download the XML source
lexbuild download-usc --title 1
# Convert to Markdown
lexbuild convert-usc --title 1
Output is written to ./output/usc/title-01/ with one Markdown file per section.
Inspect the Output
Each section produces a standalone .md file with YAML frontmatter:
---
identifier: "/us/usc/t1/s1"
title: "1 USC § 1 - Words denoting number, gender, and so forth"
source: "usc"
title_number: 1
section_number: "1"
---
[!NOTE] The
--titleflag accepts a title number (1-54). Use--allto process all titles.
Next Steps
- CLI Installation — Build from source, global install options
- Commands — Full command reference with flags and examples
- Output Format — Markdown structure, YAML schema, file paths