FireFox plugin and connector to open any GitHub repository directly from the browser
Note: The application is in it's early stages and may be highly unstable. Currently we only support Linux.
This repository contains two components of the application
- A native connector app
- FireFox AddOn
- Latest version of FireFox
- Latest version of Node.js and NPM
- Git installed and configured
- GitHub account and your local machine is setup with SSH keys to your GitHub account
- Install the connector to your machine
npm i -g open-with-vscode
- Install the FireFox AddOn to your browser
After installing both the Connector and the addon, simply go to any repository on GitHub, click on clone or download
, you will be able to see the Open with VSCode
button.
By Default, the connector clones the repositories to ~/github-projects
directory within your system. Once the repository is already cloned, you can simply use the same button to open the repository using VSCode without any cloning.
Make sure you have the following requirements installed/setup in your system
- Latest version of FireFox
- Latest version of Node.js and NPM
- Git installed and configured
- GitHub account and your local machine is setup with SSH keys to your GitHub account
git clone https://github.com/haxzie/open-with-vscode
cd into packages/connector
and execute the following command to install the connector globally
npm link
The connector will automatically install the necessary
native manifest
to.mozilla/native-messaging-hosts
in yourhome
directory. If you want to run the connector from the source, edit the.mozilla/native-messaging-hosts/open_with_vscode.json
file and add the following contents by replacing the path property with the index.js file of the connector.
Copy the following JSON file to ~/.mozilla/native-messaging-hosts/open_with_vscode.json
{
"name": "open_with_vscode",
"description": "Host for executing git commads",
"path": "<PATH to the index.js file of the connector>",
"type": "stdio",
"allowed_extensions": ["open-with-vscode@haxzie.com"],
}
Copy the above JSON file to ~/Library/Application Support/Mozilla/NativeMessagingHosts/<name>.json
cd into the packages/plugin
directory and execute the following command.
npm install
npm run build
Use the following command to spin up an instance of FireFox with the plugin installed temporarily.
npm start
Or, if you want to manually install the plugin. Open your browser, and on the addressbar goto debugging menu, or simply type about:debugging#/runtime/this-firefox
in your address bar.
Click on Load Temporary Extension, Browse the plugin directory of the project, select dist/content-script.js
. This will temporarily install the AddOn to your browser. For logs, click on the inspect
button to open the console fro the background-scripts of the plugin.