kkon

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 1 Imported by: 0

README

kkon CLI

Go Go Report Card Go Version Latest Release Go Reference


A command-line interface for managing Kafka Connect connectors via the Kafka Connect REST API. kkon focuses on providing a fast, simple, and interactive CLI experience for day-to-day connector operations.


Overview

kkon is a Go-based CLI tool designed to interact with Kafka Connect clusters. It creates a lightweight client for the Kafka Connect REST API and exposes common connector management operations through an intuitive command-line interface.

The tool is intended for developers and operators who want a straightforward way to list, inspect, back up, create, and delete connectors without manually interacting with REST endpoints.


Features

  • List running Kafka Connect connectors with live status badges (RUNNING / FAILED / PAUSED)
  • View connector configurations
  • Create connectors from predefined templates (RabbitMQ, S3 Sink, JDBC, Debezium Postgres)
  • Delete existing connectors
  • Update connector configuration with a before→after diff view
  • Back up connector configurations to JSON files
  • Health-check with per-task error trace preview for failed tasks
  • Interactive CLI prompts (arrow-key navigation, cancel option on every prompt)
  • Connection test after saving credentials
  • Basic auth support
  • Simple configuration-driven setup
  • JSON output for all read commands (--output json)

Installation

Download the latest binary for your platform from the Releases page, then make it executable:

chmod +x kkon
mv kkon /usr/local/bin/kkon
Install with Go
go install github.com/Maksim-Gr/kkon@latest
Build from source
git clone https://github.com/Maksim-Gr/kkon.git
cd kkon
go build -o kkon

Configuration

On first run kkon will prompt you to configure a Kafka Connect endpoint. You can also run configuration manually at any time:

kkon config set

Config file location:

Platform Path
Linux / macOS ~/.config/kkon/config.yaml
Windows %USERPROFILE%\.config\kkon\config.yaml

Example config:

kafkaConnect:
  url: http://localhost:8083
  username: ""
  password: ""

Usage

kkon --help
Connector commands
kkon connector list                      # List connectors with status badges
kkon connector create                    # Create from template (RabbitMQ, S3 Sink, JDBC, Debezium Postgres)
kkon connector create -f connector.json  # Create from JSON file
kkon connector update                    # Update connector config (shows before→after diff)
kkon connector delete                    # Delete a connector (interactive)
kkon connector health-check              # Show connector and task statuses with error traces
Task commands
kkon task list -c <name>      # List tasks for a connector
kkon task get  -c <name>      # Get task status
kkon task restart -c <name>   # Restart a task
Config commands
kkon config set               # Set Kafka Connect URL and credentials
kkon config show              # Display current configuration
kkon connector backup         # Backup all connector configs to JSON
kkon connector backup --dir ./backup
Global flags
--dry-run, -d        Preview actions without making any API calls
--output, -o <fmt>   Output format: text (default) or json

Backup Example

The backup command retrieves all connector configurations from the Kafka Connect cluster and stores them in a timestamped JSON file:

kkon connector backup --dir ./backup

This allows connector configurations to be versioned, reviewed, or restored later.


Roadmap

  • Additional connector templates
  • Table output format (--output table)

Project Status

kkon is stable and actively used for connector lifecycle management. Releases follow semantic versioning (v1.x); new connector templates and API features continue to be added in backward-compatible minor releases.


Contributing

Contributions, bug reports, and feature requests are welcome.

  • Check open issues before submitting a duplicate
  • Fork the repository and open a pull request against main
  • Follow the existing code style (gofmt, go vet)
  • Integration tests require Docker; run make test

References

Documentation

Overview

Package main is the entry point for the gk CLI tool.

Directories

Path Synopsis
cmd
Package cmd contains the root command and CLI entry point.
Package cmd contains the root command and CLI entry point.
config
Package config provides CLI commands for managing kkon configuration.
Package config provides CLI commands for managing kkon configuration.
connector
Package connector provides CLI commands for managing Kafka Connect connectors.
Package connector provides CLI commands for managing Kafka Connect connectors.
task
Package task provides CLI commands for managing Kafka Connect tasks.
Package task provides CLI commands for managing Kafka Connect tasks.
internal
connector
Package connector provides an HTTP client for the Kafka Connect REST API.
Package connector provides an HTTP client for the Kafka Connect REST API.
connector/kafka/templates
Package templates provides default configurations for predefined Kafka connectors.
Package templates provides default configurations for predefined Kafka connectors.
util
Package util provides shared configuration loading and helper utilities.
Package util provides shared configuration loading and helper utilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL