open-index/open-npm huggingface dataset:
npm package: @gesslar/licensed
Description: CLI and library for generating license sections in README.md
Author: gesslar
Latest version: 2.0.1

# @gesslar/licensed

A simple CLI and API for generating license documentation for Node.js projects.
It reads your `package.json`, finds your license file, and outputs formatted
markdown or structured JSON listing your project license and all dependency
licenses.

## Installation

```bash
npm install -g @gesslar/licensed
```

Or as a dev dependency:

```bash
npm install --save-dev @gesslar/licensed
```

## CLI Usage

Run from your project directory:

```bash
npx @gesslar/licensed
```

The tool outputs markdown to stdout that you can add to your README. The output
includes:

- Your project's license with a link to the license file
- A table of all dependencies with their licenses and repository links

## API Usage

You can also use `licensed` programmatically. Pass a
[`FileObject`](https://github.com/gesslar/toolkit) pointing to a project's
`package.json` and get back structured JSON.

```js
import {licensed} from "@gesslar/licensed"
import {DirectoryObject} from "@gesslar/toolkit"

const cwd = new DirectoryObject("/path/to/project")
const jsonFile = cwd.getFile("package.json")
const data = await licensed(jsonFile)
```

The returned object has the following shape:

```js
{
  name: "my-package",        // package name, or null
  license: "MIT",            // SPDX license identifier, or null
  licenseFile: "LICENSE.txt", // detected license filename, or null
  publicDomain: false,       // true for Unlicense, CC0-1.0
  dependencies: [
    { name: "lodash", license: "MIT", repo: "https://github.com/lodash/lodash" },
    { name: "private-pkg", license: "Unknown", repo: null },
  ]
}
```

### Generating Markdown from the API

Use `buildLicenseSection` to turn the data into the same markdown the CLI
produces:

```js
import {licensed, buildLicenseSection} from "@gesslar/licensed"

const data = await licensed(jsonFile)
const markdown = buildLicenseSection({
  name: data.name,
  license: data.license,
  licenseFile: data.licenseFile,
  depResults: data.dependencies,
})
```

### Other Exports

- `cleanUrl(raw)` - Normalizes repository URLs (strips `git+`, `.git`,
  converts SSH/git protocols to HTTPS)
- `npmView(dep)` - Queries the npm registry for a package's license and
  repository URL
- `buildLicenseSection(options)` - Generates a markdown license section from
  structured data

## Requirements

- Node.js v24.13.0 or higher

## License

`@gesslar/licensed` is released under the [0BSD](LICENSE.txt).

This package includes or depends on third-party components under their own
licenses:

| Dependency | License |
| --- | --- |
| [@gesslar/toolkit](https://github.com/gesslar/toolkit) | 0BSD |
npm package: @gesslar/lpc-language-tmgrammar-hl
Description: TextMate grammar for LPC (Lars Pensjö C) syntax highlighting
Latest version: 1.0.1

# @gesslar/lpc-language-tmgrammar-hl

TextMate grammar for LPC (Lars Pensjö C) syntax highlighting. LPC is the programming language used in MUD (Multi-User Dungeon) game development.

Covers `.c`, `.h`, and `.lpc` file extensions.

## Installation

```bash
npm install @gesslar/lpc-language-tmgrammar-hl
```

## Usage

### Shiki (standalone)

```js
import { createHighlighter } from "shiki";
import lpcGrammar from "@gesslar/lpc-language-tmgrammar-hl";

const highlighter = await createHighlighter({
  themes: ["github-dark"],
  langs: [lpcGrammar],
});

const html = highlighter.codeToHtml(code, { lang: "lpc", theme: "github-dark" });
```

### Astro / Starlight

In `astro.config.mjs`:

```js
import lpcGrammar from "@gesslar/lpc-language-tmgrammar-hl";

export default defineConfig({
  markdown: {
    shikiConfig: {
      langs: [lpcGrammar],
    },
  },
  // Or, if using Starlight with Expressive Code:
  integrations: [
    starlight({
      expressiveCode: {
        shiki: {
          langs: [lpcGrammar],
        },
      },
    }),
  ],
});
```

### VS Code Extension

In your extension's `package.json`:

```json
{
  "contributes": {
    "grammars": [
      {
        "language": "lpc",
        "scopeName": "source.lpc",
        "path": "./node_modules/@gesslar/lpc-language-tmgrammar-hl/lpc.tmLanguage.json"
      }
    ]
  }
}
```

### Direct Import

```js
import grammar from "@gesslar/lpc-language-tmgrammar-hl/lpc.tmLanguage.json" with { type: "json" };
```

Or via the default export:

```js
import grammar from "@gesslar/lpc-language-tmgrammar-hl";
```

## License

`@gesslar/lpc-language-tmgrammar-hl` is released under the [0BSD](LICENSE.txt).
npm package: @gesslar/lpml-language-tmgrammar-hl
Description: TextMate grammar for LPML (LPC Markup Language) syntax highlighting
Latest version: 1.0.2

# @gesslar/lpml-language-tmgrammar-hl

TextMate grammar for **LPML** (LPC Markup Language) syntax highlighting. LPML is a human-friendly data serialization format designed for MUD configuration files that extends JSON5.

Covers the `.lpml` file extension.

## Installation

```bash
npm install @gesslar/lpml-language-tmgrammar-hl
```

## Usage

### Shiki (standalone)

```js
import { createHighlighter } from "shiki";
import lpml from "@gesslar/lpml-language-tmgrammar-hl";

const highlighter = await createHighlighter({
  themes: ["github-dark"],
  langs: [lpml],
});

const html = highlighter.codeToHtml(code, {
  lang: "lpml",
  theme: "github-dark",
});
```

### Astro / Starlight

In `astro.config.mjs`:

```js
import lpml from "@gesslar/lpml-language-tmgrammar-hl";

export default defineConfig({
  markdown: {
    shikiConfig: {
      langs: [lpml],
    },
  },
  // Or, if using Starlight with Expressive Code:
  integrations: [
    starlight({
      expressiveCode: {
        shiki: {
          langs: [lpml],
        },
      },
    }),
  ],
});
```

### VS Code Extension

In your extension's `package.json`:

```json
{
  "contributes": {
    "grammars": [
      {
        "language": "lpml",
        "scopeName": "source.lpml",
        "path": "./node_modules/@gesslar/lpml-language-tmgrammar-hl/lpml.tmLanguage.json"
      }
    ]
  }
}
```

### Direct import

```js
import grammar from "@gesslar/lpml-language-tmgrammar-hl/lpml.tmLanguage.json" with { type: "json" };
```

## Documentation

<https://spec.gesslar.dev/lpml>

## License

`@gesslar/lpml-language-tmgrammar-hl` is released under the [0BSD](LICENSE.txt).