kx
is a flexible and extensible command-line framework, designed to help developers build and manage their own CLI tools under a unified entry point.
In addition to providing a solid foundation for custom commands, kx
also comes with several built-in commands for common automation and data processing tasks, such as web data fetching, cookie management, and JSON-to-CSV conversion.
- Developers who need a lightweight, Kotlin-based CLI framework to organize internal tools.
- Teams looking for a unified way to expose multiple automation tasks under a single entry point.
- Data engineers and automation specialists who need ready-to-use commands for fetching, transforming, and processing data.
- Anyone who wants a flexible, extensible CLI framework.
Subcommand | Description |
---|---|
fetch |
Fetch webpage content and save it to a file |
browser |
Open browser for automation |
dom2json |
Convert XML/HTML DOM to JSON |
json2csv |
Convert JSON into CSV files |
The latest self-contained executables can be downloaded from Latest Release. You can choose to download the all-in-one executable or the individual command executable.
With Java 17+ installed, you can run:
./kx <command> <parameters> [options]
./kx fetch https://example.com --output page.html
./kx browser https://example.com/login save-cookie --cookie-file cookies.json
./kx json2csv data.json -r '$.data[*]' --output data.csv
./kx dom2json --json-path '$..a[?(@.@href =~ /.*\.xml$/ && @.#text =~ /.*\.xml$/)].@abs:href https://example.com/index.html'
kx
is designed to be easily extensible. You can define your own commands by implementing a simple Kotlin interface, making it ideal for:
- Custom automation pipelines
- Internal developer tools
- Workflow automation across teams
The framework handles command parsing, argument validation, and command dispatching, so you can focus entirely on your business logic.
To see available commands:
./kx --help
To see options for a specific command:
./kx <command> --help
For example:
./kx fetch --help
- Java 17 or later
- Works on Windows, macOS, and Linux
- ✅ Extensible CLI Framework: Clean structure for organizing your commands.
- ✅ Batteries Included: Useful commands provided out of the box.
- ✅ Kotlin-Powered: Modern and developer-friendly.
- ✅ Production-Ready: Designed for real-world data processing and automation tasks.
This project is licensed under the Apache License 2.0.