block eliminates distractions and saves you time from the command line.
Spend less time on the computer and more time in the sun.
To install the program, please read the instructions below:
- downloaded latest binary release tarball
- extract the binary from the tarball
- add the binary to your system $PATH
** important! **
- requires
go
, you can install go here: go.dev - requires
ffmpeg
git clone https://github.com/connorkuljis/block-cli.git && cd block-cli
make
make install
- Open your
/etc/hosts
file
sudo vi /etc/hosts
- Paste an example blocklist
# --- social media
# 0.0.0.0 twitter.com
# 0.0.0.0 www.youtube.com
# 0.0.0.0 www.instagram.com
# 0.0.0.0 www.reddit.com
# 0.0.0.0 reddit.com
# 0.0.0.0 www.old.reddit.com
# 0.0.0.0 old.reddit.com
# 0.0.0.0 www.facebook.com
# ~ <-- lines below this character will be untouched by block-cli
- The program will uncomment the lines when you start the program, and add them back in when upon exit.
- If you have content you dont want the program to manipulate, add the following line to the hosts file.
Features:
- π Pomodoro-like progress bar inidicator (right in your terminal!).
- π
Automatically block/unblock any site at the IP level during the duration of the program.
- π¬ Alerted by a system notification when a session ends.
- π
Automatically block/unblock any site at the IP level during the duration of the program.
- β³ Automatically record your progress.
- π Answer 'what did I get done today' by running
block history
.
- π Answer 'what did I get done today' by running
- σ° Capture your progress by enabling the screen recorder with
-x
or--screen-recorder
.- π₯ Compile recordings into a time-lapse.
- Cross-platform integration for
mac
andlinux
(windows
soon).- If you are having issues -> https://github.com/connorkuljis/block-cli/issues
YAML
file at~/.config/block-cli/config.yaml
β― block start 10 'draft emails' -x
Setting a timer for 10.0 minutes.
ESC or 'q' to exit. Press any key to pause.
100% |βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| (90/90, 15 it/s) [5s]
- To see the list of commands available, run
block --help
If you have ffmpeg
on you machine you can automatically capture your screen.
To record your screen use the -x
flag.
If you are having issues recording your screen, follow the checklist:
- ensure system permissions are enabled to record your screen.
- run
$ ffmpeg -v
to ensure your installation is not corrupted or missing. - a valid input device is configured in
config.yaml
- you have restarted your application
- open
.config/block-cli/config.yaml
Example:
# config.yaml
ffmpegRecordingsPath: /Volumes/WD_2TB/Screen-Recordings
avfoundationDevice: "1:0"