open-index/open-npm huggingface dataset:
npm package: @slackfmt/cli
Description: CLI tool to convert text and copy it to your clipboard as Slack-ready rich text.
Latest version: 0.2.4

# @slackfmt/cli

CLI tool to convert text and copy it to your clipboard as Slack-ready rich text.

Reads from stdin, converts to Slack's native Quill Delta format, and writes it to your clipboard. When you paste into Slack's compose bar, all formatting (bold, italic, code blocks, lists, links, etc.) is preserved.

## Install

```bash
npm install -g @slackfmt/cli
```

## Usage

```bash
echo "**bold**" | slackfmt -f markdown
cat doc.md | slackfmt
slackfmt -f html < page.html
```

## Options

```
--format, -f   Input format: markdown, html, slack-html (default: auto-detect)
--stdout       Output Quill Delta JSON to stdout instead of clipboard
--help         Show help
```
npm package: @slackfmt/clipboard-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `@slackfmt/clipboard`
Latest version: 0.1.0

# `@slackfmt/clipboard-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@slackfmt/clipboard`
npm package: @slackfmt/clipboard-win32-x64-msvc
Description: This is the **x86_64-pc-windows-msvc** binary for `@slackfmt/clipboard`
Latest version: 0.1.0

# `@slackfmt/clipboard-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@slackfmt/clipboard`
npm package: @slackfmt/core
Description: Convert Markdown, HTML, and other formats to Slack's Quill Delta format — the native rich text format Slack uses internally. The output preserves formatting (bold, italic, code blocks, lists, links, etc.) when pasted into Slack's compose bar.
Latest version: 0.3.2

# @slackfmt/core

Convert Markdown, HTML, and other formats to Slack's Quill Delta format — the native rich text format Slack uses internally. The output preserves formatting (bold, italic, code blocks, lists, links, etc.) when pasted into Slack's compose bar.

## Install

```bash
npm install @slackfmt/core
```

## Usage

```typescript
import { convert } from "@slackfmt/core";

// Auto-detect input format — result is Slack-ready Quill Delta JSON
const delta = await convert("**bold** and _italic_");

// Specify format explicitly
const delta = await convert("<b>bold</b>", { format: "html" });
```

## Supported formats

- `markdown` — GitHub-flavored Markdown
- `html` — Generic HTML
- `slack-html` — Slack's clipboard HTML format

## API

### `convert(input, options?)`

Converts input text to Slack Quill Delta JSON string. Auto-detects format unless `options.format` is specified.

### `htmlToMarkdown(html)`

Converts HTML to normalized Markdown.

### `slackHtmlToMarkdown(html)`

Converts Slack's HTML clipboard format to Markdown.

### `quillDeltaToMarkdown(delta)`

Converts Quill Delta JSON to Markdown.

### `markdownToDelta(markdown)`

Converts Markdown to Slack Quill Delta JSON string.

### `normalizeMarkdown(markdown)`

Normalizes Markdown through a parse/serialize round-trip.