shellmet: Out of the shell solution for scripting in Haskell

[ command-line, library, mpl, program, shell ] [ Propose Tags ]

Shellmet provides easy and convenient way to call shell commands from Haskell programs

[Skip to Readme]
Versions [faq] 0.0.0, 0.0.1,,,
Change log
Dependencies base (>= && <4.13), process (>=1.6.3 && <1.7), shellmet, text (>=1.2.3 && <1.3) [details]
License MPL-2.0
Copyright 2019 Kowainik
Author Kowainik
Category Shell, Command Line
Home page
Bug tracker
Source repo head: git clone
Uploaded by shersh at 2019-02-23T14:55:26Z
Distributions Arch:, NixOS:, Stackage:0.0.1
Executables readme
Downloads 1713 total (43 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user [build log]
All reported builds failed as of 2019-02-23 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for shellmet-0.0.0

[back to package description]


Build status Hackage MPL-2.0 license Stackage Lts Stackage Nightly

Out of the shell solution for scripting in Haskell. Shellmet provides an easy and convenient way to call shell commands from Haskell programs.

Usage example

This README contains the usage example of the shellmet library. The example is runnable. You can build and execute with the following command:

cabal new-run readme

Setting up

Since this tutorial is written using Literate Haskell, first, let's write all necessary pragmas and imports.

{-# LANGUAGE OverloadedStrings #-}

import Data.Semigroup ((<>))
import Shellmet (($|))

import qualified Data.Text as T

Simple scripting example

Below you can see how easy it is to interact with shell commands in Haskell:

main :: IO ()
main = do
    "echo" ["Starting shellmet readme..."]
    text <- "cat" $| [""]
    let cnt = T.pack $ show $ length $ T.lines text
    "echo" ["Number of lines in this README: " <> cnt]

And the output is:

⚙  echo 'Starting shellmet readme...'
Starting shellmet readme...
⚙  echo 'Number of lines in this README: 54'
Number of lines in this README: 54