Go to file
Ronan Jouchet 8a8a5dd2cc README: more more nits 2022-01-06 14:20:41 -05:00
.github CI: (Attempt to) push tag, not unreadable SHA 2022-01-06 10:50:00 -05:00
app Bump default Electron from 16.0.5 to 16.0.6 2022-01-06 09:43:10 -05:00
icon-scripts Fix icon conversion scripts broken on recent macOS (fix #1277) 2021-11-22 16:18:02 -05:00
shared Fix upgrade not working (#1286) 2021-11-29 12:01:20 -05:00
src Bump default Electron from 16.0.5 to 16.0.6 2022-01-06 09:43:10 -05:00
.dockerignore Docker: slim down image size, by removing temp/cache files (PR #1128) 2021-03-10 18:54:33 -05:00
.editorconfig Integrate prettier 2018-05-24 00:02:44 -07:00
.gitignore Actually actually (TM) include lockfile in npm artifacts 2021-09-24 22:44:07 -04:00
.npmignore Actually actually (TM) include lockfile in npm artifacts 2021-09-24 22:44:07 -04:00
.npmrc Actually actually (TM) include lockfile in npm artifacts 2021-09-24 22:44:07 -04:00
API.md Internal login pages: add (id|auth).atlassian.com (fix #1265) 2021-07-28 23:22:02 -04:00
CATALOG.md Docs: link to Docker Hub repo, lighten README and move some stuff to CATALOG 2022-01-06 14:09:15 -05:00
CHANGELOG.md Update changelog for `v46.0.4` 2022-01-06 10:50:42 -05:00
Dockerfile Docker: fix build 2021-03-10 20:06:39 -05:00
HACKING.md HACKING.md: Document one more place to look when major-upgrading Electron 2021-10-04 09:32:52 -04:00
LICENSE.md Split docs into multiple files 2016-03-13 15:27:32 +08:00
README.md README: more more nits 2022-01-06 14:20:41 -05:00
base-eslintrc.js Make app strict TypeScript + linting (and add a shared project) (#1231) 2021-06-26 09:59:28 -04:00
npm-shrinkwrap.json Bump default Electron from 16.0.5 to 16.0.6 2022-01-06 09:43:10 -05:00
package.json Update changelog for `v46.0.4` 2022-01-06 10:50:42 -05:00
tsconfig-base.json Make app strict TypeScript + linting (and add a shared project) (#1231) 2021-06-26 09:59:28 -04:00

README.md

Nativefier

Example of Nativefier app in the macOS dock

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

nativefier 'web.whatsapp.com'

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 by Electron (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 the API docs or nativefier --help

Installation

Install Nativefier globally with npm install -g nativefier . Requirements:

  • macOS 10.9+ / Windows / Linux
  • Node.js ≥ 12.9 and npm ≥ 6.9

Optional dependencies:

  • ImageMagick or GraphicsMagick to convert icons. Be sure convert + identify or gm are in your $PATH.
  • Wine to build Windows apps from non-Windows platforms. Be sure wine is in your $PATH.

Usage

To create a native desktop app for medium.com, simply nativefier "medium.com"

Nativefier will try to determine the app name, and well as lots of other options. If desired, these options can be overwritten. For example, to override the name, nativefier --name 'My Medium App' 'medium.com'

Read the API documentation or run nativefier --help to learn about other command-line flags usable to configure the packaged app.

To have high-resolution icons used by default for an app/domain, please contribute to the icon repository!

Catalog

For a list of build commands contributed by the Nativefier community, see CATALOG.md file.

Docker

Nativefier is also usable from Docker:

  • Pull the image from Docker Hub: docker pull nativefier/nativefier
  • ... or build it yourself: docker build -t local/nativefier . (in this case, replace nativefier/ in the below examples with local/)

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

docker run --rm -v ~/nativefier-apps:/target/ nativefier/nativefier https://mail.google.com/ /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.com/ /target/

Development

Help welcome on bugs and feature requests!

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

License

MIT.

Troubleshooting

Generally, see Catalog for ideas & workarounds, and search in existing issues.

Site says I use an old/unsupported browser

Some sites intentionally block Nativefier (or similar) apps, e.g. Google and WhatsApp.

First, try setting the --user-agent to firefox or safari.

If still broken, see Catalog for ideas & workarounds, and search in existing issues.

Videos won't play

This issue comes up for certain sites like HBO Max and Udemy.

First, try our --widevine flag.

If still broken, see Catalog for ideas & workarounds, and search in existing issues.

Settings cached between app rebuilds

This issue can occur because the cache of the app and the app itself are kept separate by default. You can try clearing out the cache.

Try delete your app's cache, which can be found in <your_app_name_lower_case>-nativefier-<random_id> in your OS's "App Data" directory (for Linux: $XDG_CONFIG_HOME or ~/.config , for MacOS: ~/Library/Application Support/ , for Windows: %APPDATA% or C:\Users\yourprofile\AppData\Roaming)