BBC-News/alephant-harness — pull request #6 by revett (2014-09-09 15:39:55+00:00)
Title: Thor CLI App

#### Problem

- Adding messages to a local renderer was a pain.
- Switching to a new component required you to edit files.

#### Solution

A Thor CLI app, that does most of the work for you!

**Command `add_message`**:

This adds a new message to your local alephant-renderer queue, using by default the `responsive.json` fixture of the component specified in `config/development/app.json`, however you can specify your own custom `.json` file using `-j`. The app also keeps note of your last used `sequence_number`, and then auto increments it for any subsequent messages. This cached value is reset if you change to a different component, or if you set the value manually using `-s`.

**Command `change_component`**:

This quickly switches the renderer to use a different component, specified using `-c`. **Note** - after running this command you will need to restart your renderer.

#### Usage

```bash
# Display available commands
alephant-harness-tools help

# Change component
alephant-harness-tools change_component -c

# RESTART RENDERER!

# Add a message (basic use)
alephant-harness-tools add_message

# Add message using your own .json file
alephant-harness-tools add_message -j /path/to/file.json

# Add message with specific sequence number (and reset cached value).
alephant-harness-tools add_message -s 123
```