# CLI Reference

Command-line interface for Marked.

## Installation

```bash
npm install -g marked
```

## Basic Usage

```bash
# Parse from stdin
echo "# Hello" | marked

# Parse file
marked input.md -o output.html

# Parse with options
marked input.md --gfm --breaks

# Multiple files
marked file1.md file2.md --output-dir dist/
```

## Options

- `-o, --output <file>`: Write output to file
- `--gfm`: Enable GitHub Flavored Markdown
- `--breaks`: Enable GFM line breaks
- `--pedantic`: Enable pedantic mode
- `--silent`: Silence errors
- `-h, --help`: Display help
- `-v, --version`: Display version

## Examples

```bash
# Convert README to HTML
marked README.md -o README.html --gfm

# Process all markdown files
find docs -name '*.md' -exec marked {} \;

# Pipe to other tools
marked input.md | htmlmin > output.min.html
```
