# @procore/license-check

> Validates that packages use correctly-licensed npm packages.

Latest version **2.1.1** (published 2025-08-13) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @procore/license-check
pnpm add @procore/license-check
yarn add @procore/license-check
bun add @procore/license-check
```

Provides the commands `pocket-sand`, `license-check`.

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2025-08-13 |
| First published | 2022-10-05 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 3 |
| Unpacked size | 66.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Procore Technologies, Inc |
| Maintainers | dancingshell, justinmwatts, antonyayoub, rysmithprocore, robbiegprocore, jadamsss, jeremy.bouzigard, jgentes, faraz.hanif, timdoherty, ajaykumar-procore, b.bookout, jalyng, chadryder, htael, refaiepcn, james.lawson, vinayakaprabhu, davidshure, james.cleary, jl4ever, andersonbispoprocore, dev-account-admin, brockpcor, rowan.ibrahim, sseanwang, ramysaid2, vinaya-procore, lalovar-procore, bhargavrnd, ihor.diachenko_procore, farismmk, gideon-procore, dannyporrello, alanprocore, chance.eakin.procore, stevenliprocore, javio-procore, kani-procore, enyaga, danny.ou, messanjah, david-christensen-procore, shradha.khard, winson.chu, eyvettesou, lzhou888, jnhoang1, nickprocore, neil.mckeeman, pam-whisenhunt, jgee67, youssefamer, mike-arndt-procore, bob.laskowski, cagmz, mariah_delaney, lukenispel, fabriciobd, bikash.sahoo, bbreyel921, kimhin267, andy.mayer, phil.custer, elijah.procore, juliana.hernandez, judy-lu-pc, procore-it-support, andrewburke-pc, jkleintech, rachel.arkebauer, procore-npm-bot, grafffffff, yoyis3000, james.dabbs-procore, laurenbrandsteinprocore, scottbieser-procore, amir-iskander, zach.mckenzie.procore, amyprocore, shayonj_procore, heplayskeys, mike.south, thomasoboyle, dischorde, derek-carter-procore, dlgasser, cfprocore, evan.waits, jeremy-marcus, jmejia-fsl, ersgonzalo, timofeee, stephan-procore, aleclarsenprocore, sarah.freitas, yihai.zweifel, jay-rajan, jacky-lei, apcarroll_procore, procore_halzy, mehrdad-panahandeh, peter.jin, uddhavjoglekar, brookyboy009, denzylbalram, changprocore, allenanle.procore, devin.cunningham.procore, ari-procore, noor.ali, hgouhierprocore, cyrille.bai, brad.urani, dmccraw-procore, patrick.lardin, abhijit.patwardhan, matt.harris0223, alan.bresani, jesse.olsen, dtorres-procore, dineshkumar.jayak, jason-kaye, yadhu.prakash, leandro-proc, andrew.wheeler, sherylnapigkit, lydiahara, kahliholmes, sateesh-kadiyala-procore, epalinprocore, dennis.heckman, jamie-dugan-procore, viktoriia_azarovska, daniel.ferreira-contractor, willpankonien, ladavarga, steven.hinkle, txin1, chris.berber, etokarev, ritchlee, karina.mendez-contractor, worldofsatyaki, greg.sparks, kyle.williams, kuldeepsingh4556, jeremy.lund, brocktillotsonprocore, stajics, ryanfuentesprocore, tyler.wasden.procore, fabiomelo513, cody_schindler_procore, amit.gurav-contractor, yoasyo25, kalyani.gosavi, hectorthiele, andersontr15, vishal-procore, omar.wagdy, yogevfine1, charan_procore, scorgiat-procore, mbartlett413, attachi, ahmed.ghorab, varomir, alyelashram_procore, ilya.dryha-contractor, evan.cerwonka.procore, vsobol-c, dmitri_wm, kellikearns, richard.bunn, chaitra-m-15, conner-procore, mishaelowoyemi, peterknif, aleh.haurylenia-contractor, miguel.garcia-procore, codyrobertsprocore, a.elbadawei, lnspatz914, melch-procore, mustafa-abdelrahman, atoaima, jasaswini, adarsh.gautam, amin.jaipuri, max.helmetag, s_kudryk, hyogman, kyle.liu, davidkangpro, stevenkang3, cbathgate, victorbendeck-pc, sarah.heredia, moaz-ashraf, aly-el-kerdany, procore-oss-user, abhishekkumar123, stephanie.brereton, saurasumprocore, mona.khairbek, elewando-procore, jyang-procore, tedyang, deiab, jgreene_procore, asamay, kenny.foisy, ganesh.raghupathy, rajatmenhdiratta, yzhou2024, dlameter-procore, decha-sanson, kylepietz, connie-feng-procore, roger-procore, matheusprocore, fernandocamilotti, simona.iancu, jacksonleach-procore, g2mitchell, tatsiana.clifton, phunguyen-pcor, pmfrawley, brian.smith1, scottstern, neil1023, srichaitanya.peddinti, jake-pitkin, erikthoreson, lhuang325, abhijit-procore, rodayna.ehab, fairchild, mustafa-u-abdelrahman, aberkowitz, pwhisenhunt-procore, mariia.solodovnik, nigeld-procore, samad.virani, bohdan-horai-procore, mathenes_procore, vinoth.kuppusamy, zayter, alan.facchini-contractor, cassianomatos-procore, amitk030, sflang-procore, tracy.otto, daniel-pierre-procore, glidenor, ashish.sharma2024, gaurav.sharma.procore, andres-mendez-procore, roobo-romeski, kylemartinez-procore, sean.spearman.procore, gturkadze, jeffgiaquinto, ezrasimeloff, bill-wagner, kellen.stewart, rodrigo.dejuana, saranahal2, andrew.isaac, agamaleldin, mostafaeltazy, magdyyxx, andreszorrilla-procore, mohitsharma97, tejeshwar, swati.jadhav, squidbeaks, subham.panigrahi, deepak.kumarts, mahesh-s96, mohamed.adel, rana.eltayar, mahmoud-sharshar, syamphanindra, veroniaosama, imanselim, helmy162-procore, pclemons, samuelvelez8383, vinitdeshkar-procore, mariam_mazen, mina-elnagar, daniel_andrews, mohanad-ayman, arsenii.derkach-procore, stepanvanzuriakprocore, nd-procore, marwansalem-prc |
| Keywords | checker, license, snyk |

## Links

- npm: https://www.npmjs.com/package/@procore/license-check
- Repository: https://github.com/procore/frontend-tooling
- Issues: https://github.com/procore/frontend-tooling/issues
- npm.io page: https://npm.io/package/@procore/license-check

## Dependencies (3)

- [cac](https://npm.io/package/cac.md) ^6.7.14
- [license-checker](https://npm.io/package/license-checker.md) ^25.0.1
- [@manypkg/get-packages](https://npm.io/package/@manypkg/get-packages.md) ^1.1.3

## Recent versions

- 2.1.1 (latest) — 2025-08-13
- 2.1.0 — 2025-07-21
- 2.0.1 — 2022-12-02
- 2.0.0 — 2022-10-05
- 1.0.0 — 2022-10-05

## README

# @procore/license-check

Validates that the licenses of a project do not violate Procore's software license requirements. Works for both monorepos as well as single-module projects.

## Quick Start

This package can either be installed in a project or run directly using `npx`/`pnpx`. Additionally, the package provides an API that can be invoked in code.

<details>
  <summary>Install inside of project</summary>

```bash
yarn add -D @procore/license-check # or npm, pnpm
```

Then run the command:

```bash
yarn license-check check
```

</details>

<details>
  <summary>Execute directly using npx/pnpx</summary>

```bash
npx @procore/license-check check
```

</details>

<details>
  <summary>Invoked in JavaScript code</summary>

Install in project

```bash
yarn add -D @procore/license-check # or npm, pnpm
```

Then use!

```ts
import { checkLicenses } from '@procore/license-check'

