Install the CLI

The generative-icons CLI finds, installs and creates animated icons in web, iOS and Android apps. It is one binary for macOS and Linux, installed through npm: the generative-icons package is a small Node.js shim, and npm adds the binary for your machine as an optional dependency. Nothing runs at install time.

With npm#

In your app's folder, with Node.js 18 or later:

Terminal
npx generative-icons init

pnpm (pnpm dlx generative-icons init) and Bun (bunx generative-icons init) work too. To pin a version in the project, add it as a dev dependency: npm install --save-dev generative-icons. Don't install with --omit=optional or --no-optional, which leave the binary out.

Supported systems#

System Processor Binary package
macOS 11 or later Apple silicon (arm64) @lottiefiles/generative-icons-darwin-arm64
macOS 11 or later Intel (x64) @lottiefiles/generative-icons-darwin-x64
Linux with glibc 2.35 or later arm64 @lottiefiles/generative-icons-linux-arm64-gnu
Linux with glibc 2.35 or later x64 @lottiefiles/generative-icons-linux-x64-gnu
  • x64 binaries need a processor with FMA, so they don't run under Rosetta: on an Apple silicon Mac, use the arm64 build of Node.js.
  • glibc 2.35 or later means Ubuntu 22.04, Debian 12 or newer.
  • Windows is not supported yet. Use WSL 2 with Ubuntu.
  • Alpine and other musl-based Linux are not supported. Use a glibc-based image, such as node:22-bookworm-slim.

Download the binary#

Each release has a tarball per target (aarch64-apple-darwin, x86_64-apple-darwin, aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu) with the binary, its licenses and a SHA-256 checksum. On an Apple silicon Mac, for example:

Terminal
v=0.1.1; target=aarch64-apple-darwin
curl -fLO https://github.com/LottieFiles/generative-icons/releases/download/v$v/generative-icons-$v-$target.tar.gz
curl -fLO https://github.com/LottieFiles/generative-icons/releases/download/v$v/generative-icons-$v-$target.tar.gz.sha256
shasum -a 256 -c generative-icons-$v-$target.tar.gz.sha256
tar -xzf generative-icons-$v-$target.tar.gz
sudo install generative-icons-$v-$target/generative-icons /usr/local/bin/

On Linux, check with sha256sum -c. Download with curl rather than a browser: macOS quarantines browser downloads, and the binary is not notarized. To build it yourself, see the development guide.

If npx fails#

  • "…has no prebuilt binary for…": your system is not in the table above; see the notes under it.
  • "The platform package … is missing": npm skipped the optional dependency. Install again without --omit=optional. If the lockfile was made on another system, delete node_modules and the lockfile, then install again.
  • On an Apple silicon Mac, check that node -p process.arch prints arm64. An Intel Node.js running under Rosetta installs the x64 binary, which doesn't run there.

generative-icons doctor checks the binary, the processor and your app's setup. Then see Installing the packages and Create an icon.