Introduction
Install the framework
What to install, which version to pin, and how a new application gets the Kest packages from GitHub Packages or JitPack.
This page takes you from an empty machine to a running Kest application. The documentation is at https://kest.rokenite.com. The current release is 0.4.0. Pin it: a Kest project that does not name a version is pinned to an unreleased snapshot.
1. What you need
| Tool | Version | Check with |
|---|---|---|
| JDK | 21 or newer (Kest is compiled for Java 21) | java -version |
| Gradle | 9.x, or use the project's ./gradlew wrapper | gradle -version |
| Git | any recent version | git --version |
Set JAVA_HOME to the JDK 21 installation if java -version reports an older version. The kest command line tool refuses to start on an older JVM.
2. Install the kest command line tool
On macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/jamie-codez/kest/main/install.sh | bash
export PATH="$HOME/.kest/bin:$PATH" # add this line to ~/.zshrc or ~/.bashrc
kest versionTo install a specific release, set KEST_VERSION:
curl -fsSL https://raw.githubusercontent.com/jamie-codez/kest/main/install.sh | KEST_VERSION=0.4.0 bashThe install page covers updating and removing the tool.
3. Create an application, pinned to a version
kest new shop --package com.acme.shop --kest-version 0.4.0
cd shopAlways pass --kest-version. The tool's default is an unreleased snapshot (0.1.0-SNAPSHOT) that is not published anywhere, so a project created without the flag will not resolve its dependencies.
The generated build.gradle.kts imports the framework's bill of materials, so every Kest package uses one version:
dependencies {
implementation(platform("io.kest.framework:bom:0.4.0"))
implementation("io.kest.framework:core")
implementation("io.kest.framework:http-server")
implementation("io.kest.framework:http-server-netty")
implementation("io.kest.framework:json-jackson")
ksp(platform("io.kest.framework:bom:0.4.0")) // the BOM must be applied to ksp as well
ksp("io.kest.framework:processor")
}The ksp lines are what generate the module wiring at compile time. Leave them in place.
4. Give the build access to the packages
Kest publishes to two places. Choose one.
Option A: GitHub Packages (the default in generated projects)
GitHub Packages needs a token to download packages, even for public ones. The generated build reads the token from ~/.gradle/gradle.properties, so it never sits in the project:
- Create a GitHub personal access token (classic) with the
read:packagesscope. - Add these lines to
~/.gradle/gradle.properties:
gpr.user=your-github-username
gpr.token=ghp_yourtokenOr set the GITHUB_ACTOR and GITHUB_TOKEN environment variables for one shell session.
Option B: JitPack (no token)
JitPack builds Kest from its release tag on first request. The release v0.4.0 is already built. In build.gradle.kts, add the JitPack repository and use JitPack's coordinates, which are the group com.github.jamie-codez.kest, the module name, and the tag:
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation(platform("com.github.jamie-codez.kest:bom:v0.4.0"))
implementation("com.github.jamie-codez.kest:core:v0.4.0")
implementation("com.github.jamie-codez.kest:http-server:v0.4.0")
implementation("com.github.jamie-codez.kest:http-server-netty:v0.4.0")
implementation("com.github.jamie-codez.kest:json-jackson:v0.4.0")
ksp("com.github.jamie-codez.kest:processor:v0.4.0")
}JitPack's build of a tag can take several minutes the first time. Watch its build log on the JitPack page if a dependency does not resolve at once.
5. Run it
./gradlew run # starts the application
./gradlew test # runs the generated testsThen open http://localhost:8080. The generated controller answers there, and the API reference is at /docs when the application enables it.
6. Start from a preview channel
dev publishes prereleases such as 0.4.1-dev.1. Use them to try what is coming, and not for production. Pin an exact version in your build, and read the changelog before you upgrade.
Troubleshooting
Could not find io.kest.framework:...: the token is missing or lacksread:packages, or the project was created without--kest-version.UnsupportedClassVersionError: the JVM is older than 21. SetJAVA_HOMEto a JDK 21.No generated descriptor ...: theksplines are missing from the build file. The processor generates the module wiring, so it has to run.