{"id":15090918,"url":"https://github.com/funbox/vgrepo","last_synced_at":"2026-01-10T02:22:29.538Z","repository":{"id":57526874,"uuid":"91578708","full_name":"funbox/vgrepo","owner":"funbox","description":"Simple CLI tool for managing Vagrant repositories","archived":true,"fork":false,"pushed_at":"2018-02-13T09:34:28.000Z","size":84,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-26T10:34:41.962Z","etag":null,"topics":["golang","hashicorp","repository-management","vagrant"],"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/funbox.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":"2017-05-17T13:19:28.000Z","updated_at":"2023-01-28T11:20:39.000Z","dependencies_parsed_at":"2022-09-07T05:30:38.469Z","dependency_job_id":null,"html_url":"https://github.com/funbox/vgrepo","commit_stats":null,"previous_names":["gongled/vgrepo"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fvgrepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fvgrepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fvgrepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funbox%2Fvgrepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funbox","download_url":"https://codeload.github.com/funbox/vgrepo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877091,"owners_count":16554829,"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":["golang","hashicorp","repository-management","vagrant"],"created_at":"2024-09-25T10:34:41.123Z","updated_at":"2025-10-06T10:30:41.824Z","avatar_url":"https://github.com/funbox.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vgrepo [![Build Status](https://travis-ci.org/gongled/vgrepo.svg?branch=master)](https://travis-ci.org/gongled/vgrepo) [![Go Report Card](https://goreportcard.com/badge/github.com/gongled/vgrepo)](https://goreportcard.com/report/github.com/gongled/vgrepo)\n\n* [Demo](#demo)\n* [Installation](#installation)\n* [Getting started](#getting-started)\n* [Advanced](#advanced)\n* [Usage](#usage)\n* [License](#license)\n\nHashiCorp company does [Vagrant](https://www.vagrantup.com) for managing the lifecycle of virtual machines. It is great, but they do not \nprovide any open source tools for versioning and discovering your own images without a necessity to have an account \non [HashiCorp Atlas](https://atlas.hashicorp.com/help/intro/features-list). \n\n`vgrepo` is a simple CLI tool for managing Vagrant repositories. In pair with HTTP server it provides \nsimple way to distribute your images without worries about manual upgrading them on your team.\n\n## Demo\n\n[![asciicast](https://asciinema.org/a/123313.png)](https://asciinema.org/a/123313)\n\n## Installation\n\nBefore the initial install allows git to use redirects for [pkg.re](https://github.com/essentialkaos/pkgre) service (reason why you should do this described [here](https://github.com/essentialkaos/pkgre#git-support)):\n\n```\ngit config --global http.https://pkg.re.followRedirects true\n```\n\nTo build the `vgrepo` from scratch, make sure you have a working Go 1.5+ workspace ([instructions](https://golang.org/doc/install)), then:\n\n```\ngo get github.com/gongled/vgrepo\n```\n\nIf you want update `vgrepo` to latest stable release, do:\n\n```\ngo get -u github.com/gongled/vgrepo\n```\n\n## Getting started\n\n1. Specify storage settings in the `/etc/vgrepo/vgrepo.conf` configuration file. Parameter `path` is a \ndirectory that contains repositories with their metadata: name, versions and providers of VMs. \nParameter `url` is used to discover your images and provides a permanent link to metadata.\n\n```ini\n[storage]\n    \n  # Repository URL and port\n  url: http://vagrant.example.tld\n    \n  # Repository path to store images and metadata\n  path: /srv/storage\n```\n    \n2. Create directory for the repository path `/srv/storage` and make sure that it is writable.\n\n3. Add the image to the repository:\n\n```\nvgrepo add /path/to/image.box powerbox 1.0.0 virtualbox\n```\n    \n4. Configure NGINX to serve static files from `/srv/storage` directory.\n\n```nginx\nserver {\n    listen 80;\n        \n    server_name vagrant.example.tld;\n        \n    access_log off;\n    error_log off;\n        \n    root /srv/storage;\n        \n    location / {\n        autoindex on;\n        expires -1;\n    }\n}\n```\n \nDone. After adding changes you can specify URL `http://vagrant.example.tld/metadata/powerbox/powerbox.json` in \nthe `config.vm.box_url` to force Vagrant checking updates every time you run command `vagrant up`. \n\n## Advanced\n\nImagine you have an image with the name `powerbox`. The standard path for metadata will be \n`http://vagrant.example.tld/metadata/powerbox/powerbox.json`, however it looks awful and unmemorable. \nYou can use well-looking URL instead of direct link to JSON metadata file with the following NGINX \nconfiguration of the virtual host:  \n\n```nginx\nserver {\n    listen 8080;\n    \n    server_name vagrant.example.tld;\n\n    root /srv/storage;\n\n    location ~ ^/r/([^\\/]+)$ {\n        return 301 $uri/;\n    }\n\n    location ~ ^/r/([^\\/]+)/$ {\n        index /metadata/$1/$1.json;\n        try_files /metadata/$1/$1.json =404;\n    }\n\n    location ~ \\.json$ {\n        add_header Content-Type application/json;\n    }\n\n    location ~ \\.box$ {\n        add_header Content-Type application/octet-stream;\n    }\n\n    location / {\n\t    autoindex off;\n        expires -1;\n    }\n}\n```\n\nNow you are able to distribute your images for more than one machine over HTTP or HTTPS \nwith a short and nice URLs with a format `http://vagrant.example.tld/r/powerbox`. \n\n## Usage\n\n```\nUsage: vgrepo {options} {command}\n\nCommands\n\n  add source name version provider    Add image to the Vagrant repository\n  list                                Show the list of available images\n  delete name version provider        Delete the image from the repository\n  info name                           Display info of the particular repository\n  render output template              Create index by given template file\n  help                                Display the current help message\n\nOptions\n\n  --no-color, -nc    Disable colors in output\n  --help, -h         Show this help message\n  --version, -v      Show version\n\nExamples\n\n  vgrepo add $HOME/powerbox-1.0.0.box powerbox 1.1.0 virtualbox\n  Add image to the Vagrant repository\n\n  vgrepo list\n  Show the list of available repositories\n\n  vgrepo delete powerbox 1.1.0\n  Remove the image from the repository\n\n  vgrepo info powerbox\n  Show detailed info about the repository\n\n  vgrepo render index.html /etc/vgrepo/templates/default.tpl\n  Create index file by given template with output index.html\n\n```\n\n## License\n\nReleased under the MIT license (see [LICENSE](LICENSE))\n\n[![Sponsored by FunBox](https://funbox.ru/badges/sponsored_by_funbox_grayscale.svg)](https://funbox.ru)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunbox%2Fvgrepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunbox%2Fvgrepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunbox%2Fvgrepo/lists"}