You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Ronan Jouchet 4c6d0b185b Update changelog for `v47.1.3` 2 weeks ago
.github Publish: fix Docker build failing because of Playwright, and make a convenience npm task for it 2 weeks ago
app Relock dependencies 2 weeks ago
icon-scripts Fix icon conversion scripts broken on recent macOS (fix #1277) 6 months ago
shared macOS: universal architecture app support (fix #1384, PR #1386) 4 weeks ago
src Bump default Electron to 18.2.0, from 18.0.3 2 weeks ago
.dockerignore Docker: slim down image size, by removing temp/cache files (PR #1128) 1 year ago
.editorconfig Integrate prettier 4 years ago
.env Add playwright integration testing to the app (PR #1397) 4 weeks ago
.gitignore Add playwright integration testing to the app (PR #1397) 4 weeks ago
.npmignore Actually actually (TM) include lockfile in npm artifacts 8 months ago
.npmrc Actually actually (TM) include lockfile in npm artifacts 8 months ago
API.md macOS: universal architecture app support (fix #1384, PR #1386) 4 weeks ago
CATALOG.md CATALOG.md: move new "general recipes" section where it belongs, and cleanup 2 weeks ago
CHANGELOG.md Update changelog for `v47.1.3` 2 weeks ago
Dockerfile Publish: fix Docker build failing because of Playwright, and make a convenience npm task for it 2 weeks ago
HACKING.md HACKING.md: triage guidelines (PR #1338) 4 months ago
LICENSE.md Split docs into multiple files 6 years ago
README.md Bump minimum macOS version from 10.9 to 10.10 (see #1404) 3 weeks ago
base-eslintrc.js Make app strict TypeScript + linting (and add a shared project) (#1231) 11 months ago
npm-shrinkwrap.json Revert "Major-bump jest to 28": breaks tsc in weird ways, will retry later. 2 weeks ago
package.json Update changelog for `v47.1.3` 2 weeks ago
tsconfig-base.json Make app strict TypeScript + linting (and add a shared project) (#1231) 11 months ago

README.md

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.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.10+ / 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 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 docs or run nativefier --help to learn about command-line flags usable to configure your app.

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

Catalog

See CATALOG.md for build commands & workarounds contributed by the community.

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/

Unofficial repositories

Nativefier is also available in various user-contributed software repos. These are not managed by Nativefier maintainers; use at your own risk. If using them, for your security, please inspect the build script.

Development

Help welcome on bugs and feature requests!

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

License

MIT.

Troubleshooting

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

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.md + existing issues.

Videos won't play

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

First, try --widevine. If still broken, see CATALOG.md + existing issues.

Settings cached between app rebuilds

This can occur because app cache lives separate from the app.

Try delete your app's cache, which is found at <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)