# Installation

<PackageManagers pkg="sfn-diagram" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />

The core package pulls in **no browser engine or native rasterizer** — SVG and Mermaid generation stay lightweight. PNG export uses `@resvg/resvg-js`, a native, browser-free rasterizer, provided by an optional peer dependency. Install it only if you use `sfn-diagram/png`:

<PackageManagers pkg="sfn-diagram @resvg/resvg-js" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />

## Deno / JSR

<PackageManagers pkgManagers={['deno']} pkg="jsr:@yusufaf/sfn-diagram" />

## CLI without Node

Every release ships standalone executables for Linux, macOS, and Windows, so the
command line works without installing Node.js:

```bash
brew install yusufaf/tap/sfn-diagram
```

Or download a binary from the [releases page](https://github.com/yusufaf/sfn-diagram/releases)
and put it on your `PATH`. The binaries render SVG, Mermaid, and HTML; PNG export needs the
native rasterizer, so use the [Docker image](/guides/cli/#docker) or the npm package with
`@resvg/resvg-js` for that. See
[Use from Python, Go, Java, and other languages](/guides/other-languages/) for details
and subprocess examples.