Skip to content

Kotlin REPL with an IDE-like experience in your terminal

License

Notifications You must be signed in to change notification settings

darthorimar/rekot

Repository files navigation

ReKot

ReKot

Kotlin REPL with an IDE-like experience in your terminal

GitHub Release

⚙️ Installation

Make sure you have the JDK installed

Paste this into the terminal:

bash <(curl -s https://raw.githubusercontent.com/darthorimar/rekot/master/install.sh)

Or if you prefer wget:

bash <(wget -qO- https://raw.githubusercontent.com/darthorimar/rekot/master/install.sh)

✨ Features

Multiline Code Editing

A full-fledged multiline code editor with code highlighting Multiline code editing

Multiple Cells

With results that can be reused between the cells Multiple cells

Code Completion

Code completion

In-editor Code Highlighting

In-editor code highlighting

🧪 Compatibility

  • Tested on macOS Sequoia 15.2 on iTerm2 and Terminal.app
  • Not tested on Linux or Windows

⚠️ Known Problems

On macOS Sequoia, some text may be printed on the terminal like:

2025-01-28 23:39:24.855 java[2091:30776] +[IMKClient subclass]: chose IMKClient_Modern
2025-01-28 23:39:24.855 java[2091:30776] +[IMKInputSession subclass]: chose IMKInputSession_Modern

See https://discussions.apple.com/thread/255761734

As a workaround:

  • On Mac systems, ReKot occasionally fully refreshes the screen at some interval.
  • You can press Ctrl+R to manually refresh the screen.

🛠️ Building/Developing ReKot

Currently, ReKot depends on the Kotlin Analysis API with a few patches on top. These patches are in my fork of the Kotlin repository, in the branch rekot: https://github.com/darthorimar/kotlin/tree/rekot.

To start developing/building ReKot:

  1. Clone the Kotlin on the branch rekot repository from https://github.com/darthorimar/kotlin/tree/rekot.
  2. Run ./gradlew installIdeArtifacts -Ppublish.ide.plugin.dependencies=true in the cloned repository. This will install the Analysis API to your Maven Local.
  3. Now you can start working in the ReKot repository, and it can be imported into IntelliJ IDEA.
  4. Gradle tasks:
    • :app:buildProd - This will create a release (a shadow jar) in app/build/libs/rekot-VERSION.jar.
    • :app:run - Run the app in the Swing-based terminal emulator, which sometimes can look quite blurry, but it's useful for debugging.