macOS Command-Line Tools You Might Not Know About

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • wl-clipboard

    Command-line copy/paste utilities for Wayland

  • displayplacer

    macOS command line utility to configure multi-display resolutions and arrangements. Essentially XRandR for macOS.

  • It's not something that I've tried. There was a user report at the bottom of this GitHub issue that states sidecar rotation does not work.

    https://github.com/jakehilborn/displayplacer/issues/17

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • osc52pty

    OSC 52 workaround for Terminal.app

  • I don't think wrapping my entire shell session in a moderately complex third party tool (that maybe just uses pbcopy under the hood[1]) counts as "simply" when compared to my existing solution which just pipes over ssh and a couple bash scripts.

    But thank you for the share, it is interesting!

    [1]: https://github.com/roy2220/osc52pty/blob/master/oscexecutor....

  • xclip

    Command line interface to the X11 clipboard

  • I find it so annoying that these only work with plain text and RTF. On X11 there is `xclip`[0] and on Wayland there is `wl-clipboard`[1] both of which support binary file formats either through parsing the header or explicitly setting the MIME type.

    This means you can do things like copy an image from the terminal and paste it into a graphical program like a browser or chat client and vice-versa. Also can be very useful in shell scripts for desktop automation.

    The workaround on MacOS is to use AppleScript via `osascript` to `set the clipboard to...`.

    [0] https://github.com/astrand/xclip

  • remote-pbcopy-iterm2

    remote pbcopy for iTerm2

  • Since you mention both pbcopy and iTerm - I love https://github.com/skaji/remote-pbcopy-iterm2. I do most of the work on a remove Linux server, treating my MacBook as mostly a dumb terminal, and being able to transparently copy from the remove to my local clipboard is so nice.

  • piknik

    Copy/paste anything over the network.

  • Extra handy when combined with `piknik`[1] for distributed/cross-Apple account clipboard shenanigans.

    [1] https://github.com/jedisct1/piknik

  • dotfiles

    My Dotfiles (by svieira)

  • https://github.com/svieira/dotfiles/blob/a3654d6a194e3689978...

        # Use clipboard in shell pipelines

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Comcast

    Simulating shitty network connections so you can build better systems.

  • [Comcast](https://github.com/tylertreat/comcast) also does this for macOS, BSD, and Linux. And it's _brilliantly_ named.

  • bat

    A cat(1) clone with wings.

  • I've been using bat as a cat replacement for a while now. It includes paging, syntax highlighting, line numbers, and is generally very performant.

    https://github.com/sharkdp/bat

  • tmux

    tmux source code

  • I have tried it, but for whatever reason I just don't like it. I prefer just running tmux in iTerm with no integration.

    On the topic, you can also integrate tmux with the native clipboard - I have set copy-pipe to the remote pbcopy, so any selection done in tmux get copied to my local clipboard. I also just found out that tmux also support it natively (https://github.com/tmux/tmux/wiki/Clipboard#the-set-clipboar...).

  • Clipboard

    😎🏖️🐬 Your new, 𝙧𝙞𝙙𝙤𝙣𝙠𝙪𝙡𝙞𝙘𝙞𝙤𝙪𝙨𝙡𝙮 smart clipboard manager

  • And `cb` which works cross-platform, via https://github.com/Slackadays/clipboard

  • macosrec

    Take screenshots/videos of macOS windows from the command line

  • brew install duti

    > screencapture - take screenshots

    Big fan of screencapture. I wanted something similar but for capturing window videos, so I built https://github.com/xenodium/macosrec

    I often wrap command line utilites with Emacs functions (don't need to remember invocation flags/structure but also enables batch invocations):

    https://xenodium.com/recordscreenshot-windows-the-lazy-way

  • prefsniff

    A utility to sniff preferences changes to macOS plist files

  • https://github.com/zcutlip/prefsniff can be handy for figuring this stuff out, you start it up, change a setting, and it reports the plist differences to you

  • cli

    um is a GPT-powered CLI assistant. Ask questions in plain English, get the perfect shell command. (by promptops)

  • You should check out "um" https://github.com/promptops/cli for when you can't remember the command/parameters.

    ~ um prevent my mac from sleeping for 30m

       caffeinate -u -t 1800

  • rofi

    Rofi: A window switcher, application launcher and dmenu replacement

  • fast-cli

    Test your download and upload speed using fast.com

  • yt-dlp

    A feature-rich command-line audio/video downloader

  • FYI: yt-dlp is more up to date and faster, AFIK: https://github.com/yt-dlp/yt-dlp

    I download and save it as 'ytdl' for convenience, but I use it all the time on twitter too.

  • tutu

    Zsh bookmark navigation utility

  • If you like `z`, you should check out my `tutu`.

    https://github.com/daotoad/tutu

  • exa

    A modern replacement for ‘ls’.

  • Some of us don't want all of GNU's utilities; just on an as-needed basis. They're not as needed as they once were.

    Many of these utilities have been rewritten in Rust and have more modern features.

    For example, instead of ls, I use exa [1]. Or ripgrep [2] instead of grep.

    [1]: https://github.com/ogham/exa

    [2]: https://github.com/BurntSushi/ripgrep

  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • Some of us don't want all of GNU's utilities; just on an as-needed basis. They're not as needed as they once were.

    Many of these utilities have been rewritten in Rust and have more modern features.

    For example, instead of ls, I use exa [1]. Or ripgrep [2] instead of grep.

    [1]: https://github.com/ogham/exa

    [2]: https://github.com/BurntSushi/ripgrep

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts