Dye

0.0.1

Cross-platform terminal styling for Swift command-line interface.
dduan/Dye

What's New

0.0.1

2020-06-01T21:35:40Z

Initial release :)

211f761a729cbd259b294b9f325bbc485eaf47d549ea2a659f742c8792ac962a  0.0.1.tar.gz
19825531354e477cf488c024bda615d4ba052a670c58247dbeebbec3acf81ded  0.0.1.zip

Dye

Dye is a Swift library for adding styles and colors to command-line outputs.

It works in terminal simulator that supports ANSI (most on macOS and Linux), as well as older apps on Windows, such as CMD.exe.

Usage

SwiftPM/Xcode

Dye is a SwiftPM package. Add it as a dependency in Package.swift:

.package(url: "http://github.com/dduan/Pathos", from: "0.0.1")

… or the URL in Xcode.

CMake

Dye also builds with CMake. It works on Windows 10 and Swift 5.2.

Documentation

The file Examples/main.swift is a sample application that demonstrates most of Dye's APIs. To get a taste of how Dye works, try it out with swift run example, and take a look at its source code.

This is what the example CLI app looks like in Command Prompt on Windows:

Dye example app running in Window Command Prompt

Read the docstring in the source code for detailed API documentation.

Dye follows the NO_COLOR convention.

License

MIT. See LICENSE.md

Alternative

If you don't need Windows Support, I recommend you check out Chalk.

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Apr 09 2026 09:18:25 GMT-0900 (Hawaii-Aleutian Daylight Time)