CryPrompt

A crystal library for creating easy prompting cli tools in crystal. I wanted a prompting kit with easy to use tab completion/suggestion while also having a nice easy hierarchy for the suggestion table. Cryprompt also now features a suggestion description in its table with the opional _description option inside the json or yaml configuration

I am completely open to fixes and suggestions. If there is a better way to do anything i have done please let me know!!


Features:

Suggestion Table

The flow of suggested material is in the form of a hash and can be written in json or yaml quite easily.

ex.

hello: 
  _description: this is a descroption for hello
  to:
    - you
    - jeff
    - jessie 
    - jane
  world:
  everyone:
    _description: this is a description for everyone
    with:
      a:
        _description: this is a description for "a" after "with"
        - hat
        - shirt
        - shoes
        - pants

The word "hello" defines the base of this tree and will have 2 sub suggestions "to" and "world".

Demo App

run the demo program below

git clone https://github.com/CausticKirbyZ/cryprompt.git
cd cryprompt
make && ./bin/demo

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      cryprompt:
        github: CausticKirbyZ/cryprompt
        branch: master
  2. Run shards install

Usage

require "cryprompt"

Development

ToDo:

Bugs:

Contributing

  1. Fork it (https://github.com/your-github-user/cryprompt/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

ShoutOuts

These 2 repos. I didnt use any of their code but took inspiration on how i wanted the prompt for this library to look