CLI reference
This page lists every command, argument and option of l3lint 1.0.0. It is generated from the same command tree the tool parses, so it matches l3lint <command> --help. For a task-oriented guide with examples, see Using the CLI.
Commands
| Command | Description |
|---|---|
l3lint lint |
Lint payload files, folders, globs, NDJSON or standard input. |
l3lint explain |
Show a rule's requirement, rationale, sources, confidence, dates and examples. |
l3lint fix |
Print a JSON Patch of mechanical fixes, or write a patched copy. |
l3lint convert |
Map a gateway payload to canonical JSON, with the path map. |
l3lint rules |
Browse rules and run every rule's examples. |
l3lint rules list |
List rules and rule packs. |
l3lint rules show |
Show one rule's reference page. |
l3lint rules test |
Run every rule's pass and fail examples. |
l3lint schema |
Print a JSON Schema: canonical, results, config, rulepack and others. |
l3lint init |
Write .l3lint.yaml, .l3lint.lock, a sample payload and a sample GitHub workflow. |
l3lint version |
Print the engine and rule pack versions. |
Global options
These options belong to the root command. Options marked "every command" also apply after any command name, for example l3lint lint payload.json --no-color.
| Option | Aliases | Value | Default | Applies to | Description |
|---|---|---|---|---|---|
--help |
-?, -h, /?, /h |
none (flag) | off | every command | Show help and usage information |
--version |
none | none (flag) | off | l3lint only |
Show version information |
--no-color |
none | none (flag) | off | every command | Turn off color. NO_COLOR also turns it off. |
--quiet |
-q |
none (flag) | off | every command | Print less: no progress notes and no passing results. |
--verbose |
-v |
none (flag) | off | every command | Print more: settings notes and stack traces for internal errors. |
--log-level |
none | <log-level> |
warn |
every command | Log level: error, warn, info, debug or trace. Default: warn. |
--log-format |
none | <log-format> |
text |
every command | Log format: text or json. Logs go to standard error. |
--log-values |
none | none (flag) | off | every command | Include masked payload values in logs. Off by default. |
l3lint lint
Lint payload files, folders, globs, NDJSON or standard input.
Usage: l3lint lint <inputs>... [options]
Arguments
| Argument | Count | Description |
|---|---|---|
<inputs> |
one or more | Files, folders, globs such as fixtures/**/*.json, NDJSON files, or - for standard input. |
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--format |
-f |
one of auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom, csv |
auto | Input format: auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom or csv. Default: auto. |
--map |
none | <path> |
none | Column map for CSV input. |
--currency |
none | <XXX> |
none | ISO 4217 currency for payloads that carry none, such as Braintree requests. Payload values win. |
--brand |
none | one of auto, visa, mastercard, amex, discover, all |
auto (reads card.brand) | Card brand to lint against: auto, visa, mastercard, amex, discover or all. Default: auto (reads card.brand). |
--card-product |
none | one of consumer, business, corporate, purchasing, fleet, commercialPrepaid |
none | Card product, overriding the payload: consumer, business, corporate, purchasing, fleet or commercialPrepaid. |
--mcc |
none | <nnnn> |
none | Merchant category code, 4 digits, overriding the payload. |
--merchant-country |
none | <XX> |
US | Merchant country, ISO alpha-2. Default: US. |
--processor |
none | a profile name (adyen, amex-advice-text, authorizenet, braintree, checkoutcom, cybersource, generic, jpmorgan, mastercard-gateway-amex, stripe) or the path of a profile YAML file |
generic | Processor profile name or path to a profile YAML file. Default: generic. |
--as-of |
none | <YYYY-MM-DD> |
the transaction date, else today | Lint against the rules in force on this date (YYYY-MM-DD). Default: the transaction date, else today. |
--config |
none | <path> |
the nearest .l3lint.yaml walking up from the current folder | Config file. Default: the nearest .l3lint.yaml walking up from the current folder. |
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
--only |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Run only these rule IDs or globs. Repeatable. |
--disable |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Rule IDs or globs to skip, for example VISA-DQ-*. Repeatable. |
--severity |
none | <RULE=level>; repeatable |
none | Severity override as RULE=level, for example GEN-DQ-007=error. Repeatable. |
--rates |
none | <path> |
none | Rate table YAML that enables cost estimates. |
--strict-pci |
none | none (flag) | off | Stop when a card number is found instead of masking it. |
--strict-profiles |
none | none (flag) | off | Run single-processor rules as errors. |
--fail-on |
none | one of error, warning, information, none |
error | Lowest severity that sets exit code 1: error, warning, information or none. Default: error. |
--output |
-o |
<kind[=path]>; repeatable |
none | Output kind: text, json, sarif, junit or markdown. Use kind=path to write a file. Repeatable. |
--max-findings |
none | <n> |
none | Most findings to print. The summary still counts every finding. |
--annotations |
none | one of github, none |
none |
Also print GitHub workflow annotations for findings at or above --fail-on: github or none. |
The global options marked "every command" also apply.
l3lint explain
Show a rule's requirement, rationale, sources, confidence, dates and examples.
Usage: l3lint explain <ruleId> [options]
Arguments
| Argument | Count | Description |
|---|---|---|
<ruleId> |
exactly one | A rule ID, for example VISA-L3-004. |
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--output |
-o |
one of text, json |
text |
Output: text or json. |
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
The global options marked "every command" also apply.
l3lint fix
Print a JSON Patch of mechanical fixes, or write a patched copy.
Usage: l3lint fix <input> [options]
Arguments
| Argument | Count | Description |
|---|---|---|
<input> |
exactly one | The payload file to fix, or - for standard input. |
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--format |
-f |
one of auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom, csv |
auto | Input format: auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom or csv. Default: auto. |
--map |
none | <path> |
none | Column map for CSV input. |
--currency |
none | <XXX> |
none | ISO 4217 currency for payloads that carry none, such as Braintree requests. Payload values win. |
--brand |
none | one of auto, visa, mastercard, amex, discover, all |
auto (reads card.brand) | Card brand to lint against: auto, visa, mastercard, amex, discover or all. Default: auto (reads card.brand). |
--card-product |
none | one of consumer, business, corporate, purchasing, fleet, commercialPrepaid |
none | Card product, overriding the payload: consumer, business, corporate, purchasing, fleet or commercialPrepaid. |
--mcc |
none | <nnnn> |
none | Merchant category code, 4 digits, overriding the payload. |
--merchant-country |
none | <XX> |
US | Merchant country, ISO alpha-2. Default: US. |
--processor |
none | a profile name (adyen, amex-advice-text, authorizenet, braintree, checkoutcom, cybersource, generic, jpmorgan, mastercard-gateway-amex, stripe) or the path of a profile YAML file |
generic | Processor profile name or path to a profile YAML file. Default: generic. |
--as-of |
none | <YYYY-MM-DD> |
the transaction date, else today | Lint against the rules in force on this date (YYYY-MM-DD). Default: the transaction date, else today. |
--config |
none | <path> |
the nearest .l3lint.yaml walking up from the current folder | Config file. Default: the nearest .l3lint.yaml walking up from the current folder. |
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
--only |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Run only these rule IDs or globs. Repeatable. |
--disable |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Rule IDs or globs to skip, for example VISA-DQ-*. Repeatable. |
--severity |
none | <RULE=level>; repeatable |
none | Severity override as RULE=level, for example GEN-DQ-007=error. Repeatable. |
--rates |
none | <path> |
none | Rate table YAML that enables cost estimates. |
--strict-pci |
none | none (flag) | off | Stop when a card number is found instead of masking it. |
--strict-profiles |
none | none (flag) | off | Run single-processor rules as errors. |
--dry-run |
none | none (flag) | off | Print the patch without writing anything. This is the default. |
--write |
none | <path> |
none | Write the patched copy to this path instead of printing the patch. |
--fix-amount |
none | none (flag) | off | Also recompute the transaction amount. Off by default because it changes what the card is charged. |
The global options marked "every command" also apply.
l3lint convert
Map a gateway payload to canonical JSON, with the path map.
Usage: l3lint convert <input> [options]
Arguments
| Argument | Count | Description |
|---|---|---|
<input> |
exactly one | The payload file to convert, or - for standard input. |
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--format |
-f |
one of auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom, csv |
auto | Input format: auto, canonical, stripe, adyen, braintree, cybersource, authorizenet, checkoutcom or csv. Default: auto. |
--map |
none | <path> |
none | Column map for CSV input. |
--currency |
none | <XXX> |
none | ISO 4217 currency for payloads that carry none, such as Braintree requests. Payload values win. |
--brand |
none | one of auto, visa, mastercard, amex, discover, all |
auto (reads card.brand) | Card brand to lint against: auto, visa, mastercard, amex, discover or all. Default: auto (reads card.brand). |
--card-product |
none | one of consumer, business, corporate, purchasing, fleet, commercialPrepaid |
none | Card product, overriding the payload: consumer, business, corporate, purchasing, fleet or commercialPrepaid. |
--mcc |
none | <nnnn> |
none | Merchant category code, 4 digits, overriding the payload. |
--merchant-country |
none | <XX> |
US | Merchant country, ISO alpha-2. Default: US. |
--processor |
none | a profile name (adyen, amex-advice-text, authorizenet, braintree, checkoutcom, cybersource, generic, jpmorgan, mastercard-gateway-amex, stripe) or the path of a profile YAML file |
generic | Processor profile name or path to a profile YAML file. Default: generic. |
--as-of |
none | <YYYY-MM-DD> |
the transaction date, else today | Lint against the rules in force on this date (YYYY-MM-DD). Default: the transaction date, else today. |
--config |
none | <path> |
the nearest .l3lint.yaml walking up from the current folder | Config file. Default: the nearest .l3lint.yaml walking up from the current folder. |
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
--only |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Run only these rule IDs or globs. Repeatable. |
--disable |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Rule IDs or globs to skip, for example VISA-DQ-*. Repeatable. |
--severity |
none | <RULE=level>; repeatable |
none | Severity override as RULE=level, for example GEN-DQ-007=error. Repeatable. |
--rates |
none | <path> |
none | Rate table YAML that enables cost estimates. |
--strict-pci |
none | none (flag) | off | Stop when a card number is found instead of masking it. |
--strict-profiles |
none | none (flag) | off | Run single-processor rules as errors. |
--to |
none | <canonical>; required |
none | Target format. The only target is canonical. |
--canonical-only |
none | none (flag) | off | Print only the canonical JSON, one transaction per line. |
The global options marked "every command" also apply.
l3lint rules
Browse rules and run every rule's examples.
Usage: l3lint rules <command>
Subcommands
| Command | Description |
|---|---|
l3lint rules list |
List rules and rule packs. |
l3lint rules show |
Show one rule's reference page. |
l3lint rules test |
Run every rule's pass and fail examples. |
The global options marked "every command" also apply.
l3lint rules list
List rules and rule packs.
Usage: l3lint rules list [options]
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--brand |
none | one of general, visa, mastercard, amex, discover |
none | Only rules for this brand: general, visa, mastercard, amex or discover. |
--level |
none | one of general, L2, L3 |
none | Only rules at this level: general, L2 or L3. |
--query |
none | <text> |
none | Only rules whose ID, title or requirement contains this text. |
--output |
-o |
one of text, json |
text |
Output: text or json. |
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
The global options marked "every command" also apply.
l3lint rules show
Show one rule's reference page.
Usage: l3lint rules show <ruleId> [options]
Arguments
| Argument | Count | Description |
|---|---|---|
<ruleId> |
exactly one | A rule ID, for example VISA-L3-004. |
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
The global options marked "every command" also apply.
l3lint rules test
Run every rule's pass and fail examples.
Usage: l3lint rules test [options]
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
--only |
none | a rule ID, or a glob such as VISA-DQ-*; repeatable |
none | Run only these rule IDs or globs. Repeatable. |
The global options marked "every command" also apply.
l3lint schema
Print a JSON Schema: canonical, results, config, rulepack and others.
Usage: l3lint schema <name>
Arguments
| Argument | Count | Description |
|---|---|---|
<name> |
exactly one | The schema to print. One of: canonical, results, config, rulepack, csvmap, rates, profile, lock. |
The global options marked "every command" also apply.
l3lint init
Write .l3lint.yaml, .l3lint.lock, a sample payload and a sample GitHub workflow.
Usage: l3lint init [options]
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--directory |
-d |
<path> |
. |
Folder to write the files in. Default: the current folder. |
--force |
none | none (flag) | off | Overwrite files that already exist. |
The global options marked "every command" also apply.
l3lint version
Print the engine and rule pack versions.
Usage: l3lint version [options]
Options
| Option | Aliases | Value | Default | Description |
|---|---|---|---|---|
--rule-pack |
none | <path>; repeatable |
none | Folder of a rule pack to load in addition to the embedded packs. Repeatable. |
The global options marked "every command" also apply.