New interface for the Crystal Interpreter : IC

New interface for the Crystal Interpreter : IC

Hello Crystal Community !

Few months ago, I have worked on making a crystal interpreter by running thought AST-node, this was before crystal-i was announced, and as crystal-i was far more faster/promising and functional that mine, I decided to keep the work I’ve done about user-interface, and integrate crystal-i under the wood.

In the end, I got a pretty interface, enhancing crystal-i. It provide diverse additional features, like support of multiline, syntax coloration, auto indent, …, or even auto-completion (though experimental).

As I think the project is at an enough advanced stage, I wanted to share the project, available here on github!

Here is a small overview of what it’s look like:

Don’t hesitate to tell me what you like/dislike, what feature you would like see, or if you have any problem compiling the project, etc.

Also, I am open to integrate/contribute some of theses features to the real crystal-i, so anyone could benefit directly, please tell me what you think about.


This looks really nice. I’d love to see these things upstreamed to crystal i :heart:

Looks like you even wrote custom terminal integration code instead of using libreadling or similar. That’s promising. Did you already test it in different terminals? I think this could be a great solution for Add readline for the compiler · Issue #11340 · crystal-lang/crystal · GitHub


Yes I didn’t used readline because I wanted more things to implement multiline-input.

I have mostly tested on tilix terminal and also gnome-terminal. I do essentially cursor moves using ANSI escape code, which I think is supported on any terminal. However I not 100% sure if ‘ctrl’ shortcuts are handled the same way on every terminal.