ansi-terminal alternatives and similar packages
Based on the "User Interfaces" category.
Alternatively, view ansi-terminal alternatives based on common mentions on social networks and blogs.
vty9.7 5.4 ansi-terminal VS vtyA high-level ncurses alternative written in Haskell
vty-examples9.7 5.4 ansi-terminal VS vty-examplesA high-level ncurses alternative written in Haskell
haskeline9.7 3.3 ansi-terminal VS haskelineA Haskell library for line input in command-line programs.
repline9.2 0.0 ansi-terminal VS replineHaskeline wrapper for GHCi-like REPL interfaces
vty-ui9.0 0.0 ansi-terminal VS vty-uiA terminal user interface programming library similar to graphical interfaces such as GTK and QT. (DEPRECATED, see https://github.com/jtdaugherty/brick)
hscurses8.9 0.0 ansi-terminal VS hscursesncurses binding for Haskell
wizards7.7 0.0 ansi-terminal VS wizardsHigh level, generic library for interrogative user interfaces in Haskell
terminfo7.0 0.0 ansi-terminal VS terminfoHaskell bindings to the terminfo API.
termbox-banana5.1 4.3 ansi-terminal VS termbox-bananatermbox + reactive-banana
HCL4.9 0.0 ansi-terminal VS HCLHigh-level Haskell library for building command line interfaces.
lambdacat4.9 0.0 ansi-terminal VS lambdacatλcat → Browser
wild-bind-indicatorDynamic key binding framework
termbox3.0 6.1 ansi-terminal VS termboxtermbox bindings
climb2.5 0.0 ansi-terminal VS climbBuilding blocks for a GHCi-like REPL with colon-commands
linenoise2.5 0.0 ansi-terminal VS linenoiseA lightweight readline-replacement library for Haskell
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of ansi-terminal or a related project?
A Haskell package providing support for 'ANSI' control character sequences for terminals on Unix-like operating systems and Windows
'ANSI' terminal escape code support for Haskell, which allows:
- Colored text output, with control over both foreground and background colors
- Clearing parts of a line or the screen
- Hiding or showing the cursor
- Moving the cursor around
- Reporting the position of the cursor
- Scrolling the screen up or down
- Clickable hyperlinks to URIs
- Changing the title of the terminal
By using emulation, it is compatible with versions of 'Command Prompt' and 'PowerShell' on Windows that did not recognise 'ANSI' escape codes before Windows 10 version 1511 was released in November 2015.
If you like this, you may be interested in ansi-wl-pprint, which provides a pretty-printer that can construct strings containing 'ANSI' colorisation.
Not all 'ANSI' escape codes are suported by this library but most (if not all) of the popular ones that are well-supported by terminal software are, including:
- Select Graphic Rendition mode (colors and other attributes):
- Clearing parts of the screen:
- Cursor visibility changes:
- Cursor movement by character:
- Cursor movement by line:
- Directly changing cursor position:
- Saving, restoring and reporting cursor position:
- Scrolling the screen:
- Changing the title:
Each supported escape code or family of codes has a corresponding function that comes in three variants:
- A straight
IOvariant that doesn't take a
Handleand just applies the escape code to
stdoutand any terminal attached to it
IOvariant similar to above, but which takes a
Handleto which the escape code should be applied
Stringvariant that returns a literal string that should be included to get the effect of the code. However, on Windows systems where emulation has been necessary, these strings will always be blank!
A full example is available, but for a taste of how the library works try the following code:
import System.Console.ANSI main = do setCursorPosition 5 0 setTitle "ANSI Terminal Short Example" setSGR [ SetConsoleIntensity BoldIntensity , SetColor Foreground Vivid Red ] putStr "Hello" setSGR [ SetConsoleIntensity NormalIntensity , SetColor Foreground Vivid White , SetColor Background Dull Blue ] putStrLn "World!"
Haddock documentation is available at Hackage.
The library is originally written by Max Bolingbroke
Mike Pilgrem and Roman Cheplyaka are the primary maintainers.
Oliver Charles is the backup maintainer. Please get in touch with him if the primary maintainers cannot be reached.