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,189 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
  • normalize-url

    Normalize a URL.

    JavaScript
  • fetch-extras

    Useful utilities for working with Fetch.

    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
  • p-progress

    Create a promise that reports progress.

    TypeScript
  • p-memoize

    Memoize promise-returning and async functions.

    TypeScript
  • p-event

    Promisify an event by waiting for it to be emitted.

    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
  • emoj

    Find relevant emoji from text on the command-line.

    TypeScript

Making Command-Line Apps

Colors, spinners, boxes, and text 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
  • string-width

    Get the visual width of a string.

    JavaScript
  • figures

    Unicode symbols with fallbacks for older terminals.

    JavaScript
  • cli-truncate

    Truncate a string to fit a specific number of columns.

    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
  • tempy

    Get a random temporary file or directory path.

    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, cache results, and delay function calls.

  • dot-prop

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

    JavaScript
  • debounce

    Delay function calls until a set time elapses after the last invocation.

    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, TypeScript, CSS, and Markdown.

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
  • test-extras

    Assertions and utilities that make node:test better.

    JavaScript

File Formats

Two file formats that I made, with their specs. Both are drafts. The Swift implementation of SOML is also listed.

  • SOML

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

    soml-lang/soml
  • Simple Color Palette

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

    simple-color-palette/spec
  • SOML Swift

    A Swift implementation of the SOML format.

    Swiftsoml-lang/SOMLSwift

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
  • LaunchAtLogin

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

    Swift
  • DockProgress

    Show progress in the Dock icon of your app.

    Swift
  • Regex

    Swifty regular expressions.

    Swift
  • Percentage

    A percentage type for Swift.

    Swift
  • DSStore

    Read and write macOS .DS_Store files in Swift.

    Swift
  • ExtendedAttributes

    Manage extended attributes in 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
  • wallpaper

    Manage the desktop wallpaper, also on Linux and Windows.

    JavaScript
  • macos-wallpaper

    Manage the desktop wallpaper on macOS.

    Swift

Apps

My apps on GitHub.

  • Gifski

    Convert videos to high-quality GIFs on your Mac.

    Swift
  • Pasteboard Viewer

    Inspect the system pasteboards.

    Swift
  • Plash

    Make any website your Mac desktop wallpaper.

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