explaingit

sveinbjornt/sloth

8,892Objective-CAudience · ops devopsComplexity · 1/5LicenseSetup · easy

TLDR

A free Mac app that shows every file, folder, network port, and device any running program is currently accessing, a visual, searchable interface around the built-in lsof command.

Mindmap

mindmap
  root((Sloth))
    What it does
      Show open files
      Show network ports
      Show Unix sockets
    Under the hood
      Wraps lsof tool
      Native Mac GUI
    Features
      Filter by process
      Sort by file count
      Detail inspection
    Audience
      Mac power users
      DevOps engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Find which app is holding a USB drive or disk open so you can safely eject it.

USE CASE 2

Check which process has a specific network port open on your Mac.

USE CASE 3

Investigate unexpected file access by an application in real time using a searchable, sortable view.

Tech stack

Objective-CmacOS

Getting it running

Difficulty · easy Time to first run · 5min

Download as a zip or install via Homebrew, requires macOS 11 or later. No configuration needed.

Use freely for any purpose including commercial use, as long as you keep the copyright and license notice, BSD 3-Clause.

In plain English

Sloth is a free Mac application that shows you every file, folder, network connection, pipe, and device that any running program on your computer is currently using. If you have ever wondered why a disk won't eject, why an app seems to be accessing files unexpectedly, or which program has a particular port open, Sloth gives you a visual way to find the answer. Under the hood, it is a graphical wrapper around a built-in Unix command-line tool called lsof, which stands for "list open files." Sloth takes the raw output of that tool and presents it in a sortable, searchable window that is much easier to navigate than a wall of terminal text. You can filter the list by process name, file type, location, or using pattern matching, and you can sort by process name, file count, or other criteria. The app shows not just regular files and directories but also network sockets (including the port, protocol, and connection status), Unix domain sockets used for communication between programs on the same machine, and pipes that connect one process to another. An inspection panel gives more detailed information about any selected item. A right-click menu provides file operations for items in the list. Sloth has been in active development since 2004 and is written in Objective-C, Apple's older native Mac programming language. It runs on macOS 11 and later. The current version can be downloaded as a zip file or installed via Homebrew. It is free and open source under the BSD 3-Clause license. The author accepts donations.

Copy-paste prompts

Prompt 1
I downloaded Sloth for Mac and my USB drive won't eject. Walk me through using Sloth's filter to find the exact process holding it open and how to close it.
Prompt 2
How do I use Sloth to show only the network connections made by a specific app like Chrome or my web server process?
Prompt 3
Show me how to use Sloth to monitor which files a background daemon opens at startup so I can understand what it is doing.
Open on GitHub → Explain another repo

← sveinbjornt on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.