Bliss banner

Bliss

14 devlogs
21h 17m 4s

Bliss is a truly effective website and app blocker for MacOS. It operates on a timer system and makes disabling the block very tedious and annoying, hopefully incentivizing people to not remove the block.

Demo Repository

Loading README...

Zain Marshall

First, I want to say thank you everyone for the incredible votes! I’m very grateful that people liked this project :)

Now two things I observed from the feedback:

  1. A GUI would be nice
  2. Linux support would be nice

So of those two linux support is probably the more difficult one given that my software is pretty nicely integrated with MacOS, so what I think I’ll do is polish up the MacOS version and then given all that I have already done port it to Linux. This would involve changing a bit of the code, but not that much.

I started working on the GUI:

  1. (almost) every CLI command is now in the GUI, you can start, you can panic, and you can config
  2. The GUI is made using Swift so its super fast and just MacOS native, and the menubar was already native.
  3. The way it works is like the GUI is essentially just running CLI commands because like that was the easiest way to make it, I already spent a long time making the CLI commands so nice, so I added a few more for the GUI to use and then yeah thats how it works
  4. I made a UI for the typing test, and I do say this is an improvement over the CLI version and I do see how a GUI will positively benefit bliss.

Note the UI is very buggy and sometimes just desyncs with the CLI version and idk why so um yeah this update may take a while to get fully finished. Anyways, thanks again for all the support!

0
AVD

Tagged your project as well cooked!

🔥 AVD marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

Zain Marshall

Ok so this devlog addresses the feedback given in my ship of this project. Also note:
When you’re demoing it, you have to type in the right url, youtube.com is not the full thing its www.youtube.com, but now the code should auto handle that but just in case.

Changelog

  • Added configurable browser close list (bliss config browser add/remove/list)
  • Browsers now close and automatically reopen on session start to reset connections
  • When adding a website (eg youtube.com auto add both youtube.com and www.youtube.com)
  • Added bliss repair to restart the root helper and clear stale state
  • Added config ownership auto‑repair via root helper
  • Fixed session “already running” mismatch between CLI and root helper
  • Added PF state drop for HTTP/HTTPS to reset active connections
  • Improved installer quickstart + added unsaved work warning
  • Updated README with new commands and warnings
Attachment
0
Zain Marshall

Shipped this project!

Hours: 13.75
Cookies: 🍪 359
Multiplier: 26.08 cookies/hr

Hope you enjoy my project and find it useful!

Bliss

Bliss is a macOS focus lock that blocks websites and force‑closes blocked apps. It runs a background timer, shows a menubar countdown, and makes you solve a typing challenge to escape early. It is fully configurable, from the blocked apps and websites, to the length of the quotes in the typing challenge.

MACOS Only. To all Windows and Linux users of Flavortown, please watch the video demo in the GitHub readme or release notes!

What it does

  • Blocks websites via /etc/hosts + pf firewall table
  • Force‑closes blocked apps during a session
  • Runs a background timer (blissd) so the lock survives terminal close or reboot
  • Menubar timer (always‑on status)
  • Panic mode typing challenge

Quick start

  • Install using this command
curl -fsSL https://github.com/zainmarshall/bliss/releases/download/v0.1.0/bliss-macos-universal.zip -o /tmp/bliss.zip && \

 rm -rf /tmp/bliss && mkdir -p /tmp/bliss && \

 unzip -q /tmp/bliss.zip -d /tmp/bliss && \

 bash /tmp/bliss/bliss_release/scripts/install.sh
  • bliss config website add <domain>
    NOTE: Bliss comes with nothing configured by default, like no apps and websites blocked, so if you start it from the start it’ll block nothing and throw an error. Make sure you configure it.
  • bliss config app add (This will open a menu for you to select apps)
  • bliss start <minutes>

