Skip to content
Chrome API to execute external commands through native messaging
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
extension
host
CONTRIBUTING
Makefile
README.md
UNLICENSE

README.md

Shell for Chrome

Chrome API to execute external commands through native messaging.

Dependencies

Installation

Build the application:

make build

Install the native manifest to its appropriate location.

make install

Open chrome://extensions in Chrome, enable Developer mode then Load unpacked to select the extension directory.

Image

See the Getting Started Tutorial for more information.

Usage

More examples can be found here.

const port = chrome.runtime.connect('dcilcomdlageimalkhpclbkigebkiclj')
port.postMessage({ command: 'echo', arguments: ['Tchou'] })
port.onMessage.addListener((response) => {
  console.log(response.output)
})

See Cross-extension messaging for more details.

API

Request

{
  id: String?,
  command: String,
  arguments: Array(String)?,
  environment: Hash(String, String)?,
  shell: { type: Bool, default: false },
  input: String?,
  directory: String?
}

Response

{
  id: String?,
  status: Int32,
  output: String,
  error: String
}
You can’t perform that action at this time.