{"id":13694324,"url":"https://github.com/kujtimiihoxha/kit","last_synced_at":"2025-10-09T01:25:29.192Z","repository":{"id":26347223,"uuid":"104069675","full_name":"kujtimiihoxha/kit","owner":"kujtimiihoxha","description":"GoKit CLI ","archived":false,"fork":false,"pushed_at":"2022-05-16T17:50:09.000Z","size":9416,"stargazers_count":728,"open_issues_count":25,"forks_count":163,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-08-13T18:31:55.495Z","etag":null,"topics":["go-kit","gokit","golang","kit"],"latest_commit_sha":null,"homepage":null,"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/kujtimiihoxha.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}},"created_at":"2017-09-19T12:04:52.000Z","updated_at":"2025-07-30T21:09:01.000Z","dependencies_parsed_at":"2022-08-07T12:00:23.872Z","dependency_job_id":null,"html_url":"https://github.com/kujtimiihoxha/kit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kujtimiihoxha/kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujtimiihoxha%2Fkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujtimiihoxha%2Fkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujtimiihoxha%2Fkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujtimiihoxha%2Fkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kujtimiihoxha","download_url":"https://codeload.github.com/kujtimiihoxha/kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kujtimiihoxha%2Fkit/sbom","scorecard":{"id":573131,"data":{"date":"2025-08-11","repo":{"name":"github.com/kujtimiihoxha/kit","commit":"1b3acb7daa92198719555da57844f30c239e9a06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 5/17 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: MIT License: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.1.1 not signed: https://api.github.com/repos/kujtimiihoxha/kit/releases/18168053","Warn: release artifact v0.1.1 does not have provenance: https://api.github.com/repos/kujtimiihoxha/kit/releases/18168053"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T16:53:24.516Z","repository_id":26347223,"created_at":"2025-08-20T16:53:24.516Z","updated_at":"2025-08-20T16:53:24.516Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000722,"owners_count":26082894,"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-10-08T02:00:06.501Z","response_time":56,"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":["go-kit","gokit","golang","kit"],"created_at":"2024-08-02T17:01:29.393Z","updated_at":"2025-10-09T01:25:29.168Z","avatar_url":"https://github.com/kujtimiihoxha.png","language":"Go","funding_links":[],"categories":["开源类库","Open source library","Go"],"sub_categories":["微服务","Microservices"],"readme":"# GoKit CLI  [![Build Status](https://travis-ci.org/kujtimiihoxha/kit.svg?branch=master)](https://travis-ci.org/kujtimiihoxha/kit)[![Go Report Card](https://goreportcard.com/badge/github.com/kujtimiihoxha/kit)](https://goreportcard.com/report/github.com/kujtimiihoxha/kit)[![Coverage Status](https://coveralls.io/repos/github/kujtimiihoxha/kit/badge.svg?branch=master)](https://coveralls.io/github/kujtimiihoxha/kit?branch=master)\nThis project is a more advanced version of [gk](https://github.com/kujtimiihoxha/gk).\nThe goal of the gokit cli is to be a tool that you can use while you develop your microservices with `gokit`.\n\nWhile `gk` did help you create your basic folder structure it was not really able to be used further on in your project.\nThis is what `GoKit Cli` is aiming to change.\n\n\n# Prerequisites \nGoKit Cli needs to be installed using `go get` and `go install` so `Go` is a requirement to be able to test your services\n[gokit](https://github.com/go-kit/kit) is needed.\n\nTo utilise generation of gRPC service code through `kit generate service \u003cSERVICE_NAME\u003e -t grpc` you will need to install the [grpc prequisites](https://grpc.io/docs/quickstart/go/).\n```\ngo get -u google.golang.org/grpc\ngo get -u github.com/golang/protobuf/protoc-gen-go\n```\n\n# Table of Content\n - [Installation](#installation)\n - [Usage](#usage)\n - [Create a new service](#create-a-new-service)\n - [Generate the service](#generate-the-service)\n - [Generate the client library](#generate-the-client-library)\n - [Generate new middlewares](#generate-new-middleware)\n - [Enable docker integration](#enable-docker-integration)\n \n# Installation\nBefore you install please read [prerequisites](#prerequisites)\n```bash\ngo get github.com/kujtimiihoxha/kit\n```\n# Usage\n```bash\nkit help\n```\n\nAlso read this [medium story](https://medium.com/@kujtimii.h/creating-a-todo-app-using-gokit-cli-20f066a58e1)\n# Create a new service\n```bash\nkit new service hello\nkit n s hello # using aliases\n```\nThis will generate the initial folder structure and the service interface\n\n`service-name/pkg/service/service.go`\n```go\npackage service\n\n// HelloService describes the service.\ntype HelloService interface {\n\t// Add your methods here\n\t// e.x: Foo(ctx context.Context,s string)(rs string, err error)\n}\n```\n\n# Generate the service\n```bash\nkit g s hello\nkit g s hello --dmw # to create the default middleware\nkit g s hello -t grpc # specify the transport (default is http)\n```\nThis command will do these things:\n- Create the service boilerplate: `hello/pkg/service/service.go`\n- Create the service middleware: `hello/pkg/service/middleware.go`\n- Create the endpoint:  `hello/pkg/endpoint/endpoint.go` and `hello/pkg/endpoint/endpoint_gen.go`\n- If using` --dmw` create the endpoint middleware: `hello/pkg/endpoint/middleware.go`\n- Create the transport files e.x `http`: `service-name/pkg/http/handler.go`\n- Create the service main file :boom:   \n`hello/cmd/service/service.go`  \n`hello/cmd/service/service_gen.go`   \n`hello/cmd/main.go`\n\n:warning: **Notice** all the files that end with `_gen` will be regenerated when you add endpoints to your service and \nyou rerun `kit g s hello` :warning: \n\nYou can run the service by running:\n```bash\ngo run hello/cmd/main.go\n```\n\n# Generate the client library\n```bash\nkit g c hello\n```\nThis will generate the client library :sparkles: `http/client/http/http.go` that you can than use to call the service methods, you can use it like this:\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\tclient \"hello/client/http\"\n\t\"github.com/go-kit/kit/transport/http\"\n)\n\nfunc main() {\n\tsvc, err := client.New(\"http://localhost:8081\", map[string][]http.ClientOption{})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tr, err := svc.Foo(context.Background(), \"hello\")\n\tif err != nil {\n\t\tfmt.Println(\"Error:\", err)\n\t\treturn\n\t}\n\tfmt.Println(\"Result:\", r)\n}\n```\n# Generate new middleware\n```bash\nkit g m hi -s hello\nkit g m hi -s hello -e # if you want to add endpoint middleware\n```\nThe only thing left to do is add your middleware logic and wire the middleware with your service/endpoint.\n# Enable docker integration\n\n```bash\nkit g d\n```\nThis will add the individual service docker files and one `docker-compose.yml` file that will allow you to start \nyour services.\nTo start your services just run \n```bash\ndocker-compose up\n```\n\nAfter you run `docker-compose up` your services will start up and any change you make to your code will automatically\n rebuild and restart your service (only the service that is changed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkujtimiihoxha%2Fkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkujtimiihoxha%2Fkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkujtimiihoxha%2Fkit/lists"}