Skip to content

A desktop IDE for Kotlin script development featuring interactive execution, real-time output streaming, clickable error navigation, and support for user input prompts. Built with Compose for Desktop.

Notifications You must be signed in to change notification settings

zahid4kh/compose-ide-integration

Repository files navigation

Compose IDE Integration

A desktop Kotlin script IDE built with Compose for Desktop that provides interactive script execution with real-time output and error navigation.

Kotlin Compose

Screenshot

screenshot

Video Demo

Link to YouTube

Table of Contents

Features

  • Interactive Script Execution: Run Kotlin scripts with real-time output
  • Clickable Error Navigation: Click on error locations to jump directly to the problematic code
  • Input Handling: Support for readLine() interactive script features
  • Dark/Light Mode: Toggle between themes

Prerequisites

  • JDK 17 or later
  • Kotlin 2.1.20 or later

Quick Start

Download Pre-built Release

Download composescript.jar from the Releases page and run:

java -jar composescript.jar

Run from Source

git clone https://github.com/zahid4kh/compose-ide-integration.git
cd compose-ide-integration

# Make gradlew executable (Linux/macOS only)
chmod +x gradlew

# Build and run
./gradlew clean build
./gradlew :run

Development with Hot Reload

./gradlew :hotRun --mainClass ComposeIDEIntegration --auto

Distribution Options

1. Packaged Application

Linux (with JRE included):

./gradlew packageDebWithWMClass

This creates a .deb package in build/compose/binaries/ that includes the JRE and can be installed system-wide.

Windows:

./gradlew packageMsi

macOS:

./gradlew packageDmg

2. Standalone JAR

./gradlew packageReleaseUberJarForCurrentOS

Then run with:

java -jar build/compose/jars/*.jar

3. All Platform Distributions

./gradlew packageDistributionForCurrentOS

Usage

  1. Write Script: Enter your Kotlin script in the left panel
  2. Run: Click the play button
  3. Interactive Input: When your script uses readLine(), an input field will appear
  4. Error Navigation: Click on blue underlined error locations to jump to the code
  5. Copy Output: Use the copy button to copy script output to clipboard

How It Works

  • Scripts are saved to $HOME/.composeideintegration/foo.kts
  • Scripts are executed using kotlinc -script foo.kts
  • Error locations like file.kts:line:column become clickable links
  • Real-time output streaming shows script execution progress
  • Interactive prompts are automatically detected and handled

Build Tasks

  • ./gradlew run - Run the application
  • ./gradlew packageDebWithWMClass - Linux package with JRE
  • ./gradlew packageReleaseUberJarForCurrentOS - Standalone JAR
  • ./gradlew packageDistributionForCurrentOS - Native distribution

About

A desktop IDE for Kotlin script development featuring interactive execution, real-time output streaming, clickable error navigation, and support for user input prompts. Built with Compose for Desktop.

Topics

Resources

Stars

Watchers

Forks