{"id":20105798,"url":"https://github.com/thbkrkr/qli","last_synced_at":"2026-05-08T22:33:38.519Z","repository":{"id":78589175,"uuid":"63134229","full_name":"thbkrkr/qli","owner":"thbkrkr","description":"Kafka experiments","archived":false,"fork":false,"pushed_at":"2018-05-18T19:46:03.000Z","size":6914,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T17:48:18.074Z","etag":null,"topics":["kafka"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thbkrkr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-07-12T06:56:17.000Z","updated_at":"2020-12-02T21:03:40.000Z","dependencies_parsed_at":"2023-05-02T02:16:20.265Z","dependency_job_id":null,"html_url":"https://github.com/thbkrkr/qli","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/thbkrkr/qli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fqli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fqli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fqli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fqli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thbkrkr","download_url":"https://codeload.github.com/thbkrkr/qli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thbkrkr%2Fqli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32800219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["kafka"],"created_at":"2024-11-13T17:48:09.457Z","updated_at":"2026-05-08T22:33:38.505Z","avatar_url":"https://github.com/thbkrkr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qli\n\n[![Build Status](https://travis-ci.org/thbkrkr/qli.svg)](https://travis-ci.org/thbkrkr/qli)\n\nSome Kafka experiments.\n\nRequires configuring the env vars:\n\n```sh\nexport B=k4fk4.io:9093\nexport T=topic\nexport U=user\nexport P=password\n```\n\n### qli/oq\n\nSimple CLI to produce and consume data.\n\nProduce:\n```sh\n\u003e fortune -s | oq\n```\n\nConsume:\n```\n\u003e oq\nToday is what happened to yesterday.\n```\n\n### qli/client\n\nA Go client to simply produce and consume.\n\n```go\n// Create client\nq, err := client.NewClientFromEnv(client)\n\n// Produce one message synchronously\npartition, offset, err := q.Send(data)\n\n// Produce messages asynchronously\npub, err := q.Pub()\npub, err := q.PubOn(topic)\n\nfor stdin.Scan() {\n  pub \u003c- stdin.Bytes()\n}\n\n// Consume messages asynchronously\nsub, err := q.Sub()\nsub, err := q.SubOn(topic)\n\nfor msg := range sub {\n  fmt.Println(string(msg))\n}\n```\n\n### qli/qws\n\nProduce or consume in Kafka over WebSockets.\n\n### qli/bot\n\nRegister scripts or go funcs to be executed when a message contains a string.\n\n```go\nbot.NewBot(fmt.Sprintf(\"koko-%s-bot\", hostname)).\n  RegisterScript(\"bam\", \"scripts/bam.sh\").\n  RegisterCmdFunc(\"ping\", func(args ...string) string {\n    return \"pong\"\n  }).\n  Start()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthbkrkr%2Fqli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthbkrkr%2Fqli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthbkrkr%2Fqli/lists"}