A helper script around the "vagrant" and "VBoxManage" commands.
Tested with Vagrant 1.0.3.
I was tired of cding into my guest Vagrantfile's directory. I wanted to simply do
wag myvm ssh
to SSH into it.
I was also playing with special network settings and I got tired of having to type "VBoxManage controlvm myvm_fullanme poweroff" when I needed to shutdown an unreachable guest, so
wag myvm poweroff
There are other small niceties.
Wag assumes you have a structure like
/Users/jdoe/vagrant ├── work0 │ ├── Vagrantfile │ └── stuff.txt ├── test │ └── Vagrantfile └── test2 └── Vagrantfile
for your Vagrant virtual machines.
Commands you can run from any work directory:
# to "up" the work0 vm wag work0 up # to "up" and immediately ssh into work0 wag work0 # to shut down the test2 vm wag test2 halt # or (as opposed to "up") wag test2 down # to power off the vm (hard shutdown, ultima ratio regi) wag test2 poweroff # to list the config (Vagrantfile summary) of a vm wag work0 config wag work0 network # only the network config # to print the current vm log wag work0 log # to list the vms managed wag vms # to list the vms managed and their statuses wag statuses # ...
Commands you can run when you're in the same dir as the vm's Vagrant file:
# to "up" the vm wag up # to ssh into the machine wag ssh # to make sure the vm is up and ssh into it wag # ...
curl -L http://git.io/raw > wag chmod a+x wag mv wag to/somewhere/in/your/path wag -v
MIT (see LICENSE.txt)