DEV Community

Dave Parr
Dave Parr

Posted on • Edited on • Originally published at daveparr.info

2 1

Nativefier is bonkers

I made an electron app in 4 lines...

nativefier "http://musicforprogramming.net/" -n "musicforprogramming"
cd musicforprogramming-linux-x64/
sudo chmod +x musicforprogramming
./musicforprogramming
Enter fullscreen mode Exit fullscreen mode

Motivation

I like music, but don't like music in browser tabs. Basically because i have it open all the time, I want to find and control it easily, and I don't want it cluttering up an area that might be soley focused on work.

I discovered some neat apps for google play, and wanted to see if there was one for my other go to, musicforprogramming. There wasn't, so I just casually googled how to convert a page into an electron app and OMFG!

Solution

GitHub logo nativefier / nativefier

Make any web page a desktop application

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.com'
Enter fullscreen mode Exit fullscreen mode

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.13+ / Windows / Linux
  • Node.js ≥ 16.9…

This post and this one helped iron out some kinks and now I can launch programming music right from my VS code terminal!

vs code and an electron app of musicforprogramming made with nativefier

Extra credit

alias musicforprogramming="~/Dev/musicforprogramming-linux-x64/musicforprogramming
Enter fullscreen mode Exit fullscreen mode

Billboard image

Use Playwright to test. Use Playwright to monitor.

Join Vercel, CrowdStrike, and thousands of other teams that run end-to-end monitors on Checkly's programmable monitoring platform.

Get started now!

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay