Action Cable command-line client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Build Status

Action Cable CLI

ACLI is Action Cable command line interface written in mRuby.

It's a standalone binary which can be used:

  • in development to play with Action Cable channels (instead of struggling with browsers)

  • for acceptance testing (see Scenarios)

  • for benchmarking.

Sponsored by Evil Martians


Checkout Downloads page for pre-compiled binaries.

Currently only MacOS (x86_64) and Linux (x86_64) are supported. PRs are welcomed for other platforms support.

We're also working on the Homebrew formula.


ACLI is an interactive tool by design, i.e. it is asking you for input if neccessary. Just run it without any arguments:


Enter URL: 

# After successful connection you receive a message:
Connected to Action Cable at

Then you can run Action Cable commands:

# Subscribe to channel (without parameters)
\s channel_name

# Subscribe to channel with params

\s+ channel_name id:1

# or interactively

Enter channel ID:
# Generate params object by providing keys and values one by one
Enter key (or press ENTER to finish): 
Enter value:
# After successful subscription you receive a message
Subscribed to channel_name

# Performing actions
\p speak message:Hello!

# or interactively (the same way as \s+)

You can also provide URL and channel info using CLI options:

acli -u -c channel_name

You can pass channel params this way for now.

Other commands:

# Print help

# Quit

Other command line options:

# Print usage
acli -h

# Print version
acli -v

# Quit after M incoming messages
acli -u -c channel_name -m M


  • Support HTTP headers

  • Reconnect support

  • Output formatters (and colorize)


Work in progress

Although ACLI has been designed to be an interactive tool, it would be great to have some automation. And here come scenarios.

Consider an example:

# Commands
- subscribe: "echo"
- perform:
    action: "ping"

# Expectations
- receive:
      message: "pong"

and another one:

# Commands
- subscribe: "clock"

# Expectations
- receive:
      message: /Current time is .*/
    timeout: 2
    # repeat this step 5 times
    multiplier: 5

Running ACLI with scenario:

acli -u localhost -s echo.yml

The exit code is 0 if the scenario passes and 1 otherwise. So it can be used for black-box testing.


ACLI is built on top of mruby-cli, so it comes with Docker environment configuration. You can run docker-compose run compile or docker-compose run test.

You can also build the project locally (on MacOS or Linux): rake compile or rake test.


  • libtls (brew install libressl)

  • wslay (brew install wslay)


Bug reports and pull requests are welcome on GitHub at


The gem is available as open source under the terms of the MIT License.