How to Use ChatGPT as a Standalone Mac App with Nativefier

Here’s an easy way to get ChatGPT as a standalone app. Complete with a mac .icns icon, covering all sizes ✨

ChatGPT is my new personal assistant these days. I use it for code, inspiration, chores and much more, constantly cycling between chat.openai.com and sites in other tabs.

Or, I might be working in another app, with no browser open at all. And then, to summon the robot, now I have to open a whole browser and stuff. Ugh.

Just lemme do ⌘ + Space and type “ChatGPT” from the Alfred launch bar already!

What if I could just have ChatGPT running as a standalone Mac app? 🤔

Enter nativefier — a Node.js utility to package any URL into an Electron app, that runs like any ole regular Mac app. Neat!

It works like this:

nativefier https://myapp.com

Boom, you now have an executable .app ready to open.

Nativefier comes with a ton of build-time options you can use to control how the app should run, once built. Check out the API docs on GitHub.

Build ChatGPT as a standalone app

Please note: The following assumes you already have Node.js installed on your Mac. If not, start by installing from nodejs.org, or with Homebrew.

To build your own ChatGPT.app, here’s what you need to do:

  1. Install nativefier: npm install -g nativefier (and, optionally, dependencies as described in the docs)
  2. Download this Mac app icon I made — it’s a complete .icns file, containing all sizes necessary to look good in any size:
    ChatGPT Mac app icon. Click to download in .icns format. ChatGPT Mac app icon (.icns) (214 KB)
  3. Move the icon to your Home directory (the folder with your login name)
  4. Open Terminal.app on your Mac and run the following command:
cd && nativefier --lang "en-US" --darwin-dark-mode-support --name "ChatGPT" --conceal --single-instance --disable-dev-tools --fast-quit --user-agent chrome --title-bar-style hidden --icon "chatgpt.icns" https://chat.openai.com/ /Applications/

Breaking it down

(Naturally, I asked the robot to explain this command:)

This command might look intimidating at first, but don’t worry! We’ll break down each option in the command so you can understand what’s happening.

  1. cd: This command changes the current directory to your home directory.
  2. &&: This symbol allows you to chain multiple commands together, executing them one after the other. In this case, the cd command will be executed first, followed by the nativefier command.
  3. nativefier: This is the main command, telling your computer to use Nativefier to create a desktop application.
  4. --lang "en-US": This option sets the language of the application to English (United States). You can replace “en-US” with your preferred language code.
  5. --darwin-dark-mode-support: This option enables dark mode support for the app on macOS (also known as Darwin).
  6. --name "ChatGPT": This option sets the name of the application to “ChatGPT”. You can replace “ChatGPT” with your desired app name.
  7. --conceal: This option conceals the source code of the app, making it harder for others to inspect or modify.
  8. --single-instance: This option ensures that only one instance of the app can run at a time.
  9. --disable-dev-tools: This option disables the developer tools, preventing users from accessing them within the app.
  10. --fast-quit: This option allows the app to quit immediately when closed, without any prompts or delays.
  11. --user-agent chrome: This option sets the user agent of the app to Chrome, making the website think it’s being accessed from a Chrome browser.
  12. --title-bar-style hidden: This option hides the title bar of the app, providing a cleaner appearance.
  13. --icon "chatgpt.icns": This option sets the app’s icon to “chatgpt.icns”. Replace “chatgpt.icns” with the file path of your desired icon.
  14. https://chat.openai.com/: This is the URL of the website you want to turn into a standalone app.
  15. /Applications/: This is the destination folder where your app will be saved. In this case, it will be saved in your Applications folder.

Updating/upgrading the app

After some time, you may get a warning from your ChatGPT.app, about the app being “built on an older version of Electron / Nativefier”.

A nativefier app is essentially “frozen in time”

Unlike your regular browser, which updates automatically, your ChatGPT.app does not auto-update its underlying software. Hence, the inevitable “older version..”-warning.

Remove the warning by re-building your ChatGPT.app — a manual software update, basically.

It’s easy, too:

To upgrade your nativefier app, re-build it. Then, move this new .app file to your /Applications folder, replacing the existing ChatGPT.app.

Upgrade (re-build) your ChatGPT.app

Here’s how to re-build your ChatGPT.app, without losing your settings and preferences:

  1. Repeat the process you did when building the app (after you installed nativefier itself):
  2. Make sure you still have the icon file (.icns) on your system (or you can download the ChatGPT icon again)
  3. Copy the command above into your Terminal
  4. Open Finder and go to your /Applications folder
  5. Find the ChatGPT folder (which contains the output of your command)
  6. Move the ChatGPT.app from this folder, directly into your /Applications folder
  7. Select ‘Replace‘ when prompted about an existing version of ChatGPT.app

Existing app data (cookies, in particular!), are left untouched, and so you’ll remain signed in to your ChatGPT.app ✨

casperk

About Casper Klenz-Kitenge

I live in Copenhagen, Denmark with my wife and our two kids. My day-to-day is about finding solutions to real problems, making my work matter by helping people achieve their goals. You should sign up for my newsletter to get a fresh perspective on work.