{"id":13713263,"url":"https://github.com/kovetskiy/manul","last_synced_at":"2025-04-05T08:03:42.241Z","repository":{"id":57501119,"uuid":"43600968","full_name":"kovetskiy/manul","owner":"kovetskiy","description":":smirk_cat: The madness vendoring utility for Golang programs","archived":false,"fork":false,"pushed_at":"2021-10-10T21:08:53.000Z","size":94,"stargazers_count":663,"open_issues_count":5,"forks_count":33,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T07:01:37.191Z","etag":null,"topics":["dependencies","git","go","golang","manager","manul","submodule","submodules","vendor"],"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/kovetskiy.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-10-03T14:05:13.000Z","updated_at":"2025-03-04T10:37:53.000Z","dependencies_parsed_at":"2022-09-14T19:41:45.254Z","dependency_job_id":null,"html_url":"https://github.com/kovetskiy/manul","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovetskiy%2Fmanul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovetskiy%2Fmanul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovetskiy%2Fmanul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kovetskiy%2Fmanul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kovetskiy","download_url":"https://codeload.github.com/kovetskiy/manul/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305919,"owners_count":20917204,"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","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":["dependencies","git","go","golang","manager","manul","submodule","submodules","vendor"],"created_at":"2024-08-02T23:01:31.096Z","updated_at":"2025-04-05T08:03:42.204Z","avatar_url":"https://github.com/kovetskiy.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# MANUL [![Build Status](https://travis-ci.org/kovetskiy/manul.svg?branch=master)](https://travis-ci.org/kovetskiy/manul) [![License](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/kovetskiy/manul/master/LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/kovetskiy/manul)](https://goreportcard.com/report/github.com/kovetskiy/manul)\n\n![madness](https://cloud.githubusercontent.com/assets/8445924/10410421/ccca8b24-6f30-11e5-9952-9e5be5c4d792.png)\n\nManul is a vendoring utility for Go programs.\n\n## Installation\n\n**manul** can be obtained using `go get`:\n\n```\ngo get github.com/kovetskiy/manul\n```\n\nPackages are also available for [Ubuntu/Debian][pkg-debian] and [Arch Linux][pkg-archlinux].\n\n[pkg-debian]: https://github.com/kovetskiy/manul/tree/pkg-debian#readme\n[pkg-archlinux]: https://github.com/kovetskiy/manul/tree/pkg-archlinux#readme\n\n## What's the reason for yet another utility?\n\nBecause all other vendor utilities suffer from the following:\n\n- Some wrap the `go` binary and spoof the `GOPATH` env variable.\n    You will have a non-go-gettable project which needs additional \n    software in order to *compile and run*;\n\n- Some copy the source code of dependencies into the vendor directory:\n    * It will be nearly impossible to find anything using GitHub Search,\n        because you will get many false-positive results;\n    * Updating dependencies will require manual intervention and committing\n        a lot of modified lines straight into the main repo;\n    * You will not be able to tell what version of dependency your project is\n        using will by looking at repository; you have to keep versions in the\n        additional ambiguous file with vendors associated with commits.\n\n- Various architecture problems:\n    * Impossible to update all or specific vendored dependencies;\n    * Impossible to rollback vendored dependencies to specific version;\n    * Impossible to remove unused vendored dependencies;\n    * Impossible to lock version of vendored dependency.\n\n## Solution\n\nWe all love git, it's a very powerful instrument. Why don't we use its\npower for vendoring dependencies using an awesome feature, which is called\n**git submodule**?\n\nWith **git submodule** you will have a git repository for each dependency.\nThey can be managed in the same way as main project by `git`.\n\nPros:\n\n- No need for additional software for building/running your Go project;\n\n- No need for additional JSON/TOML/YAML file for storing dependencies;\n\n- Update vendored dependencies directly from remote origins;\n\n- Rollback changes in dependencies;\n\n- Go-gettable\n\n**git submodule** might look like a **Silver Bullet**, but it's still clumsy to\nwork with manually. We want to have a powerful yet simple interface for\nvendoring dependencies using this technology.\n\n**manul** can do it for us.\n\n## Usage\n\n### Who needs a documentation when there are GIFs?\n\nFirst of all, we should request dependencies which we have in our project.\nTo do this, just run manul with `-Q` (query) flag. It will output all the\nproject imports (dependencies), like this:\n\n![first query](https://cloud.githubusercontent.com/assets/8445924/10285714/9e840e76-6b79-11e5-821f-636729ce4467.gif)\n\nFor example, we have six dependencies, let's lock versions of critical\ndependencies by adding submodules: in our case it's `zhash` and `blackfriday`\npackages.\n\nFor locking versions (installing dependencies) we should use `-I` (install)\nflag and specify dependencies, which we wish to install:\n\n![install two dependencies](https://cloud.githubusercontent.com/assets/8445924/10285715/a0e85302-6b79-11e5-904f-051929fe472b.gif)\n\nAfter installation we can have a look for vendored and non-vendored\ndependencies by using flag `-Q`. After previous step we should see git commits\nalong with two already vendored dependencies (`zhash` and `blackfriday`):\n\n![query after install](https://cloud.githubusercontent.com/assets/8445924/10285719/a39282e4-6b79-11e5-8877-7fba19e0d8c0.gif)\n\nLet's install submodules for remaining dependencies, go the limit! Just run\n**manul** with flag `-I` without specifying any dependencies, manul will\ninstall all detected dependencies with skipping already vendored:\n\n![install all dependencies](https://cloud.githubusercontent.com/assets/8445924/10285722/a63d1e6e-6b79-11e5-9f1e-1e606f3819dc.gif)\n\nWow, that was crazy! Now, to update some vendored dependencies, for example,\n`docopt-go` package, manul should be invoked with the flag `-U` and import path\n(`github.com/docopt/docopt-go`):\n\n![update docopt](https://cloud.githubusercontent.com/assets/8445924/10285723/a8ce9f18-6b79-11e5-87ef-2caca393328c.gif)\n\n**manul** can be used to remove specified submodules of vendored dependencies\nby using `-R` (remove) flag and specifying dependencies import path:\n\n![removing](https://cloud.githubusercontent.com/assets/8445924/10285727/ab587b50-6b79-11e5-9b5b-b7c7ff264506.gif)\n\nBy the way, manul can detect and remove unused vendored dependencies using `-C`\n(clean) flag:\n\n![unused dependencies](https://cloud.githubusercontent.com/assets/8445924/10285731/ae1d0270-6b79-11e5-9e97-151b7d77402a.gif)\n\n**manul** can also get you a specific version of a dependency by using a commit-ish, for example:\n- `manul -I golang.org/x/foo=34a235h1` will install `foo` at the specified commit\n- `manul -U github.com/x/bar=this-tag` will update it to `this-tag` version.\n\nLet's summarize:\n\n- `-I [\u003cdependency\u003e...]` - install git submodules for specified/all dependencies;\n- `-U [\u003cdependency\u003e...]` - update specified/all already vendored dependencies;\n- `-R [\u003cdependency\u003e...]` - remove git submodules for specified/all dependencies;\n- `-Q [\u003cdependency\u003e...]` - list all used dependencies;\n- `-C` - detect and remove all git submodules for unused vendored dependencies.\n\nYou can see similar help message by passing `-h` or `--help` flag.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovetskiy%2Fmanul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkovetskiy%2Fmanul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkovetskiy%2Fmanul/lists"}