Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
/ nativefier Public archive

Make any web page a desktop application

License

Notifications You must be signed in to change notification settings

nativefier/nativefier

Repository files navigation

Note: Nativefier is unmaintained, please see#1577.

Nativefier

Example of Nativefier app in the macOS dock

You want to make a native-looking wrapper for WhatsApp Web (or any web page).

nativefier'web.whatsapp'

Walkthrough animation

You're done.

Introduction

Nativefier is a command-line tool to easily create a “desktop app” for any web site with minimal fuss. Apps are wrapped byElectron (which uses Chromium under the hood) in an OS executable (.app,.exe,etc) usable on Windows, macOS and Linux.

I built this because I grew tired of having to Alt-Tab to my browser and then search through numerous open tabs when using Messenger or Whatsapp Web (HN thread). Nativefier features:

  • Automatically retrieval of app icon / name
  • Injection of custom JS & CSS
  • Many more, see theAPI docsornativefier --help

Installation

Install Nativefier globally withnpm install -g nativefier.Requirements:

  • macOS 10.13+ / Windows / Linux
  • Node.js≥ 16.9 and npm ≥ 7.10

Optional dependencies:

  • ImageMagickorGraphicsMagickto convert icons. Be sureconvert+identifyorgmare in your$PATH.
  • Wineto build Windows apps from non-Windows platforms. Be surewineis in your$PATH.
Or install with Docker (click to expand)
  • Pull the image fromDocker Hub:docker pull nativefier/nativefier
  • ... or build it yourself:docker build -t local/nativefier. (in this case, replacenativefier/in the below examples withlocal/)

By default,nativefier --helpwill be executed. To build e.g. a Gmail app into~/nativefier-apps,

docker run --rm -v~/nativefier-apps:/target/ nativefier/nativefier https://mail.google / /target/

You can pass Nativefier flags, and mount volumes to pass local files. E.g. to use an icon,

docker run --rm -v~/my-icons-folder/:/src -v$TARGET-PATH:/target nativefier/nativefier --icon /src/icon.png --name whatsApp -p linux -a x64 https://web.whatsapp / /target/
Or install with Snap & AUR (click to expand)

These repos arenotmanaged by Nativefier maintainers; use at your own risk. If using them, for your security, please inspect the build script.

Usage

To create an app for medium, simplynativefier 'medium '

Nativefier will try to determine the app name, and well as other options that you can override. For example, to override the name,nativefier --name 'My Medium App' 'medium '

Read theAPI docsor runnativefier --help to learn about command-line flags and configure your app.

Troubleshooting

SeeCATALOG.mdfor site-specific ideas & workarounds contributed by the community.

If this doesn’t help, go look at ourissue tracker.

Development

Help welcome onbugsand feature requests!

Docs:Developer / build / hacking,API / flags, Changelog.

License:MIT.