turtle

Shell programming, Haskell-style

Version on this page:1.2.3@rev:1
LTS Haskell 22.39:1.6.2@rev:3
Stackage Nightly 2024-10-31:1.6.2@rev:3
Latest on Hackage:1.6.2@rev:3

See all snapshots turtle appears in

BSD-3-Clause licensed by Gabriel Gonzalez
Maintained by [email protected]
This version can be pinned in stack with:turtle-1.2.3@sha256:730c8de9603e2d53fae9c544b667d5e93778a2883f48e4ac2ef4b99e0963a457,3420

turtle is a reimplementation of the Unix command line environment in Haskell so that you can use Haskell as both a shell and a scripting language.

Features include:

  • Batteries included: Command an extended suite of predefined utilities

  • Interoperability: You can still run external shell commands

  • Portability: Works on Windows, OS X, and Linux

  • Exception safety: Safely acquire and release resources

  • Streaming: Transform or fold command output in constant space

  • Patterns: Use typed regular expressions that can parse structured values

  • Formatting: Type-safe printf-style text formatting

  • Modern: Supports text and system-filepath

Read Turtle.Tutorial for a detailed tutorial or Turtle.Prelude for a quick-start guide

turtle is designed to be beginner-friendly, but as a result lacks certain features, like tracing commands. If you feel comfortable using turtle then you should also check out the Shelly library which provides similar functionality.