Transcript
00:00:00This is Paik, a command line tool that turns any website into a native desktop app with a single
00:00:05command. It's built with Rust, so the apps it produces can be around 5MB, which is tiny compared
00:00:10to Electron, which bundles an entire copy of Chrome in every app. You can even inject custom
00:00:15CSS and JavaScript, have a tray icon, and change the title bar style, all without writing a single
00:00:20line of Rust. But why would I use this over the other similar tools out there, and why does Paik
00:00:25require me to have PNPM or NPM installed if it's built on Rust? I kind of don't want to know,
00:00:31but here's subscribe and let's find out. Paik was created in 2022 by TW93, a product engineer
00:00:40from China, who also created Mole, the insanely popular Mac optimization tool, which I've actually
00:00:45been using for a while. But the idea for Paik makes a lot of sense, because if you think about it,
00:00:49apps like YouTube Music, Gmail, and Instagram don't have their own official native apps. They only live
00:00:55inside browser tabs, which is fine if you want all that browser functionality, but if you want a more
00:00:59performance website with its own dock icon for separation reasons, then having a standalone app
00:01:04for it can be very useful. This is where Paik comes in, which is much better than Electron,
00:01:09because it's built on top of Towery 2, which taps into the system's native web view, making apps
00:01:14smaller, faster, and they use less memory, similar to how Electro, Bun, or Vercel's Zero Native works,
00:01:19which I'll talk about more a bit later in this video. But the actual custom code written by TW93 on top of
00:01:24Towery 2 is about 1800 lines of rust and handles things like window management, native menus,
00:01:30and JavaScript injection. You just run one command and Paik takes care of everything. In fact,
00:01:35let's try and use Paik to turn my film emulation project into a standalone app. So after installing
00:01:40the Paik CLI, you'll notice it looks very similar to Mole if you ever used Mole, and it doesn't have
00:01:45a lot of flags, which is a good thing in my opinion. So with my project server running, I can run Paik with
00:01:50the URL and the name I want to call the app. So now if I enter, it fetches the icon and goes through the
00:01:55process of creating the app, which can take around five to 10 minutes. And once it's done, it creates
00:02:00this DNG, which we can find over here at 4.3 megabytes. And if you click on it, here is our app,
00:02:05we could install by dragging it into applications. Now it looks like it didn't get the icon, but that's
00:02:10fine. And now if we open our app, we can see it works immediately with the icon in the dock.
00:02:14I can select a video and everything seems to work fine. And if we look at the activity monitor,
00:02:19we can see our app only uses 61 megabytes of memory compared to the ARC browser, which is using loads.
00:02:24And if we take a look at the application size, it's 55 megabytes compared to an electron app like Slack,
00:02:30which is 310 megabytes. But as you saw earlier, Paik does have some pretty interesting options. For
00:02:35example, I can build the same app with the debug flag to give me access to dev tools. And I can edit
00:02:40the status bar to make it feel more app-like by using the hide title bar flag, which gives it a
00:02:46frameless title bar. But this app clearly wasn't designed to be frameless. But luckily, Paik gives
00:02:51us an option to fix that without editing the app's source code. I could write some custom CSS and inject
00:02:56it into my app using the inject flag, which has added the padding to the top, but also means there's
00:03:01more space at the bottom to scroll to. We can use the show system tray flag, revealing an icon in the
00:03:06system tray, allowing us to show and hide our app. And we can even inject JavaScript as well as CSS.
00:03:12But right now, it seems as though you can't edit the menu items that are given to you by default from
00:03:17Paik. And Paik only works with running URLs. So if I close down my server and then try to open the app,
00:03:23it just shows me a blank screen. But to be fair, Paik wasn't designed for local apps. I actually tested
00:03:28a YouTube music app, which works surprisingly well from running one command. And it even works offline
00:03:33because that's how the YouTube music site works. So I've been using it as my main music player,
00:03:38but it's basically not the tool for desktop apps you've got yourself since Paik wraps around a live
00:03:42URL and doesn't bundle your code unless you use the use local file option, which I only found out about
00:03:48after creating this video. I also wouldn't say it's very well built. Hear me out. So I installed Paik
00:03:53using BUN instead of PNPM or NPM, but it needs one of those internally to set up the Tauri build.
00:04:00And my PNPM was newer than the PNPM version it required, which means it refused to build and
00:04:05install an app I wanted. So I had to use Claude code to edit Paik's source code just to get it to work.
00:04:11I did end up finding an issue for it, but this could have all been resolved if Paik shipped with a
00:04:15compiled binary, which is an advantage of using something like ElectroBUN or ZeroNative,
00:04:20because ElectroBUN gives you a real BUN runtime behind a web view, meaning you can run back in
00:04:25logic and ZeroNative goes even further, giving you a full zig shell that can call C libraries directly.
00:04:31So Paik is the fastest way to wrap a live website, but if you need anything beyond that,
00:04:36it's best to reach for something else.
Community Posts
No posts yet. Be the first to write about this video!
Write about this video