{"id":19299191,"url":"https://github.com/bmatcuk/go-vagrant","last_synced_at":"2025-10-13T05:46:12.619Z","repository":{"id":47134695,"uuid":"145235703","full_name":"bmatcuk/go-vagrant","owner":"bmatcuk","description":"A golang wrapper around Vagrant","archived":false,"fork":false,"pushed_at":"2021-09-12T19:26:07.000Z","size":85,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T09:45:38.264Z","etag":null,"topics":["golang","golang-library","vagrant"],"latest_commit_sha":null,"homepage":null,"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/bmatcuk.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":"2018-08-18T16:33:55.000Z","updated_at":"2024-01-26T15:37:25.000Z","dependencies_parsed_at":"2022-08-28T15:24:18.536Z","dependency_job_id":null,"html_url":"https://github.com/bmatcuk/go-vagrant","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/bmatcuk/go-vagrant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fgo-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fgo-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fgo-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fgo-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmatcuk","download_url":"https://codeload.github.com/bmatcuk/go-vagrant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fgo-vagrant/sbom","scorecard":{"id":245335,"data":{"date":"2025-08-11","repo":{"name":"github.com/bmatcuk/go-vagrant","commit":"5e5e2f4c95358cb189e64bf53fa57352814fe4ca"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 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-17T07:30:41.219Z","repository_id":47134695,"created_at":"2025-08-17T07:30:41.219Z","updated_at":"2025-08-17T07:30:41.219Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013708,"owners_count":26085394,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":["golang","golang-library","vagrant"],"created_at":"2024-11-09T23:10:29.654Z","updated_at":"2025-10-13T05:46:12.597Z","avatar_url":"https://github.com/bmatcuk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Release](https://img.shields.io/github/release/bmatcuk/go-vagrant.svg?branch=master)\n[![Build Status](https://travis-ci.com/bmatcuk/go-vagrant.svg?branch=master)](https://travis-ci.com/bmatcuk/go-vagrant)\n[![codecov.io](https://img.shields.io/codecov/c/github/bmatcuk/go-vagrant.svg?branch=master)](https://codecov.io/github/bmatcuk/go-vagrant?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bmatcuk/go-vagrant)](https://goreportcard.com/report/github.com/bmatcuk/go-vagrant)\n[![GoDoc](https://godoc.org/github.com/bmatcuk/go-vagrant?status.svg)](https://godoc.org/github.com/bmatcuk/go-vagrant)\n\n# go-vagrant\nA golang wrapper around the Vagrant command-line utility.\n\n\n## Installation\n**go-vagrant** can be installed with `go get`:\n\n```bash\ngo get github.com/bmatcuk/go-vagrant\n```\n\nImport it in your code:\n\n```go\nimport \"github.com/bmatcuk/go-vagrant\"\n```\n\nThe package name will be `vagrant`.\n\n\n## Basic Usage\n```go\nfunc NewVagrantClient(vagrantfileDir string) (*VagrantClient, error)\n```\n\nFirst, you'll need to instantiate a VagrantClient object using\n`NewVagrantClient`. The function takes one argument: the path to the directory\nwhere the Vagrantfile lives. This instantiation will check that the vagrant\ncommand exists and that the Vagrantfile can be read.\n\n```go\nfunc (*VagrantClient) Action() *CommandObject\nCommandObject.Option1 = ...\nCommandObject.Option2 = ...\n\nfunc (*CommandObject) Run() error\nfunc (*CommandObject) Start() error\nfunc (*CommandObject) Wait() error\nCommandObject.Output\nCommandObject.Error\n```\n\nFrom there, every vagrant action follows the same pattern: call the appropriate\nmethod on the client object to retrieve a command object. The command object\nhas fields for any optional arguments. Then either call the command's `Run()`\nmethod, or call `Start()` and then `Wait()` on it later. Any output from the\ncommand, including errors, will be fields on the command object. The exact\nfield names for options and output are listed below in the [Actions] section.\n\nFor example:\n\n```go\npackage main\n\nimport \"github.com/bmatcuk/go-vagrant\"\n\nfunc main() {\n  client, err := vagrant.NewVagrantClient(\".\")\n  if err != nil {\n    ...\n  }\n\n  upcmd := client.Up()\n  upcmd.Verbose = true\n  if err := upcmd.Run(); err != nil {\n    ...\n  }\n  if upcmd.Error != nil {\n    ...\n  }\n\n  // TODO: vagrant VMs are up!\n}\n```\n\n\n## Available Actions\n\n### BoxAdd\nAdds a box to your local vagrant box collection. Takes a location which is the \nname, url, or path of the box.\n\n```go\nfunc (*VagrantClient) BoxAdd(location string) *BoxAddCommand\n```\n\nOptions:\n* **Clean** (default: `false`) - Clean any temporary download files. This will\n  prevent resuming a previously started download.\n* **Force** (default: `false`) - Overwrite an existing box if it exists.\n* **Name** (default: `\"\"`) - Name of the box. Only has to be set if the box is\n  provided as a path or url without metadata.\n* **Checksum** (default: `\"\"`) - Checksum for the box.\n* **CheckSumType** - Type of the supplied Checksum. Allowed values are\n  vagrant.MD5, vagrant.SHA1, vagrant.SHA256.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### BoxList\nReturn a list of available vagrant boxes.\n\n```go\nfunc (*VagrantClient) BoxList() *BoxListCommand\n```\n\nResponse:\n* **Boxes** - an array of `Box` objects. Each Box has a `Name`, `Provider`, and\n  `Version`.\n* **Error** - Set if an error occurred.\n\n\n### Destroy\nStop and delete all traces of the vagrant machines.\n\n```go\nfunc (*VagrantClient) Destroy() *DestroyCommand\n```\n\nOptions:\n* **Force** (default: `true`) - Destroy without confirmation. Defaults to true\n  because, when it's false, vagrant will try to ask for confirmation but\n  complain that there's no attached TTY.\n* **Parallel** (default: `false`) - Enable or disable parallelism if provider\n  supports it (automatically enables Force).\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to destroy.\n  If unspecified (default), all VMs in the current directory will be destroyed.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### GlobalStatus\nGet the status of all vagrant machines.\n\n```go\nfunc (*VagrantClient) GlobalStatus() *GlobalStatusCommand\n```\n\nOptions:\n* **Prune** (default: `false`) - Remove invalid entries\n\nResponse:\n* **Error** - Set if an error occurred.\n* **Status** - A map of vagrant machine IDs (ex: 1a2b3c4d) to GlobalStatus\n  objects which describe the name, state, and directory in which the machine\n  was created.\n\n\n### Halt\nStops the vagrant machine.\n\n```go\nfunc (*VagrantClient) Halt() *HaltCommand\n```\n\nOptions:\n* **Force** (default: `false`) - Force shutdown (equivalent to pulling the\n  power of the VM)\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to halt.\n  If unspecified (default), all VMs in the current directory will be halted.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### Port\nGet information about guest port forwarded mappings.\n\n```go\nfunc (*VagrantClient) Port() *PortCommand\n```\n\nOptions:\n* **MachineName** (default: `\"\"`) - Specify the vagrant machine you are\n  interested in. If your Vagrantfile only brings up one machine, you do not\n  need to specify this. However, if your Vagrantfile brings up multiple\n  machines, you *must* specify this! For some reason, this is the only vagrant\n  command that cannot handle multiple machines.\n\nResponse:\n* **ForwardedPorts** - an array of `ForwardedPort` objects. Each ForwardedPort\n  has a `Guest` and a `Host` port, representing a mapping from the host port\n  to the guest.\n* **Error** - Set if an error occurred.\n\n\n### Provision\nProvision the vagrant machine.\n\n```go\nfunc (*VagrantClient) Provision() *ProvisionCommand\n```\n\nOptions:\n* **Provisioners** (default: `nil`) - Enable only certain provisioners, by type\n  or name as an array of strings.\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to provision.\n  If unspecified (default), all VMs in the current directory will be\n  provisioned.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### Reload\nRestarts the vagrant machine and loads any new Vagrantfile configuration.\n\n```go\nfunc (*VagrantClient) Reload() *ReloadCommand\n```\n\nOptions:\n* **Provisioning** (default: `DefaultProvisioning`) - By default will only run\n  provisioners if they haven't been run already. If set to ForceProvisioning\n  then provisioners will be forced to run; if set to DisableProvisioning then\n  provisioners will be disabled.\n* **Provisioners** (default: `nil`) - Enable only certain provisioners, by type\n  or name as an array of strings. Implies ForceProvisioning.\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to reload.\n  If unspecified (default), all VMs in the current directory will be reloaded.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### Resume\nResume a suspended vagrant machine\n\n```go\nfunc (*VagrantClient) Resume() *ResumeCommand\n```\n\nOptions:\n* **Provisioning** (default: `DefaultProvisioning`) - By default will only run\n  provisioners if they haven't been run already. If set to ForceProvisioning\n  then provisioners will be forced to run; if set to DisableProvisioning then\n  provisioners will be disabled.\n* **Provisioners** (default: `nil`) - Enable only certain provisioners, by type\n  or name as an array of strings. Implies ForceProvisioning.\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to resume.\n  If unspecified (default), all VMs in the current directory will be resumed.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### SSHConfig\nGet SSH configuration information for the vagrant machine.\n\n```go\nfunc (*VagrantClient) SSHConfig() *SSHConfigCommand\n```\n\nOptions:\n* **Host** (default: `\"\"`) - Name the host for the config\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to retrieve\n  the configuration for. If unspecified (default), the configuration of all VMs\n  in the current directory will be returned.\n\nResponse:\n* **Configs** - a map of vagrant machine names to `SSHConfig` objects. Each\n  SSHConfig has several fields including Host, User, Port, etc. You can see\n  full field list in the [godocs for SSHConfig].\n\n\n### Status\nGet the status of the vagrant machine.\n\n```go\nfunc (*VagrantClient) Status() *StatusCommand\n```\n\nOptions:\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to retrieve\n  the status for. If unspecified (default), the status of all VMs in the\n  current directory will be returned.\n\nResponse:\n* **Status** - a map of vagrant machine names to a string describing the\n  status of the VM.\n* **Error** - Set if an error occurred.\n\n\n### Suspend\nSuspends the vagrant machine.\n\n```go\nfunc (*VagrantClient) Suspend() *SuspendCommand\n```\n\nOptions:\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to suspend.\n  If unspecified (default), all VMs in the current directory will be suspended.\n\nResponse:\n* **Error** - Set if an error occurred.\n\n\n### Up\nStarts and provisions the vagrant machine.\n\n```go\nfunc (*VagrantClient) Up() *UpCommand\n```\n\nOptions:\n* **Provisioning** (default: `DefaultProvisioning`) - By default will only run\n  provisioners if they haven't been run already. If set to ForceProvisioning\n  then provisioners will be forced to run; if set to DisableProvisioning then\n  provisioners will be disabled.\n* **Provisioners** (default: `nil`) - Enable only certain provisioners, by type\n  or name as an array of strings. Implies ForceProvisioning.\n* **DestroyOnError** (default: `true`) - Destroy machine if any fatal error\n  happens.\n* **Parallel** (default: `true`) - Enable or disable parallelism if provider\n  supports it.\n* **Provider** (default: `\"\"`) - Back the machine with a specific provider.\n* **InstallProvider** (default: `true`) - If possible, install the provider if\n  it isn't installed.\n* **MachineName** (default: `\"\"`) - The name or ID of a vagrant VM to bring up.\n  If unspecified (default), all VMs in the current directory will be brought\n  up.\n\nResponse:\n* **VMInfo** - a map of vagrant machine names to `VMInfo` objects. Each VMInfo\n  describes the `Name` of the machine and `Provider`.\n* **Error** - Set if an error occurred.\n\n\n### Version\nGet the current and latest vagrant version.\n\n```go\nfunc (*VagrantClient) Version() *VersionCommand\n```\n\nResponse:\n* **InstalledVersion** - the version of vagrant installed\n* **LatestVersion** - the latest version available\n* **Error** - Set if an error occurred.\n\n\n[Actions]: #available-actions\n[godocs for SSHConfig]: https://godoc.org/github.com/bmatcuk/go-vagrant#SSHConfig\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fgo-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmatcuk%2Fgo-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fgo-vagrant/lists"}