Kts Scripting of Yaml & Json Dialects

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews

    Whatever you are dealing with, you can create a Kotlin DSL for it. If you have any Json dialect, checkout my JsonDsl library, which is part of kt-search. With that you can create simple Kotlin classes to model your DSL using type safe properties and have a run-time modifiable map to add anything it doesn't model. Creating a Yaml version of this is very straightforward and likely something I might do at some point (pull requests welcome).

  • kt-search-kts

    Adds kts scripting to kt-search and provides some convenience around using that from kts.

  • So, that was easily remedied and I now have a companion library that combines that with kotlinx-cli to make writing scripts very straightforward.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • github-workflows-kt

    Authoring GitHub Actions workflows in Kotlin. You won't go back to YAML!

  • One of my team members, Nikky, got annoyed with the verbosity and insane amount of copy-paste reuse needed to drive Github Actions. And true to her nature, promptly fixed it by using and contributing to GitHub Actions Kotlin DSL

  • maven-simple

    Example Maven project demonstrating the use of

  • #!/usr/bin/env kotlin @file:Repository("https://jitpack.io") @file:Repository("https://maven.tryformation.com/releases") @file:DependsOn("com.github.jillesvangurp:kt-search-kts:0.1.3") import com.jillesvangurp.ktsearch.ClusterStatus import com.jillesvangurp.ktsearch.clusterHealth import com.jillesvangurp.ktsearch.kts.addClientParams import com.jillesvangurp.ktsearch.kts.searchClient import com.jillesvangurp.ktsearch.root import kotlinx.cli.ArgParser import kotlinx.coroutines.runBlocking val parser = ArgParser("script") val searchClientParams = parser.addClientParams() parser.parse(args) val client = searchClientParams.searchClient // now use the client as normally in a runBlocking block runBlocking { val clusterStatus=client.clusterHealth() client.root().let { rootResp -> println( """ Cluster name: ${rootResp.clusterName} Search Engine distribution: ${rootResp.version.distribution} Version: ${rootResp.version.number} Status: ${clusterStatus.status} """.trimIndent() ) } }

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts