# HTML.now CLI

Official command-line client for [HTML.now](https://html.now). See the [conversion API documentation](https://html.now/api).

## Install

```bash
npm install --global html-now-cli
```

Requires Node.js 18 or newer and a HTML.now account with an API key and conversion credits.

## Authenticate

Create an API key at [html.now/dashboard/api-access](https://html.now/dashboard/api-access), then save it locally:

```bash
html-now login htmlnow_your_key_here
```

The key is stored in `~/.config/html-now/config.json` with user-only permissions. For CI, set `HTMLNOW_API_KEY` instead of saving a key. Never commit the key.

## Convert

Find converter slugs in the [API documentation](https://html.now/api), then run:

```bash
html-now convert page.html --slug html-to-pdf --output page.pdf
html-now convert page.html --slug html-to-png --output page.png
```

The CLI queues the job, waits for completion, and downloads the result. Use `--no-wait` to return the job immediately, then check it later:

```bash
html-now status JOB_ID --json
html-now usage --json
```

Run `html-now --help` for all options.
