Skip to content
tomas edited this page Dec 1, 2014 · 1 revision

The Prey Node client can be extended through plugins, that can perform a number of different things. The client includes several different ones that can be toggled or customized by editing their settings. We will soon

Enabling plugins

In order to manage plugins, you'll need to open a Terminal/Console window in order to access the 'plugins' section of the command-line configurator.

$ cd /usr/lib/prey/current
$ bin/prey config plugins

  Usage: cli.js config plugins [command]

  list           Lists all available plugins, and shows which are enabled.
  enable         Enable specified plugin. e.g. `plugins enable [plugin-name]`.
  disable        Disable specified plugin. e.g. `plugins disable [plugin-name]`.

To list the current available plugins, run the 'list' command as shown.

$ bin/prey config plugins list

 List of available and enabled plugins:

                campfire   - Lets you control Prey through a Campfire chat session.
                 console   - A fun plugin that lets you control Prey from your command line terminal.
           control-panel √ - The default. Lets you remotely track and control your device using the official Prey Control Panel.
        reports-to-inbox   - Delivers a copy of each generated report to a specified inbox, directly via SMTP (no password needed).
    retry-failed-reports   - Attemps to redeliver reports that failed to be sent due to network errors.
             url-trigger   - Mimics the old client\'s behaviour, triggering new reports whenever a URL returns a specific status code.

Now you can enable a plugin by running 'enable [plugin-name]'. You might be prompted to define a few settings, depending on whether the plugin has any options or not.

$ bin/prey config plugins enable retry-failed-reports
Error! Oops. Seems you don't have write permissions. Try running with sudo.

Oh crap, that's right. This is not for everyone.

$ sudo bin/prey config plugins enable retry-failed-reports
Succesfully enabled retry-failed-reports plugin.

Nice! The retry-failed-reports plugin is now enabled. Let's set up the campfire plugin. In this case we'll get a few options.

$ sudo bin/prey config plugins enable campfire

The Prey user's Campfire user/API token. You need to use a separate user for this, not your own. 
 - token: abcdef123456
Your Campfire's account subdomain. 
 - subdomain: foobar
The Room ID to connect to. It's the last part of the URL when the chat window is open. 
 - room_id: 123456
The nickname under which Prey will appear on the chat room. 
 - nickname: [prey] 
The magic word you'll use on the chat room to identify yourself. 
 - magic_word: [prettyplease]

Succesfully enabled campfire plugin.

Slick. From now on we'll be able to control Prey through a campfire chat session, on room 123456 from the foobar subdomain (eg. foobar.campfirenow.com).

Disabling plugins

Just run the 'disable' command, passing the name of the plugin.

$ sudo bin/prey config plugins disable retry-failed-reports
Succesfully disabled retry-failed-reports plugin.

Next up: How to write your own plugins.

Clone this wiki locally