{"id":13764165,"url":"https://github.com/centerorbit/depcharge","last_synced_at":"2026-01-18T06:50:14.905Z","repository":{"id":33053254,"uuid":"142245484","full_name":"centerorbit/depcharge","owner":"centerorbit","description":"DepCharge is a tool designed to help orchestrate the execution of commands across many directories at once.","archived":false,"fork":false,"pushed_at":"2021-12-23T10:42:04.000Z","size":114,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-10-19T21:07:25.085Z","etag":null,"topics":["cli","command-line-tool","dependency-manager","git-submodule","mcollective","orchestration"],"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/centerorbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-25T04:02:09.000Z","updated_at":"2024-01-13T23:58:37.000Z","dependencies_parsed_at":"2022-07-16T05:00:38.119Z","dependency_job_id":null,"html_url":"https://github.com/centerorbit/depcharge","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/centerorbit/depcharge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centerorbit%2Fdepcharge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centerorbit%2Fdepcharge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centerorbit%2Fdepcharge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centerorbit%2Fdepcharge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centerorbit","download_url":"https://codeload.github.com/centerorbit/depcharge/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centerorbit%2Fdepcharge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28532063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["cli","command-line-tool","dependency-manager","git-submodule","mcollective","orchestration"],"created_at":"2024-08-03T15:01:17.286Z","updated_at":"2026-01-18T06:50:14.872Z","avatar_url":"https://github.com/centerorbit.png","language":"Go","funding_links":[],"categories":["Software Packages","DevOps Tools","Go Tools","软件包","Go 工具"],"sub_categories":["DevOps Tools","DevOps 工具","代码分析","devops 工具","DevOps工具"],"readme":"# DepCharge\n[![Go Report Card](https://goreportcard.com/badge/github.com/centerorbit/depcharge)](https://goreportcard.com/report/github.com/centerorbit/depcharge)\n[![Build Status](https://cloud.drone.io/api/badges/centerorbit/depcharge/status.svg)](https://cloud.drone.io/centerorbit/depcharge)\n[![coverage report](https://gitlab.com/centerorbit/depcharge/badges/develop/coverage.svg)](https://gitlab.com/centerorbit/depcharge/commits/develop)\n[![GitHub license](https://img.shields.io/github/license/centerorbit/depcharge.svg)](https://github.com/centerorbit/depcharge/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/centerorbit/depcharge.svg)](https://github.com/centerorbit/depcharge/releases/latest)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5ef8ce4f942696ebace7/maintainability)](https://codeclimate.com/github/centerorbit/depcharge/maintainability)\n\u003ca href=\"https://github.com/avelino/awesome-go\"\u003e\u003cimg src=\"https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg\"\u003e\u003c/a\u003e\n\n\nDepCharge is a tool that helps orchestrate the execution of commands across the many dependencies and directories in larger projects. It also provides an excellent mechanism for self-documenting a project's vast (and often disparate) dependencies.\n\n**Sneak peek:**\n\n\tdepcharge --labels=api -- git clone {{repo}} {{location}}\n\t\nWill run `git clone` across all listed git dependencies with the label of \"api\" in your project (where submodules use to rule the land)\n\n\n## Introduction\n\nBy creating a YAML file that describes all of your project(s) dependencies, you can then execute commands across all of them simultaneously.\n\nA medium-to-large sized project (especially when using a microservice architecture) will consist of 3 or more separate repositories, and rely on a variety of package managers depending on the various languages chosen for each service. Typically, these repos must be managed, tracked, and released in some semblance of unison so that the dependant service calls can be understood and responded to appropriately.\n\nFor small (to single) teams, a single developer will often need to propagating and perform the same commands across all relevant services. This is a tedious, manual, and error-prone process that can occur every release.\n\nDepCharge is designed to help fix that.\n\n## How it Works \u0026 Usage\nDepCharge is a tool designed to help orchestrate the execution of commands across many directories at once. All of the examples here are just that: examples. DepCharge is designed to be as flexible as possible, so if you happen to use tools other than what's listed, they should work as well!\n\nUsage: `depcharge [version] [--help|-h] [--dryrun|-d] [--force|-f] [--kind|-k=\u003ckind\u003e] [--instead|-x=\u003caction\u003e] [[--include|-i][-e|--exclude]] [--labels|-l=\u003ccomma-separated,inherited\u003e] [--serial|-s] -- COMMAND [ARGS...]`\n\n### Features:\n* Built-in mustache templating, allows you to parametrize your commands\n* Supports arbitrary params in YAML, whatever 'params: key: value' pairs you want (particularly useful for mustache templating)\n* Supports YAML anchors\n  * Even went the extra mile to support anchors + sequence merging via `merge-deps:` (see: `YAML Anchors \u0026 Sequences`)\n\n### Description:\n`depcharge` will read the `dep.yml` file in the current working directory, and\nperform all commands relative to that location.\n\n### Example `dep.yml`:\n```\ndeps:\n    - name: frontend\n      kind: git\n      location: ./app/frontend\n      labels:\n        - public\n      params:\n        repo: git@example.com:frontend.git\n      deps:\n        - name: vue.js\n          kind: npm\n    - name: backend\n      kind: git\n      location: ./app/backend\n      labels:\n        - api\n      params:\n        repo: git@example.com:backend.git\n      deps:\n        - name: lumen\n          kind: composer\n```\n\n### Flags\n\n       --version  Displays the program version string.\n    -h --help  Displays help with available flag, subcommand, and positional value parameters.\n    -d --dryrun  Will print out the command to be run, does not make changes to your system.\n    -e --exclusive  Applies labels in an exclusive way (default).\n    -f --force  Will force-run a command without confirmations, could be dangerous.\n    -i --inclusive  Applies labels in an inclusive way.\n    -k --kind  Targets specific kinds of dependencies (i.e. git, npm, composer)\n    -l --labels  Filters to specific labels.\n    -s --serial  Prevents parallel execution, runs commands one at a time.\n    -x --instead  Instead of 'kind', perform a different command.\n\n\n### Example commands:\n\nWill run `git clone \u003crepo\u003e \u003clocation\u003e` across all git dependencies:\n\n\tdepcharge --kind=git -- clone {{repo}} {{location}}\n\t\nOr, shorthand:\n\n\tdepcharge -- git clone {{repo}} {{location}}\n\t\nWill run `git status` across all git dependencies:\n\n\tdepcharge -- git status\n\t\nWill run `npm install` across any npm dependencies that have the label 'public':\n\n\tdepcharge --labels=public -- npm install\n\t\nWill run `composer install` across any composer dependencies that have either the label 'api', or 'soap':\n\n\tdepcharge --inclusive --labels=api,soap -- composer install\n\t\nAnd much more!\n\n## YAML Anchors \u0026 Sequences\nDue to a limitation in YAML itself, you cannot use anchors to merge sequences (arrays). Therefore this is programatically supported within DepCharge.\n\nInvalid YAML, you cannot mix sequences `-` with anchors `*\u003cname\u003e` directly, this doesn't work:\n```yaml\n...\n    deps:\n      - kind: git\n      - *composer\n      - *vue\n...\n```\nIt's a beautiful concept though, that really helps with reusability and simplifies the overall YAML file, and so `merge-deps` was introduced to work around this shortcoming.\n\nWorking around this with merge-deps:\n```yaml\n.vue: \u0026vue\n  - name: Vue.js\n    kind: npm\n.composer: \u0026composer\n  - name: lumen\n    kind: composer\n    \ndeps:\n  - name: ui\n    kind: project\n    location: ./code/app\n    labels:\n      - ui\n    deps:\n      - kind: git\n        params:\n          repo: git@example.com/ui.git\n    merge-deps:\n      - *composer\n      - *vue\n```\n\nIn the above example, `merge-deps:` supports listing your anchors, and these will then be expanded, then flattened and merged into `deps:` before final processing begins.\n\n\n## Special Action Handlers\nDepCharge has the ability to offer special-case action handlers. Specifically for situations where executing bulk commands cause difficulties and/or there are unexpected rough edges.\n\n1. `git clone`\nThis is treated specially, in the sense that a regular clone will not act if parent directories aren't already in place. DepCharge will detect the `clone` action explicitly and attempt to create any parent directories before passing the command directly onto `git`\n\n## Additional Resources\n* https://mustache.github.io/\n\n## Contributing\nSee: [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n- [LICENSE](LICENSE) (Expat/[MIT License][MIT])\n\n[MIT]: http://www.opensource.org/licenses/MIT \"The MIT License (MIT)\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcenterorbit%2Fdepcharge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcenterorbit%2Fdepcharge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcenterorbit%2Fdepcharge/lists"}