{"id":20355881,"url":"https://github.com/hedzr/consul-tags","last_synced_at":"2026-03-06T10:05:58.889Z","repository":{"id":57512560,"uuid":"87887953","full_name":"hedzr/consul-tags","owner":"hedzr","description":"A CLI tool to Update, add, remove the service tags at consul store.","archived":false,"fork":false,"pushed_at":"2025-03-13T03:38:12.000Z","size":278,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T02:54:08.795Z","etag":null,"topics":["cmdr","consul","consul-service","consul-tags","devops","golang","modify","tags","update"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hedzr.png","metadata":{"files":{"readme":"README-0.3.2.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-11T04:23:18.000Z","updated_at":"2025-03-13T03:38:16.000Z","dependencies_parsed_at":"2024-06-20T09:20:19.115Z","dependency_job_id":"e648804f-e527-4d04-951c-1899e13393da","html_url":"https://github.com/hedzr/consul-tags","commit_stats":{"total_commits":111,"total_committers":2,"mean_commits":55.5,"dds":"0.027027027027026973","last_synced_commit":"5a56fbc8ec86afd76e249eef0ce144d1e641e4bf"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/hedzr/consul-tags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedzr%2Fconsul-tags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedzr%2Fconsul-tags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedzr%2Fconsul-tags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedzr%2Fconsul-tags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hedzr","download_url":"https://codeload.github.com/hedzr/consul-tags/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedzr%2Fconsul-tags/sbom","scorecard":{"id":459537,"data":{"date":"2025-08-11","repo":{"name":"github.com/hedzr/consul-tags","commit":"4323766240c64cd8b2295f099966cbf2adcbd908"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 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":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"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":"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: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:335: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:342: update your workflow using https://app.stepsecurity.io/secureworkflow/hedzr/consul-tags/go.yml/master?enable=pin","Warn: containerImage not pinned by hash: app.Dockerfile:12","Warn: containerImage not pinned by hash: ci/docker-onbuild/Dockerfile:1: pin your Docker image by updating golang:onbuild to golang:onbuild@sha256:c0ec19d49014d604e4f62266afd490016b11ceec103f0b7ef44875801ef93f36","Warn: downloadThenRun not pinned by hash: build.sh:111","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"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":"Signed-Releases","score":6,"reason":"3 out of the last 4 releases have a total of 3 signed artifacts.","details":["Warn: release artifact v0.8.0 not signed: https://api.github.com/repos/hedzr/consul-tags/releases/181887955","Info: signed release artifact: binaries.asc: https://github.com/hedzr/consul-tags/releases/tag/v0.7.3","Info: signed release artifact: binaries.asc: https://github.com/hedzr/consul-tags/releases/tag/v0.7.1","Info: signed release artifact: binaries.asc: https://github.com/hedzr/consul-tags/releases/tag/v0.7.0","Warn: release artifact v0.8.0 does not have provenance: https://api.github.com/repos/hedzr/consul-tags/releases/181887955","Warn: release artifact v0.7.3 does not have provenance: https://api.github.com/repos/hedzr/consul-tags/releases/134559882","Warn: release artifact v0.7.1 does not have provenance: https://api.github.com/repos/hedzr/consul-tags/releases/92931331","Warn: release artifact v0.7.0 does not have provenance: https://api.github.com/repos/hedzr/consul-tags/releases/92931035"],"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/go.yml:131"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 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":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"}}]},"last_synced_at":"2025-08-19T10:43:40.436Z","repository_id":57512560,"created_at":"2025-08-19T10:43:40.436Z","updated_at":"2025-08-19T10:43:40.436Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"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":["cmdr","consul","consul-service","consul-tags","devops","golang","modify","tags","update"],"created_at":"2024-11-14T23:14:23.097Z","updated_at":"2026-03-06T10:05:58.866Z","avatar_url":"https://github.com/hedzr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consul Service Tags Modifier\n\n[![GitHub version](https://badge.fury.io/gh/hedzr%2Fconsul-tags.svg)](https://badge.fury.io/gh/hedzr%2Fconsul-tags)\n[![Build Status](https://travis-ci.org/hedzr/consul-tags.svg?branch=master)](https://travis-ci.org/hedzr/consul-tags)\n[![license](https://img.shields.io/github/license/hedzr/consul-tags.svg)]()\n[![Docker Automated buil](https://img.shields.io/docker/automated/hedzr/consul-tags.svg)]()\n[![Docker Pulls](https://img.shields.io/docker/pulls/hedzr/consul-tags.svg)]()\n\u003c!-- [![GitHub tag](https://img.shields.io/github/tag/hedzr/consul-tags.svg)]() --\u003e\n\u003c!-- [![ImageLayers Size](https://img.shields.io/imagelayers/image-size/hedzr/consul-tags/latest.svg)]() --\u003e\n\n`consul-tags` can add, remove tag(s) of a consul service (one or all its instances).\n\nHere is a first release for key functionality.\n\n\n## Install\n\n### Binary\n\nDownload binary from [Release](../../releases/latest) page.\n\n### Docker Hub\n\n```bash\ndocker pull hedzr/consul-tags\ndocker run -it --rm hedzr/consul-tags --addr 192.168.0.71:8500 ms --name test-redis tags ls\n```\n\nReplace `192.168.0.71` with your consul center ip or name.\n\nDON'T use `127.0.0.1` with dockerize release.\n\n\u003e latest: master branch and based on golang:alpine\n\n\n### Go Build\n\nclone the repo and build:\n\n```bash\ngo build -o consul-tags github.com/hedzr/consul-tags\n```\n\nmixin:\n\n```bash\ngo get -u github.com/hedzr/consul-tags/objects/consul\n```\n\n\n## Usage\n\n\n```bash\n# list tags\nconsul-tags ms --name test-redis tags ls\n# add tags\nconsul-tags ms --name test-redis tags --add a,c,e\nconsul-tags ms --name test-redis tags --add a --add c --add e\n# remove tags\nconsul-tags ms --name test-redis tags --rm a,c,e\nconsul-tags ms --name test-redis tags --rm a --rm c --rm e\n# by id\nconsul-tags ms --id test-redis-1 tags ls\n\n# toggle master/slave\nconsul-tags ms --name test-redis tags toggle --addr 10.7.13.1:6379 --set role=master --reset role=slave\nconsul-tags ms --name test-mq tags toggle --addr 10.7.16.3:5672 --set role=leader,type=ram --reset role=peer,type=disk\n\n# get commands and sub-commands help\nconsul-tags ms -h\n# get help: -h or --help\nconsul-tags -h\n```\n\nDefault consul address is `consul.ops.local:8500`, can be overriden with environment variable `CONSUL_ADDR` (host:port), too. Such as:\n\n```\nCONSUL_ADDR=127.0.0.1:8500 consul-tags ms --name=consul tags ls\n# or\nexport CONSUL_HOST=ns2.company.domain:8500\nconsul-tags --help\n# or\nconsul-tags --addr 127.0.0.1:8500 ms --name=consul tags ls \n```\n\n### COMMANDS:\n\n```\n     kv           K/V pair Operations, ...\n     ms, service  Microservice Operations, ...\n     help, h      Shows a list of commands or help for one command\n```\n\n### GLOBAL OPTIONS:\n\n```\n   --addr HOST[:PORT], -a HOST[:PORT]  Consul address and port: HOST[:PORT] (No leading 'http(s)://') (default: \"consul.ops.local\") [$CONSUL_ADDR]\n   --port value, -p value              Consul port (default: 8500) [$CONSUL_PORT]\n   --prefix value                      Root key prefix (default: \"/\") [$CONSUL_PREFIX]\n   --cacert value, -r value            Client CA cert [$CONSUL_CA_CERT]\n   --cert value, -t value              Client cert [$CONSUL_CERT]\n   --scheme value, -s value            Consul connection scheme (HTTP or HTTPS) (default: \"http\") [$CONSUL_SCHEME]\n   --insecure, -K                      Skip TLS host verification (default: false) [$CONSUL_INSECURE]\n   --username value, -U value          HTTP Basic auth user [$CONSUL_USER]\n   --password value, -P value          HTTP Basic auth password [$CONSUL_PASS]\n   --key value, -Y value               Client key [$CONSUL_KEY]\n   --help, -h                          show help (default: false)\n   --init-completion value             generate completion code. Value must be 'bash' or 'zsh'\n   --version, -v                       print the version (default: false)\n```\n\n## Shell completion\n\nwith bonus from `urfave/cli`, you can install auto-completion for this binary:\n\n```bash\neval \"`consul-tags --init-completion bash`\"\nconsul-tags --init-completion bash \u003e\u003e ~/.bashrc\n```\n\nor put it to `/etc/bash_completion.d/`:\n\n```bash\ncp bin/consul-tags /usr/local/bin/\n/usr/local/bin/consul-tags --init-completion bash | sudo tee /etc/bash_completion.d/consul-tags\nsource /etc/bash_completion.d/consul-tags\n```\n\nSee also [Shell Completion](https://github.com/urfave/cli/tree/v2#shell-completion).\n\nzsh: DOC TODO\n\nMac: DOC TODO\n\n\n## Thanks\n\nmy plan is building a suite of devops. consul operations is part of it. exception consul tags modifying operation, these codes ported in:\n\n- [colebrumley/consul-kv-backup](https://github.com/colebrumley/consul-kv-backup)\n\nand some repositories are good:\n\n- https://github.com/shreyu86/consul-backup\n- https://github.com/kailunshi/consul-backup\n\n### Third-party repos\n\nMuch more and mutable, not list here. But one of them:\n\n- https://github.com/urfave/cli/tree/v2\n\n\n\n## License\n\nMIT.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedzr%2Fconsul-tags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhedzr%2Fconsul-tags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedzr%2Fconsul-tags/lists"}