const startDir = process.cwd()
const forbiddenLicenses = ['GPL-3.0-only']

await checkLicenses(startDir, forbiddenLicenses)
```

</details>

## CLI Commands

```bash
Usage:
  $ license-check

Commands:
  check [startDir]  license check


For more info, run any command with the `--help` flag:
  $ license-check check --help
  $ license-check --help

Options:
  -h, --help     Display this message
  -v, --version  Display version number
```

## API Methods

### `checkLicenses(startDir: string, forbiddenLicenses?: Array<string>): Promise<Array<{ name: string; invalid: Array<string>}>>`

**Returns a list of each workspace in project, along with which licenses are invalid**

Parameters:

- `startDir`: `string`: the root directory of the project to evaluate.
- `forbiddenLicenses`: `Array<string>` _(defaults to Procore's forbidden licenses)_: the list of licenses that should be considered invalid.

Returns:

An array of results objects containing the following properties:

- `name`: `string`: the name of the project, as specified in its `package.json` file.
- `invalid`: `Array<string>`: the package names and versions that violated the license check.

<details>
  <summary>Example</summary>

```ts
import { checkLicenses } from '@procore/license-check'

const startDir = process.cwd()
const results = await checkLicenses(startDir)
```

</details>

### `checkLicensesCLI(startDir: string, forbiddenLicenses?: Array<string>): Promise<void>`

**Executes the license, and formats the output into an easy-to-read format.**

Parameters:

- `startDir`: `string`: the root directory of the project to evaluate.
- `forbiddenLicenses`: `Array<string>` _(defaults to Procore's forbidden licenses)_: the list of licenses that should be considered invalid.

NOTE:

- If there are invalid licenses, the output will be written to `stderr`, and program will exit with an exit code of `-1`.
- If all licenses are valid, and short message will be output to `stdout`.

<details>
  <summary>Example</summary>

```ts
import { checkLicensesCLI } from '@procore/license-check'

const startDir = process.cwd()
await checkLicensesCLI(startDir)
```

</details>

## Development

This project uses [`yarn`][yarn], and supports the following commands:

- `build`: builds and bundles the project.
- `format`: runs [`prettier`][prettier] on the project.
- `test`: runs the unit test suite, reporting coverage.
- `test:dev`: run the unit test suite in watch mode.

[prettier]: https://prettier.io/
[yarn]: https://classic.yarnpkg.com/

---
_Source: https://npm.io/package/@procore/license-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
