Skip to content
/ vassh Public

vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder

Notifications You must be signed in to change notification settings

xwp/vassh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The big pain of doing vagrant ssh is that it doesn’t drop you into the corresponding working directory in the Vagrant guest’s synced_folder, so you have to cd to the dir and then run whatever you needed to do (e.g. wp core update). This is the problem that vassh solves: it will make sure you start out in the corresponding directory. So if you’re in your WordPress project on your host machine, all you need to do is:

$ vassh wp core update

There’s also a wrapper called vasshin which will shell you into Vagrant at the current directory, with a prompt for entering commands. This gets you colors and interactive TTY. You can also pass commands as arguments to vasshin to have them executed right away in the colorized TTY (with some additional Vagrant .bash_login echoes and SSH connection close):

$ vasshin wp post list # nice table!

You can put these files anywhere, as long as you source them via your .bashrc or .bash_profile. They aren't read by Vagrant, so they're independent. Example:

git clone https://github.com/x-team/vassh.git ~/code/vassh
echo "source ~/code/vassh/vassh.sh" >> ~/.bash_profile
source ~/.bash_profile

Installation is also now possible via Homebrew (props @kanedo):

brew update && brew install vassh

About

vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages