Skip to Content

Open Source

Some of my projects that many people use, from Node.js libraries and command-line tools to Swift packages for Mac apps. I also started Awesome, lists of good things about all kinds of topics.

Sindre Sorhus

github.com/sindresorhus

6,155 contributions on GitHub in the last year. See every year in the Career Quilt.

HTTP

Requests and connections, in Node.js and the browser.

  • Got

    Human-friendly and powerful HTTP requests for Node.js.

    TypeScript
  • Ky

    A tiny and elegant HTTP client based on the Fetch API.

    TypeScript
  • is-online

    Check if the internet connection is up.

    JavaScript
  • public-ip

    Get your public IP address, very fast.

    JavaScript

Promises and Async

Small packages for async code in JavaScript.

  • p-limit

    Run promise-returning and async functions with limited concurrency.

    JavaScript
  • p-queue

    Promise queue with concurrency control.

    TypeScript
  • p-map

    Map over promises concurrently.

    JavaScript
  • p-retry

    Retry a promise-returning or async function.

    JavaScript
  • p-throttle

    Throttle promise-returning and async functions.

    JavaScript
  • pify

    Promisify a callback-style function.

    JavaScript
  • delay

    Delay a promise a specified amount of time.

    JavaScript
  • Emittery

    Simple and modern async event emitter.

    JavaScript

Command-Line Tools

Tools to use in the terminal.

  • np

    A better “npm publish”.

    JavaScript
  • Pure

    Pretty, minimal, and fast Zsh prompt.

    Shell
  • fkill

    Fabulously kill processes. Cross-platform.

    JavaScript
  • fast-cli

    Test your download and upload speed with fast.com.

    TypeScript

Making Command-Line Apps

Colors, spinners, boxes, and arguments for your own command-line apps.

  • Chalk

    Terminal string styling done right.

    JavaScriptchalk/chalk
  • Ora

    Elegant terminal spinner.

    JavaScript
  • meow

    A helper for command-line apps, like for their arguments and help text.

    JavaScript
  • boxen

    Create boxes in the terminal.

    JavaScript
  • log-update

    Log by overwriting the previous output in the terminal, like for progress bars.

    JavaScript
  • terminal-link

    Create clickable links in the terminal.

    JavaScript
  • cli-spinners

    Spinners for use in the terminal.

    JavaScript
  • update-notifier

    Update notifications for your command-line app.

    JavaScript

Files

Find, copy, move, and delete files from Node.js.

  • globby

    User-friendly glob matching.

    JavaScript
  • file-type

    Detect the file type of a file, stream, or data.

    JavaScript
  • find-up

    Find a file or directory by walking up parent directories.

    JavaScript
  • trash

    Move files and directories to the trash.

    JavaScript
  • del

    Delete files and directories.

    JavaScript
  • cpy

    Copy files.

    JavaScript
  • move-file

    Move a file, directory, or symlink, also to another device.

    JavaScript
  • make-dir

    Make a directory and its parents if needed, like “mkdir -p”.

    JavaScript

Processes and the System

Run processes, open things, and use the clipboard from Node.js.

  • Execa

    Process execution for humans.

    JavaScript
  • open

    Open URLs, files, and executables. Cross-platform.

    JavaScript
  • clipboardy

    Access the system clipboard (copy and paste).

    JavaScript
  • get-port

    Get an available TCP port.

    JavaScript

Strings and Formatting

Change strings and show numbers in a format that people can read.

  • slugify

    Slugify a string.

    JavaScript
  • camelcase

    Convert a dash, dot, underscore, or space separated string to camelCase.

    JavaScript
  • pretty-bytes

    Convert bytes to a human-readable string: 1337 → 1.34 kB.

    JavaScript
  • pretty-ms

    Convert milliseconds to a human-readable string: 1337000000 → 15d 11h 23m 20s.

    JavaScript

Objects and Caches

Work with nested objects, and keep the results of functions.

  • dot-prop

    Get, set, or delete a property of a nested object with a dot path.

    JavaScript
  • on-change

    Watch an object or array for changes.

    JavaScript
  • quick-lru

    Simple “Least Recently Used” (LRU) cache.

    JavaScript
  • memoize

    Memoize functions, so calls with the same input are faster.

    TypeScript

The Web

For web pages: URLs, the clipboard, the DOM, and CSS.

Images and Screenshots

Screenshots of websites, and images in code and in the terminal.

Linting

Linters and ESLint rules for JavaScript and TypeScript.

  • XO

    JavaScript and TypeScript linter with great defaults.

    TypeScriptxojs/xo
  • eslint-plugin-unicorn

    More than 300 powerful ESLint rules.

    JavaScript
  • eslint-config-xo

    The ESLint config of XO.

    JavaScriptxojs/eslint-config-xo
  • eslint-plugin-ava

    ESLint rules for AVA.

    JavaScriptavajs/eslint-plugin-ava

Testing and Types

A test runner, and types and checks for JavaScript and TypeScript.

  • AVA

    Node.js test runner that lets you develop with confidence.

    JavaScriptavajs/ava
  • type-fest

    A collection of essential TypeScript types.

    TypeScript
  • ts-extras

    Essential utilities for TypeScript projects.

    TypeScript
  • ow

    Function argument validation for humans.

    TypeScript

File Formats

Two file formats that I made, with their specs and implementations. Both are drafts.

  • SOML

    A config format for humans. The spec is a draft.

    soml-lang/soml
  • soml

    The reference parser, serializer, and formatter for SOML.

    TypeScriptsoml-lang/soml-javascript
  • Simple Color Palette

    A minimal JSON-based file format for color palettes. The spec is a work in progress.

    simple-color-palette/spec
  • SimpleColorPalette

    A Swift implementation of the Simple Color Palette format.

    Swiftsimple-color-palette/SimpleColorPaletteSwift

Swift Packages

Packages for Swift and Mac apps.

  • Defaults

    Swifty and modern UserDefaults.

    Swift
  • KeyboardShortcuts

    Add user-customizable global keyboard shortcuts to your macOS app.

    Swift
  • Settings

    Add a settings window to your macOS app in minutes.

    Swift
  • LaunchAtLogin

    Add “Launch at Login” to your macOS app in seconds.

    Swift
  • DockProgress

    Show progress in the Dock icon of your app.

    Swift
  • CircularProgress

    Circular progress indicator for your macOS app.

    Swift
  • ExceptionCatcher

    Catch Objective-C exceptions in Swift.

    Swift
  • DSStore

    Parse and write macOS .DS_Store files from Swift.

    Swift

Mac Tools

Command-line tools and packages for macOS.

  • create-dmg

    Create a good-looking DMG for your macOS app in seconds.

    JavaScript
  • macos-trash

    Move files and folders to the trash from the command line.

    Swift
  • dark-mode

    Control the macOS dark mode from the command line.

    Swift
  • macos-wallpaper

    Manage the desktop wallpaper on macOS.

    Swift

Apps

My apps that have their source code on GitHub.

  • Gifski

    Convert videos to high-quality GIFs on your Mac.

    Swift
  • Pasteboard Viewer

    Inspect the system pasteboards.

    Swift
  • Blear

    Transform photos into blurry wallpapers on your iPhone.

    Swift

Awesome Lists

Lists of good things about a topic, like Node.js packages and sci-fi.

Just for Fun

Small packages that make code more fun.

  • cat-names

    Get popular cat names.

    JavaScript
  • dog-names

    Get popular dog names.

    JavaScript
  • cows

    ASCII cows.

    JavaScript
  • superb

    Get superb-like words.

    JavaScript