Commands

  • bliss start - Starts a timer for minutes
  • bliss panic - Escape a block early by completing a typing challenge.
  • bliss status - Status of the timer and pf table
  • bliss uninstall - Uninstalls everything. Must run with sudo. Requires a typing challenge.
  • bliss config website add/remove - Add or remove websites from block
  • bliss config website list - list blocked websites
  • bliss config app add/remove - Opens a menu to select apps to add / remove from the block
  • bliss config app list - list blocked apps
  • bliss config quotes short/medium/long/huge - Configure the length of quotes used in the typing challenges.

Devlogs

Learn more about how Bliss works by reading all the devlogs I wrote below!

Hope you guys enjoy!

Zain Marshall

Ok I said the last one would be the last, but there were so many bugs that I fixed. Error messages weren’t working, configs broken, but those all good now :)! Also I spent like 2 hours editing this video (idk why it took so long). This is the demo video to all windows and linux users who would be unable to install the app so they can still see how it would work and vote on it.

0
Zain Marshall

Ok, so I think this will be my final devlog for bliss, at least for the first ship. I have made a bunch of small polishing changes. Here is a list:

  1. Before if bliss was inactive but you ran bliss panic, it would make you solve the puzzle then say “never active”, now it says that before and doesn’t make you do a pointless challenge
  2. I added configurable quote lengths. I took 100 short, medium, long, and huge (what monkeytype calls thicc) quotes from monkey type, stored them in txt files, and then made it so you can type bliss configure quote and then change the length
  3. I made it so you can’t run config anything while bliss is active, so you can’t cheat and try to break out of it, you have to use bliss panic.
  4. Fixed a few errors.
Attachment
Attachment
0
Zain Marshall

I added a config menu for blocked apps. Unlike website where I could just make it a command, bliss config website add , for apps bliss needs the path to the .app, the bundle id, and the process name. Instead of forcing the user to type this out, I thought of a much better solution: all apps live in the Applications folder, so just list out all of those files and let then select which one, and that will give bliss the direct path from where it can get all the rest of the information itself. So the way I went about this first was by using fuzzy finder, fzf, and it would just start an fzf over your apps folder when you typed bliss config app add, and then when you select one it would do all the bliss things. This is nice as fzf is fast and keyboard based, but I want bliss to require as few external installs as possible, so I made a different menu if fzf is not installed, and I think that one works pretty well. I also like made the remove menu very similar but instead of on the apps folder, its on the config file. The no fzf command has a one time search feature than a numbered list which I showed off in the second screen recording.

Attachments

The first attached screen recording shows config app add and config app remove with fzf installed.
The second shows those two without fzf installed.

0
Zain Marshall
  1. I added blocking for desktop apps. It works on like proper apps, which is mostly everything, but for odd things like Minecraft which launches a java thing, which apple screen time is notoriously bad at catching, I have avoided for now.

Implementation

During a low, blissd wakes up every few seconds and checks the blocked apps list. For each app on it, it attempts to force quit the process that matches to the app’s path or process name. MAKE SURE YOU SAVE WORK BEFORE STARTING BLISS AS IT WILL FORCEFULLY SHUTDOWN.

Attachments

I have attached a simple screen recording of me trying to launch a blocked app. In this case the app I have blocked is Prism Launcher (a minecraft launcher).

0
Zain Marshall

I added an install script that installs the bliss cli, blissd, and the menu bar app, and blissroot. It is under scripts/install.sh. To go along with it, I wrote an uninstall script that uninstalls the menu-bar, removes the daemons, and deletes all the config and storage files. It also cleans up /etc/hosts and the pf. It is gated by the same typing puzzle as bliss panic. Also about the blissroot I talked about above, it just makes it so that you don’t have to type sudo each time. Bliss needs to edit protected files, so for start and panic, you used to need to use sudo, but now on install it gives itself a daemon making it so you don’t need to.

Attachment
0
Zain Marshall

Packet filter

