{"id":14530368,"url":"https://github.com/dhth/kplay","last_synced_at":"2025-08-18T09:30:49.712Z","repository":{"id":226129222,"uuid":"766324160","full_name":"dhth/kplay","owner":"dhth","description":"Inspect messages in a Kafka topic in a simple and deliberate manner","archived":false,"fork":false,"pushed_at":"2025-08-11T23:37:17.000Z","size":1645,"stargazers_count":43,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T01:25:04.262Z","etag":null,"topics":["bubbletea","kafka","tui"],"latest_commit_sha":null,"homepage":"https://tools.dhruvs.space/kplay","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-03T00:01:31.000Z","updated_at":"2025-08-11T23:37:20.000Z","dependencies_parsed_at":"2024-03-13T12:28:50.687Z","dependency_job_id":"df6ee97b-9ef0-40a0-8daf-cdd55f8ce142","html_url":"https://github.com/dhth/kplay","commit_stats":null,"previous_names":["dhth/kplay"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dhth/kplay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fkplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fkplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fkplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fkplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhth","download_url":"https://codeload.github.com/dhth/kplay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fkplay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270190269,"owners_count":24542249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bubbletea","kafka","tui"],"created_at":"2024-09-05T00:01:06.773Z","updated_at":"2025-08-18T09:30:49.705Z","avatar_url":"https://github.com/dhth.png","language":"Go","funding_links":[],"categories":["Go","\u003ca name=\"viewers\"\u003e\u003c/a\u003eViewers","Applications"],"sub_categories":["Cloud and DevOps"],"readme":"# kplay\n\n[![Build Workflow Status](https://img.shields.io/github/actions/workflow/status/dhth/kplay/main.yml?style=flat-square)](https://github.com/dhth/kplay/actions/workflows/main.yml)\n[![Vulncheck Workflow Status](https://img.shields.io/github/actions/workflow/status/dhth/kplay/vulncheck.yml?style=flat-square\u0026label=vulncheck)](https://github.com/dhth/kplay/actions/workflows/vulncheck.yml)\n[![Latest Release](https://img.shields.io/github/release/dhth/kplay.svg?style=flat-square)](https://github.com/dhth/kplay/releases/latest)\n[![Commits Since Latest Release](https://img.shields.io/github/commits-since/dhth/kplay/latest?style=flat-square)](https://github.com/dhth/kplay/releases)\n\n`kplay` (short for \"kafka-playground\") lets you inspect messages in a Kafka\ntopic in a simple and deliberate manner. Using it, you can pull one or more\nmessages on demand, peruse through them in a list, and, if needed, persist them\nto your local filesystem.\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/c06ec742-06da-4836-ac33-ef25d3a40786\"\u003e\u003c/video\u003e\n\n![tui](https://github.com/user-attachments/assets/613727e7-bca8-4855-b19c-bed2faf80314)\n\n![web](https://github.com/user-attachments/assets/e3af71a2-8f06-4b9b-8e48-f96ad2c0f972)\n\nInstall\n---\n\n**homebrew**:\n\n```sh\nbrew install dhth/tap/kplay\n```\n\n**go**:\n\n```sh\ngo install github.com/dhth/kplay@latest\n```\n\nOr get the binaries directly from a [release][4]. Read more about verifying the\nauthenticity of released artifacts [here](#-verifying-release-artifacts).\n\n⚡️ Usage\n---\n\n`kplay` can display messages via two interfaces: a TUI or a webpage \n\n```text\n$ kplay tui -h\nopen kplay's TUI\n\nUsage:\n  kplay tui \u003cPROFILE\u003e [flags]\n\nFlags:\n  -C, --commit-messages         whether to start the TUI with the setting \"commit messages\" ON (default true)\n  -c, --config-path string      location of kplay's config file (default \"/Users/dhruvthakur/Library/Application Support/kplay/kplay.yml\")\n  -g, --consumer-group string   consumer group to use (overrides the one in kplay's config file)\n      --debug                   whether to only display config picked up by kplay without running it\n  -h, --help                    help for tui\n  -p, --persist-messages        whether to start the TUI with the setting \"persist messages\" ON\n  -s, --skip-messages           whether to start the TUI with the setting \"skip messages\" ON\n```\n\nhttps://github.com/user-attachments/assets/e7a1aa58-21d2-45fd-827a-454445a97e6e\n\n```text\n$ kplay serve -h\nopen kplay's web interface\n\nUsage:\n  kplay serve \u003cPROFILE\u003e [flags]\n\nFlags:\n  -C, --commit-messages         whether to start the web interface with the setting \"commit messages\" ON (default true)\n  -c, --config-path string      location of kplay's config file (default \"/Users/dhruvthakur/Library/Application Support/kplay/kplay.yml\")\n  -g, --consumer-group string   consumer group to use (overrides the one in kplay's config file)\n      --debug                   whether to only display config picked up by kplay without running it\n  -h, --help                    help for serve\n  -o, --open                    whether to open web interface in browser automatically\n  -S, --select-on-hover         whether to start the web interface with the setting \"select on hover\" ON\n```\n\nhttps://github.com/user-attachments/assets/dc52af12-0cc4-41f1-b4f0-9904291fa721\n\n🔧 Configuration\n---\n\nkplay's configuration file looks like the following:\n\n```yaml\nprofiles:\n  - name: json-encoded\n    authentication: none\n    encodingFormat: json\n    brokers:\n      - 127.0.0.1:9092\n    topic: kplay-test-1\n    consumerGroup: kplay-consumer-group-1\n\n  - name: proto-encoded\n    authentication: aws_msk_iam\n    encodingFormat: protobuf\n    protoConfig:\n      descriptorSetFile: path/to/descriptor/set/file.pb\n      descriptorName: sample.DescriptorName\n    brokers:\n      - 127.0.0.1:9092\n    topic: kplay-test-2\n    consumerGroup: kplay-consumer-group-1\n\n  - name: raw\n    authentication: none\n    encodingFormat: raw\n    brokers:\n      - 127.0.0.1:9092\n    topic: kplay-test-3\n    consumerGroup: kplay-consumer-group-1\n```\n\n🔤 Message Encoding\n---\n\n`kplay` supports parsing messages that are encoded in two data formats: JSON and\nprotobuf. It also supports parsing raw data (using the `encodingFormat` \"raw\").\n\n### Parsing protobuf encoded messages\n\nFor parsing protobuf encoded messages, `kplay` needs to be provided with a\n`FileDescriptorSet` and a descriptor name. Consider a .proto file like the\nfollowing:\n\n```text\n// application_state.proto\nsyntax = \"proto3\";\n\npackage sample;\n\nmessage ApplicationState {\n  string id = 1; // required\n  string colorTheme = 2;\n  string backgroundImageUrl = 3;\n  string customDomain = 4;\n}\n```\n\nA `FileDescriptorSet` can be generated for this file using the [protocol buffer\ncompiler][5].\n\n```bash\nprotoc application_state.proto \\\n    --descriptor_set_out=application_state.pb \\\n    --include_imports\n```\n\nThis descriptor set file can then be used in `kplay`'s config file, alongside\nthe `descriptorName` \"sample.ApplicationState\".\n\n\u003e Read more about self describing protocol messages [here][3].\n\n🔑 Authentication\n---\n\nBy default, `kplay` operates under the assumption that brokers do not\nauthenticate requests. Besides this, it supports [AWS IAM authentication][2].\n\n⌨️ TUI Keymaps\n---\n\n### General\n\n| Keymap | Description        |\n|--------|--------------------|\n| `?`    | Show help view     |\n| `q`    | Go back/quit       |\n| `Q`    | Quit from anywhere |\n\n### Message List and Details View\n\n| Keymap                | Description                                                                                                                                  |\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003ctab\u003e`/`\u003cshift-tab\u003e` | Switch focus between panes                                                                                                                   |\n| `j`/`\u003cDown\u003e`          | Move cursor/details pane down                                                                                                                |\n| `k`/`\u003cUp\u003e`            | Move cursor/details pane up                                                                                                                  |\n| `n`                   | Fetch the next message from the topic                                                                                                        |\n| `N`                   | Fetch the next 10 messages from the topic                                                                                                    |\n| `}`                   | Fetch the next 100 messages from the topic                                                                                                   |\n| `s`                   | Toggle skipping mode (if ON, kplay will consume messages, but not populate its internal list, effectively skipping over them)                |\n| `p`                   | Toggle persist mode (if ON, kplay will start persisting messages at the location messages/\u003ctopic\u003e/partition-\u003cpartition\u003e/offset-\u003coffset\u003e.txt) |\n| `c`                   | Toggle commit mode (if OFF, kplay will consume messages without committing them)                                                             |\n| `y`                   | Copy message details to clipboard                                                                                                            |\n| `[`                   | Move to previous item in list                                                                                                                |\n| `]`                   | Move to next item in list                                                                                                                    |\n\n🔐 Verifying release artifacts\n---\n\nIn case you get the `kplay` binary directly from a [release][4], you may want to\nverify its authenticity. Checksums are applied to all released artifacts, and\nthe resulting checksum file is signed using\n[cosign](https://docs.sigstore.dev/cosign/installation/).\n\nSteps to verify (replace `A.B.C` in the commands listed below with the version\nyou want):\n\n1. Download the following files from the release:\n\n    - kplay_A.B.C_checksums.txt\n    - kplay_A.B.C_checksums.txt.pem\n    - kplay_A.B.C_checksums.txt.sig\n\n2. Verify the signature:\n\n   ```shell\n   cosign verify-blob kplay_A.B.C_checksums.txt \\\n       --certificate kplay_A.B.C_checksums.txt.pem \\\n       --signature kplay_A.B.C_checksums.txt.sig \\\n       --certificate-identity-regexp 'https://github\\.com/dhth/kplay/\\.github/workflows/.+' \\\n       --certificate-oidc-issuer \"https://token.actions.githubusercontent.com\"\n   ```\n\n3. Download the compressed archive you want, and validate its checksum:\n\n   ```shell\n   curl -sSLO https://github.com/dhth/kplay/releases/download/vA.B.C/kplay_A.B.C_linux_amd64.tar.gz\n   sha256sum --ignore-missing -c kplay_A.B.C_checksums.txt\n   ```\n\n3. If checksum validation goes through, uncompress the archive:\n\n   ```shell\n   tar -xzf kplay_A.B.C_linux_amd64.tar.gz\n   ./kplay\n   # profit!\n   ```\n\nAcknowledgements\n---\n\n`kplay` is built using the awesome TUI framework [bubbletea][1].\n\n[1]: https://github.com/charmbracelet/bubbletea\n[2]: https://docs.aws.amazon.com/msk/latest/developerguide/iam-access-control.html\n[3]: https://protobuf.dev/programming-guides/techniques/#self-description\n[4]: https://github.com/dhth/kplay/releases\n[5]: https://grpc.io/docs/protoc-installation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhth%2Fkplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhth%2Fkplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhth%2Fkplay/lists"}