Skip to main content

Open files/directories in a vagrant synced folder on the host

Project description


When connected to a vagrant machine via ssh, this allows the user to open files and directories on the host machine without tunnelling.

This functionality is restricted to only files/directories in synced folders.


  • python3
  • vagrant



You can install hostopen with pip

pip3 install hostopen

This will give the commands: hostopen and hostopen-server

Vagrantfile configuration

The virtual machine needs access to the synced_folders file for this program to work. This file is located in the .vagrant directory in the same root as the Vagrantfile.

Add a similiar line to the Vagrantfile:

config.vm.synced_folder ".vagrant/machines/default/virtualbox", "/.vagrant_info"

This assumes the machine is named ‘default’ and you are using ‘virtualbox’. Change where appropriate.


vagrant ssh -- -R 12355:localhost:12355

The arbitrarily chosen default port of 12355 can be changed.

Usage Examples

You can use hostopen --help and hostopen-server --help for usage information.


hostopen directory

Will make the server open and directory if they are inside of a synced folder.


hostopen-server subl

Filepaths received will be opened with sublime. subl can be substitued for a different program.


Copyright (c) Jake Treacher. All rights reserved.
Licensed under the MIT License.

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
hostopen-0.1.1-py3-none-any.whl (7.7 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page