I noticed in the blocker, if you already had the tab open, for example youtube, the browser would sometimes cache the ip and thus not need to query the DNS, thus bypassing the filter. So now bliss takes the domains, gets their ips, and then stores them so those ips are blocked on a network level using a packet filter table.

CLI Cleanup

Also, I cleaned up the CLI output and added bliss status. Status now shows remaining time and whether the firewall table is active. Sometimes in the code I had left placeholder output on certain commands, I removed that and made the error messages more helpful.

Attachments

The attached screenshots show bliss –help and bliss status.

Attachment
0
Zain Marshall

I added a real config system for websites. Instead of hardcoding YouTube, Bliss now stores domains in ~/.config/bliss/blocks.txt and the CLI supports add/remove/list. When Bliss starts, it reads this file and blocks everything inside it.
The attached screen shot shows those commands being used.

Attachment
0
Zain Marshall

##Bliss Panic Mode
I implemented what I call “panic” mode. Currently, if you start a block of some amount of minutes, ti will run for that time and it is impossible to exit. However, that can be unsafe or impractical, lets say you end to watch a youtube video for a class assignment or smth, or you just need to break out of the block, panic mode is the way. Instead of typing in a password or just clicking Unblock for 1 hour like it is in other blocks, you have to solve a puzzle. You have to do an activity that makes this feel a lot more painful and tedious, to incentivize you to not.

Future Steps

Right now its very simple, its a typing test where you need to get >=95% on a quote to pass. The quotes are pulled from a quotes.txt file. This is the test I will stick to now, but later I will switch to other puzzle types, maybe solving a leetcode problem. Also for testing purposes the quotes are short, cuz I’m too lazy to type long quotes, but I will prob make them longer on release.

Attachment

I have attached a screen recording showing the test after running bliss panic.

0
Zain Marshall

Formerly, the way bliss worked was just by starting and stopping it (well i hadn’t coded in a real stop, so just starting it) from the terminal, and the block would kinda be this thing in the background. It didn’t feel like it was a real app, and idk that didn’t sit well with me, and also there was no interceptor of how much time had passed. To solve this I added a very very simple menubar item. It says bliss and then it is a minute and seconds countdown. It stays running the background always, and is a launch item, so using LaunchAgent it stays running all the time and launches at computer reboot. So its there any time bliss is working. It will refresh and show the active timer ticking down on a bliss start command. The menu bar is written as a very simple swift application (one main.swift file) compiled to a binary.

I attached a screen recording showing me starting a timer and the menu bar timer ticking down.

0
Zain Marshall
  1. I implemented a background timer so the lock will actually stop after the time you specified when you run bliss start minutes and not just run indefinitely. The lock was already persistent on terminal closure and computer reseting seeing as how /etc/hosts works, but I had to figure out a way to make the timer persistent, so even if you turn off your computer and come back, if the end time is ended I need to make sure to unlock the block and revert the /etc/hosts. To achieve this I added a small daemon (very creatively named blissd) that runs in the background via launchd. When you start a timed lockout, its saved to a file, and blissd reads that file and automatically unblocks when the timer is done. As you can see in the attached screenshot, when running bliss status you can see the time remaining, and that is constantly updating with the daemon.
Attachment
0
Zain Marshall

I got the first block working, this blocks websites on any browser and is independent of the browser because what it does is filter DNS requests and not give certain websites access to the internet.

I have attached three screenshots. The first shows just what happens when you run bliss start and the second shows what it does to /etc/hosts. It modifies it such that all of the websites in the config (I haven’t implemented the config so right now its hard coded to youtube) will be added to /etc/hosts and be blocked from receiving internet. The third image just shows what happens when you try to visit the tab, no internet!

Attachment
Attachment
Attachment
0
Zain Marshall

I decided on the architecture of this project: you will primarily interact with it through a CLI and I will write it in C++ and build using CMake. I added some simple CLI fillers and a help menu with all the commands. The commands that I have so far coded in are start, panic, and config, which all just return a debug message for now. bliss –help will list all available commands.

Attachment
0