{"id":14986164,"url":"https://github.com/mkinney/mech","last_synced_at":"2025-10-05T23:31:40.559Z","repository":{"id":57441650,"uuid":"231511717","full_name":"mkinney/mech","owner":"mkinney","description":"Easy command line virtual machines for VMWare Fusion/Workstation and Oracle VirtualBox","archived":false,"fork":true,"pushed_at":"2021-06-09T20:49:23.000Z","size":909,"stargazers_count":16,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T07:29:55.902Z","etag":null,"topics":["fusion","mech","vagrant","virtualbox","vmware","workstation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mechboxes/mech","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkinney.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-01-03T04:26:26.000Z","updated_at":"2025-04-16T21:36:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mkinney/mech","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/mkinney/mech","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkinney%2Fmech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkinney%2Fmech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkinney%2Fmech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkinney%2Fmech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkinney","download_url":"https://codeload.github.com/mkinney/mech/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkinney%2Fmech/sbom","scorecard":{"id":652534,"data":{"date":"2025-08-11","repo":{"name":"github.com/mkinney/mech","commit":"8c03a58369442b11a1ab76168856746acf6c085e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/mkinney/mech/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mkinney/mech/python-package.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-package.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mkinney/mech/python-package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand 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":"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":"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"}},{"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":"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":"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 24 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"}}]},"last_synced_at":"2025-08-21T13:50:35.582Z","repository_id":57441650,"created_at":"2025-08-21T13:50:35.582Z","updated_at":"2025-08-21T13:50:35.582Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278534966,"owners_count":26002865,"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-05T02:00:06.059Z","response_time":54,"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":["fusion","mech","vagrant","virtualbox","vmware","workstation"],"created_at":"2024-09-24T14:12:28.055Z","updated_at":"2025-10-05T23:31:40.278Z","avatar_url":"https://github.com/mkinney.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mech\n\n![Python package](https://github.com/mkinney/mech/workflows/Python%20package/badge.svg)\n[![codecov](https://codecov.io/gh/mkinney/mech/branch/master/graph/badge.svg)](https://codecov.io/gh/mkinney/mech)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/mikemech)\n\nNOTE: The Hashicorp VMware vagrant provider is now open source. See https://github.com/hashicorp/vagrant-vmware-desktop \n\n# Update 2021-06-09 - I'm not sure there will be a need for this tool any longer due to vagrant being free.\n\nFeel free to fork this project.\n\nPlease test and provide any feedback/issues.\n\n*Newly added virtualbox functionality.* By default, the provider will be `vmware`. Tested on Ubuntu (using VMware Workstation and VirtualBox) and Mac (using VirtualBox and VMware Fusion).\n\nDid you know you can now *provision* using `pyinfra`? See `mech provision --help` for more info or look at [one of the integration tests](https://github.com/mkinney/mech/blob/master/tests/int/provision/Mechfile#L59) for how to specify `pyinfra` provisioning from a remote file. You can also have local files for provisioning.\n\n*Newly added `mech cloud` capability.* See `mech cloud --help` for more info. Ever want to start a VM on another desktop/laptop? With 'mech cloud' you can do just that. 'mech cloud' is similar to the the [docker context](https://docs.docker.com/engine/reference/commandline/context/) option. (Note: 'mech cloud' was written before discovering 'docker context', otherwise would have borrowed some of docker's interface/terms.)\n\nThere is `--help` on every operation.\n\n# mech --help\n```\nUsage: mech [OPTIONS] COMMAND [ARGS]...\n\n  Mech is a command line utility for virtual machine automation.\n\n  Create, start, stop, destroy virtual machines (aka instances) with ease.\n\n  VMware Fusion, VMware Workstation, and/or Oracle VirtualBox can be used.\n\n  Mech is similar to Hashicorp's vagrant utility.\n\nOptions:\n  --debug\n  --cloud TEXT\n  --version     Show the version and exit.\n  -h, --help    Show this message and exit.\n\nCommands:\n  add            Add instance to the Mechfile.\n  box            Box operations.\n  cloud          Cloud operations.\n  destroy        Stops and deletes all traces of the instances.\n  down           Stops the instance(s).\n  global-status  Outputs info about all instances running on this host and...\n  init           Initialize Mechfile.\n  ip             Outputs the IP address of the instance.\n  list           Lists all available instances (using Mechfile)\n  pause          Pauses the instance(s).\n  port           Displays guest port mappings.\n  provision      Provision the instance(s).\n  ps             List running processes in Guest OS.\n  remove         Remove instance from the Mechfile.\n  resume         Resume paused/suspended instance(s).\n  scp            Copies files to and from the instance using SCP.\n  snapshot       Snapshot operations.\n  ssh            Connects to an instance via SSH or runs a command (if...\n  ssh-config     Output OpenSSH configuration to connect to the instance.\n  support        Show support info.\n  suspend        Suspends the instance(s).\n  up             Starts and provisions instance(s).\n  upgrade        Upgrade the VM and virtual hardware for the instance(s).\n  winrm          Winrm operations.\n```\n\n\nFor help on any individual command run `mech \u003ccommand\u003e -h`\n\nAll \"state\" will be saved in .mech directory. (boxes and instances)\n\nExamples:\n\nInitializing and using a box from HashiCorp's Vagrant Cloud:\n\n```\n    mech init bento/ubuntu-18.04\n    mech up\n    mech ssh\n```\n\nIf having a problem with a command, add the \"--debug\" option like this:\n\n```\n    mech --debug up\n```\n\n# mech up --help\n```\n% mech up --help\nUsage: mech up [OPTIONS] [INSTANCE]\n\n  Starts and provisions instance(s).\n\n  Notes:\n\n  If no instance is specified, all instances will be started.\n\n  The options ('memsize', 'numvcpus', and 'no-nat') will only be applied\n  upon first run of the 'up' command.\n\n  The 'no-nat' option will only be applied if there is no network interface\n  supplied in the box file for 'vmware'. For 'virtualbox', if you need\n  internet access from the vm, then you will want to use 'no-nat'. Interface\n  'en0' will be used for bridge.\n\n  Unless 'disable-shared-folders' is used, a default read/write share called\n  'mech' will be mounted from the current directory. '/mnt/hgfs/mech' on\n  'vmware' and '/mnt/mech' on 'virtualbox' To add/change shared folders,\n  modify the Mechfile directly, then stop/start the VM.\n\n  The 'remove-vagrant' option will remove the vagrant account from the guest\n  VM which is what 'mech' uses to communicate with the VM. Be sure you can\n  connect/admin the instance before using this option. Be sure to check that\n  root cannot ssh, or change the root password.\n\nOptions:\n  --disable-provisioning    Do not provision.\n  --disable-shared-folders  Do not share folders.\n  --gui                     Start GUI, otherwise starts headless.\n  --memsize MEMORY          Specify memory size in MB.\n  --no-cache                Do not save the downloaded box.\n  --no-nat                  Do not use NAT networking (i.e., use bridged).\n  --numvcpus VCPUS          Specify number of vcpus.\n  -r, --remove-vagrant      Remove vagrant user.\n  -h, --help                Show this message and exit.\n```\n\n# Example using mech\n\nInitializing and using a machine from HashiCorp's Vagrant Cloud:\n\n```\n    mech init bento/ubuntu-18.04\n    mech up\n    mech ssh\n```\n\n`mech init` can be used to pull a box file which will be installed and\ngenerate a Mechfile in the current directory. You can also pull boxes\nfrom Vagrant Cloud with `mech init freebsd/FreeBSD-11.1-RELEASE`.\nSee the `mech up -h` page for more information.\n\nCan have multiple instances of the same box. The default instance name is 'first'.\n\nHere is the help info for adding a new instance:\n\n# mech add --help\n```\n% mech add -h\nUsage: mech add [OPTIONS] NAME LOCATION\n\n  Add instance to the Mechfile.\n\n  Notes:\n\n  The 'add-me' option will add the currently logged in user to the guest,\n  add the same user to sudoers, and add the id_rsa.pub key to the\n  authorized_hosts file for that user.\n\nOptions:\n  -a, --add-me           Add the current user/pubkey to guest.\n  --box BOXNAME          Name of the box (ex: bento/ubuntu-10.04).\n  --box-version VERSION  Constrain to specific box version.\n  --provider PROVIDER    Provider (`vmware` or `virtualbox`)\n  -u, --use-me           Use the current user for mech interactions.\n  -w, --windows          Windows instance\n  -h, --help             Show this message and exit.\n```\n\n# mech list\nHere is what it would look like having multiple instance with different providers:\n```\n% mech list\n                NAME\t        ADDRESS\t                                BOX\t     VERSION\t    PROVIDER\t       STATE\n               first\t  192.168.3.134\t                 bento/ubuntu-18.04\t 201912.04.0\t      vmware\t     started\n              second\t 192.168.56.194\t                 bento/ubuntu-18.04\t 202002.04.0\t  virtualbox\t     running\n               third\t     notcreated\t              mrlesmithjr/alpine311\t  1578437753\t  virtualbox\t  notcreated\n```\n\n# Installation\n\nTo install:\n\n`pip install -U mikemech`\n\nor for the latest:\n\n`pip install -U git+https://github.com/mkinney/mech.git`\n\n# Shared Folders\n\nIf the box you init was created properly, you will be able to access\nthe host's current working directory in `/mnt/hgfs/mech`. If you are\nhaving trouble with an Ubuntu guest, try running:\n\n```bash\nsudo apt-get update\nsudo apt-get install linux-headers-$(uname -r) open-vm-tools\n```\n\nfollowed by\n\n```bash\nsudo vmware-config-tools.pl\n```\n\nor\n\n```bash\nvmhgfs-fuse .host:/mech /mnt/hgfs\n```\n\n# Want zsh completion for commands/options (aka \"tab completion\")?\n1. add these lines to ~/.zshrc\n\n```bash\n# folder of all of your autocomplete functions\nfpath=($HOME/.zsh-completions $fpath)\n# enable autocomplete function\nautoload -U compinit\ncompinit\n```\n\n2. Copy script to something in fpath (Note: Run `echo $fpath` to show value.)\n\n```bash\ncp _mech ~/.zsh-completions/\n```\n\n3. Reload zsh\n\n```bash\nexec zsh\n```\n\n4. Try it out by typing `mech \u003ctab\u003e`. It should show the options available.\n\n# Want bash completion for commands/options (aka \"tab completion\")?\n1. add these lines to ~/.bash_profile\n\n```bash\n[ -f /usr/local/etc/bash_completion ] \u0026\u0026 . /usr/local/etc/bash_completion\n```\n\n2. Copy script to path above\n\n```bash\ncp mech_completion.sh /usr/local/etc/bash_completion/\n```\n\n3. Reload .bash_profile\n\n```bash\nsource ~/.bash_profile\n```\n\n4. Try it out by typing `mech \u003ctab\u003e`. It should show the options available.\n\n# Background\n\nOne of the authors made this because they don't like VirtualBox and wanted to use vagrant\nwith VMmare Fusion but was too cheap to buy the Vagrant plugin.\n\nhttps://blog.kchung.co/mech-vagrant-with-vmware-integration-for-free/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkinney%2Fmech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkinney%2Fmech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkinney%2Fmech/lists"}