packages/kilo-jetbrains/README.md
AI coding agent plugin for JetBrains IDEs.
When you open the monorepo root in IntelliJ IDEA, the Gradle project at packages/kilo-jetbrains/ should be auto-detected via .idea/gradle.xml. If not, link it manually: File > Settings > Build Tools > Gradle > + and select packages/kilo-jetbrains/settings.gradle.kts.
From packages/kilo-jetbrains/:
bun run build
This builds the CLI binary for your current OS/arch only, copies it into the backend module resources, and runs ./gradlew buildPlugin. The plugin archive is output to build/distributions/.
Or via Turbo from the repo root:
bun turbo build --filter=@kilocode/kilo-jetbrains
From packages/kilo-jetbrains/:
bun run build:production
This builds CLI binaries for all 6 desktop platforms (darwin-arm64, darwin-x64, linux-arm64, linux-x64, windows-x64, windows-arm64), copies them all into the backend jar, and fails if any are missing. Gradle also validates all platforms are present via -Pproduction=true.
The built plugin archive is at build/distributions/kilo.jetbrains-<version>.zip. This zip can be installed in any JetBrains IDE via Settings > Plugins > Install Plugin from Disk.
Use the runIde Gradle task (available in the Gradle tool window or via the "Run JetBrains Plugin" run configuration) to launch a sandboxed IntelliJ instance with the plugin installed.
On a fresh worktree, runIde now checks backend/build/generated/cli/cli/ first. If the local-platform CLI binary is missing, it runs the standard single-binary generation flow and copies the result into the backend resources automatically.
That bootstrap is local-development only. Production packaging still requires running bun run build:production so all platform binaries are present.
The plugin supports a few JVM system properties for local debugging. These are most useful with runIde in sandbox mode because the logs are mirrored to kilo-dev.log files for frontend and backend.
kilo.dev.log.level
DEBUG, INFO, WARN, ERROR, OFFINFODEBUG to enable detailed chat tracing and lazy log.debug { ... } summaries.kilo.dev.log.chat.content
off: no text previews, metadata onlypreview: sanitized truncated previewsfull: sanitized full contentoffkilo.dev.log.chat.preview.max
kilo.dev.log.chat.content=preview160Where to find the log files:
runIde runs, Kilo writes separate dev log files for each side under the IDE sandbox log directory reported by PathManager.getLogDir().<sandbox log dir>/kilo-frontend/kilo-dev.log<sandbox log dir>/kilo-backend/kilo-dev.loglog_run* sandbox logs for the active run.kilo-frontend/ and kilo-backend/ subdirectories.Recommended combinations:
-Dkilo.dev.log.level=DEBUG -Dkilo.dev.log.chat.content=off
-Dkilo.dev.log.level=DEBUG -Dkilo.dev.log.chat.content=preview -Dkilo.dev.log.chat.preview.max=120
Use off first. Switch to preview only when you need prompt or tool payload hints to diagnose a problem. Use full only for short local reproductions because logs can grow quickly.
You can run ./gradlew buildPlugin directly for local development. Gradle will auto-generate the current-platform CLI binary if backend/build/generated/cli/ is missing.
For production verification:
./gradlew buildPlugin -Pproduction=true