{"id":38773782,"url":"https://github.com/ngdinhtoan/slackcmd","last_synced_at":"2026-01-17T12:10:13.233Z","repository":{"id":33861511,"uuid":"37568844","full_name":"ngdinhtoan/slackcmd","owner":"ngdinhtoan","description":"A simple server to receive and handle Slack Commands for Golang","archived":false,"fork":false,"pushed_at":"2016-07-11T01:46:14.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-24T16:59:40.714Z","etag":null,"topics":["slack","slack-commands"],"latest_commit_sha":null,"homepage":"","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/ngdinhtoan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-17T02:50:16.000Z","updated_at":"2017-04-25T03:43:36.000Z","dependencies_parsed_at":"2022-08-07T23:30:17.485Z","dependency_job_id":null,"html_url":"https://github.com/ngdinhtoan/slackcmd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ngdinhtoan/slackcmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngdinhtoan%2Fslackcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngdinhtoan%2Fslackcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngdinhtoan%2Fslackcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngdinhtoan%2Fslackcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngdinhtoan","download_url":"https://codeload.github.com/ngdinhtoan/slackcmd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngdinhtoan%2Fslackcmd/sbom","scorecard":{"id":683042,"data":{"date":"2025-08-11","repo":{"name":"github.com/ngdinhtoan/slackcmd","commit":"ff465e6cbd7fed975d6311c99a325d410bfc07d1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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":-1,"reason":"no releases found","details":null,"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"}}]},"last_synced_at":"2025-08-21T23:48:53.559Z","repository_id":33861511,"created_at":"2025-08-21T23:48:53.559Z","updated_at":"2025-08-21T23:48:53.559Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"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":["slack","slack-commands"],"created_at":"2026-01-17T12:10:13.117Z","updated_at":"2026-01-17T12:10:13.224Z","avatar_url":"https://github.com/ngdinhtoan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SlackCmd\n\n*A simple server to receive and handle Slack Commands written in GO (also known as Golang)*\n\n[![Build Status](https://travis-ci.org/ngdinhtoan/slackcmd.svg)](https://travis-ci.org/ngdinhtoan/slackcmd)\n[![Coverage Status](https://coveralls.io/repos/github/ngdinhtoan/slackcmd/badge.svg)](https://coveralls.io/github/ngdinhtoan/slackcmd)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ngdinhtoan/slackcmd)](https://goreportcard.com/report/github.com/ngdinhtoan/slackcmd)\n[![GoDoc](https://godoc.org/github.com/ngdinhtoan/slackcmd?status.svg)](https://godoc.org/github.com/ngdinhtoan/slackcmd)\n\n### Install and import SlackCmd\n\nOf course, you have to [install GO](https://golang.org/doc/install) first if you do not have GO on your system.\n\nGet SlackCmd by running command\n\n    go get github.com/ngdinhtoan/slackcmd\n\nand import slackcmd package into your project\n\n```go\nimport \"github.com/ngdinhtoan/slackcmd\"\n```\n\nIf you want to use stable version,\ndon't want the changes in master branch affect to your project,\nuse SlackCmd `v1` by\n\n```go\nimport slackcmd \"gopkg.in/ngdinhtoan/slackcmd.v1\"\n```\n\n### How to use SlackCmd\n\nCheckout package `github.com/ngdinhtoan/slackcmd/example` to see how to use it\n\n#### How to write new commander\n\nIt is quite simple to write a new commander.\n\nBelow example will show you how to implement a commander to handle `/hello` command\n\n```go\n// $GOPATH/src/hello/hello.go\npackage hello\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\n\t\"github.com/ngdinhtoan/slackcmd\"\n)\n\nfunc init() {\n\t// auto register hellworld commander when import hello package\n\tslackcmd.Register(\u0026helloworld{})\n}\n\ntype helloworld struct{}\n\n// ensure that you do not miss any function of Commander interface\nvar _ slackcmd.Commander = (*helloworld)(nil)\n\n// GetCommand return hello command\nfunc (h *helloworld) GetCommand() []string {\n\treturn []string{\"/hello\"}\n}\n\n// Validate payload always return nil\nfunc (h *helloworld) Validate(payload *slackcmd.Payload) error {\n\treturn nil\n}\n\n// Execute will say hello to user, who enter /hello command\nfunc (h *helloworld) Execute(payload *slackcmd.Payload, w http.ResponseWriter) error {\n\tmsg := \"Hello \"\n\n\tif payload.Text != \"\" {\n\t\tmsg += payload.Text\n\t} else {\n\t\tmsg += \"World\"\n\t}\n\n\tio.WriteString(w, msg)\n\treturn nil\n}\n```\n\nNow use it in your app\n\n```go\n// $GOPATH/src/hello/app/main.go\npackage main\n\nimport (\n\t_ \"hello\" // just import it, init function will register hello command\n\n\t\"github.com/ngdinhtoan/slackcmd\"\n)\n\nfunc main() {\n\tslackcmd.StartServer(\"localhost\", \"9191\", \"/\")\n}\n```\n\nRun app by `go run` and your server will listen at address loalhost:9191.\nSend a test request:\n\n    curl -X POST -d token=gIkuvaNzQIHg97ATvDxqgjtO \\\n                 -d team_id=T0001 \\\n                 -d team_domain=example \\\n                 -d user_id=U2147483697 \\\n                 -d user_name=Steve \\\n                 -d channel_id=C2147483705 \\\n                 -d channel_name=test \\\n                 -d command=/hello \\\n                 -d text=SlackCmd \\\n                 -- http://localhost:9191\n\nthe output should be:\n\n    Hello SlackCmd\n\n#### Use package `webhook` to send rich message to Slack\n\n    import \"github.com/ngdinhtoan/slackcmd/webhook\"\n\n[![GoDoc](https://godoc.org/github.com/ngdinhtoan/slackcmd/webhook?status.svg)](https://godoc.org/github.com/ngdinhtoan/slackcmd/webhook)\n\nData that is sent to `http.ResponseWriter` will only be visible to the user who issued the command.\n\nIf the command needs to post to a channel so that all members can see it,\nyou need to use incomming webhook to send message to channel.\n\nYou can check package `github.com/ngdinhtoan/slackcmd/jira` as an example.\n\n### Contribution\n\nIf you have a contribution, new commander or any idea to share, feel free to create a pull request or open a ticket,\nor join to chat [![Gitter](https://badges.gitter.im/ngdinhtoan/slackcmd.svg)](https://gitter.im/ngdinhtoan/slackcmd?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge).\n\n### License\n\nSlackCmd is licensed under the [MIT License](https://github.com/ngdinhtoan/slackcmd/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngdinhtoan%2Fslackcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngdinhtoan%2Fslackcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngdinhtoan%2Fslackcmd/lists"}