2015-07-05 07:24:36 +00:00
|
|
|
|
# Nativefier
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
2021-05-21 22:16:59 +00:00
|
|
|
|
![Example of Nativefier app in the macOS dock](.github/dock-screenshot.png)
|
2015-07-06 05:44:49 +00:00
|
|
|
|
|
2022-01-06 19:21:16 +00:00
|
|
|
|
You want to make a native-looking wrapper for WhatsApp Web (or any web page).
|
2016-01-19 14:02:01 +00:00
|
|
|
|
|
|
|
|
|
```bash
|
2021-04-27 22:12:02 +00:00
|
|
|
|
nativefier 'web.whatsapp.com'
|
2016-01-19 14:02:01 +00:00
|
|
|
|
```
|
|
|
|
|
|
2021-05-21 22:16:59 +00:00
|
|
|
|
![Walkthrough animation](.github/nativefier-walkthrough.gif)
|
2016-03-27 03:36:04 +00:00
|
|
|
|
|
2016-01-19 14:02:01 +00:00
|
|
|
|
You're done.
|
2015-07-05 07:24:36 +00:00
|
|
|
|
|
2016-01-19 14:02:01 +00:00
|
|
|
|
## Introduction
|
2015-07-05 07:24:36 +00:00
|
|
|
|
|
2022-01-06 19:33:49 +00:00
|
|
|
|
Nativefier is a command-line tool to easily create a “desktop app” for any web site
|
2022-01-06 19:18:22 +00:00
|
|
|
|
with minimal fuss. Apps are wrapped by [Electron](https://www.electronjs.org/)
|
2020-07-18 14:19:58 +00:00
|
|
|
|
(which uses Chromium under the hood) in an OS executable (`.app`, `.exe`, etc)
|
2022-01-06 19:18:22 +00:00
|
|
|
|
usable on Windows, macOS and Linux.
|
2015-07-05 08:43:44 +00:00
|
|
|
|
|
2022-01-06 19:32:43 +00:00
|
|
|
|
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](https://news.ycombinator.com/item?id=10930718)). Nativefier features:
|
2016-01-29 17:57:30 +00:00
|
|
|
|
|
2022-01-06 19:18:22 +00:00
|
|
|
|
- Automatically retrieval of app icon / name
|
|
|
|
|
- Injection of custom JS & CSS
|
2021-05-21 22:16:59 +00:00
|
|
|
|
- Many more, see the [API docs](API.md) or `nativefier --help`
|
2016-01-29 03:37:54 +00:00
|
|
|
|
|
2015-07-05 07:24:36 +00:00
|
|
|
|
## Installation
|
|
|
|
|
|
2022-01-06 19:18:22 +00:00
|
|
|
|
Install Nativefier globally with `npm install -g nativefier` . Requirements:
|
|
|
|
|
|
2022-04-26 23:40:16 +00:00
|
|
|
|
- macOS 10.10+ / Windows / Linux
|
2022-01-06 19:18:22 +00:00
|
|
|
|
- [Node.js](https://nodejs.org/) ≥ 12.9 and npm ≥ 6.9
|
|
|
|
|
|
|
|
|
|
Optional dependencies:
|
2016-01-22 04:31:30 +00:00
|
|
|
|
|
2022-01-06 19:18:22 +00:00
|
|
|
|
- [ImageMagick](http://www.imagemagick.org/) or [GraphicsMagick](http://www.graphicsmagick.org/) to convert icons.
|
|
|
|
|
Be sure `convert` + `identify` or `gm` are in your `$PATH`.
|
|
|
|
|
- [Wine](https://www.winehq.org/) to build Windows apps from non-Windows platforms.
|
|
|
|
|
Be sure `wine` is in your `$PATH`.
|
2016-01-28 03:38:58 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
<details>
|
2022-05-30 13:52:47 +00:00
|
|
|
|
<summary>Or install with Docker (click to expand)</summary>
|
2016-01-28 03:38:58 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
- Pull the image from [Docker Hub](https://hub.docker.com/r/nativefier/nativefier): `docker pull nativefier/nativefier`
|
|
|
|
|
- ... or build it yourself: `docker build -t local/nativefier .`
|
|
|
|
|
(in this case, replace `nativefier/` in the below examples with `local/`)
|
2016-01-28 03:38:58 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
By default, `nativefier --help` will be executed.
|
|
|
|
|
To build e.g. a Gmail app into `~/nativefier-apps`,
|
2016-03-09 06:24:00 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
```bash
|
|
|
|
|
docker run --rm -v ~/nativefier-apps:/target/ nativefier/nativefier https://mail.google.com/ /target/
|
|
|
|
|
```
|
2016-01-18 17:17:27 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
You can pass Nativefier flags, and mount volumes to pass local files. E.g. to use an icon,
|
2021-05-03 17:08:32 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
```bash
|
|
|
|
|
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/
|
|
|
|
|
```
|
|
|
|
|
</details>
|
2021-05-03 17:08:32 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
<details>
|
2022-05-30 13:52:47 +00:00
|
|
|
|
<summary>Or install with Snap & AUR (click to expand)</summary>
|
2020-08-11 01:33:32 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
These repos are *not* managed by Nativefier maintainers; use at your own risk.
|
|
|
|
|
If using them, for your security, please inspect the build script.
|
2022-01-06 19:09:15 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
- [Snap](https://snapcraft.io/nativefier)
|
|
|
|
|
- [AUR](https://aur.archlinux.org/packages/nodejs-nativefier)
|
|
|
|
|
</details>
|
2020-08-11 01:33:32 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
## Usage
|
2020-08-11 01:33:32 +00:00
|
|
|
|
|
2022-05-30 16:26:05 +00:00
|
|
|
|
To create an app for medium.com, simply `nativefier 'medium.com'`
|
2020-08-11 01:33:32 +00:00
|
|
|
|
|
2022-05-30 16:26:05 +00:00
|
|
|
|
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.com'`
|
2020-08-11 01:33:32 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
**Read the [API docs](API.md) or run `nativefier --help`**
|
2022-05-30 16:26:05 +00:00
|
|
|
|
to learn about command-line flags and configure your app.
|
2022-01-31 21:33:53 +00:00
|
|
|
|
|
2022-05-30 13:51:43 +00:00
|
|
|
|
## Troubleshooting
|
2022-01-31 21:33:53 +00:00
|
|
|
|
|
2022-05-30 14:18:34 +00:00
|
|
|
|
**See [CATALOG.md](CATALOG.md) for site-specific ideas & workarounds contributed by the community**.
|
|
|
|
|
|
|
|
|
|
If this doesn’t help, go look at our [issue tracker](https://github.com/nativefier/nativefier/issues).
|
2022-01-31 21:33:53 +00:00
|
|
|
|
|
2016-03-13 07:27:32 +00:00
|
|
|
|
## Development
|
2016-03-10 18:27:49 +00:00
|
|
|
|
|
2021-01-30 04:49:52 +00:00
|
|
|
|
Help welcome on [bugs](https://github.com/nativefier/nativefier/issues?q=is%3Aopen+is%3Aissue+label%3Abug) and
|
2022-01-06 19:09:15 +00:00
|
|
|
|
[feature requests](https://github.com/nativefier/nativefier/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request)!
|
2017-05-19 13:21:16 +00:00
|
|
|
|
|
2022-01-06 19:18:22 +00:00
|
|
|
|
Docs: [Developer / build / hacking](HACKING.md), [API / flags](API.md),
|
2020-07-18 14:19:58 +00:00
|
|
|
|
[Changelog](CHANGELOG.md).
|
2017-05-19 13:21:16 +00:00
|
|
|
|
|
2022-05-30 13:50:28 +00:00
|
|
|
|
License: [MIT](LICENSE.md).
|