Marcus

Build Statushex.pm version

Marcus is a library for writing interactive CLIs in Elixir.

Features

Marcus provides helpers for:

You can also prompt the user for:

Examples

import Marcus

prompt_string("Name")
# Name: Jean-Philippe
# => "Jean-Philippe"

prompt_integer("Integer")
# Integer: 8
# => 8

yes?("Do you want?")
# Do you want? (y/n) y
# => true

choose("Make a choice:", item1: "Item 1", item2: "Item 2")
# Make a choice:
#
#   1. Item 1
#   2. Item 2
#
# Choice: 2
# => :item2

Setup

To use Marcus in your project, add this to your Mix dependencies:

{:marcus, "~> 0.1.2"}

Contributing

Before contributing to this project, please read the CONTRIBUTING.md.

License

Copyright © 2018-2019 Jean-Philippe Cugnet

This project is licensed under the MIT license.