Skip to content

A CLI tool for Redux remote dispatch. Used in remote-redux-devtools

License

Notifications You must be signed in to change notification settings

jhen0409/redux-dispatch-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Redux Dispatch CLI NPM version

A CLI tool for Redux remote dispatch. Used in remote-redux-devtools

Screenshot

Screenshot

Installation

$ npm install -g redux-dispatch-cli

Usage

Use redux-dispatch or rrd command.

# Connect to remotedev-server
$ redux-dispatch connect --hostname <hostname> --port <port>

# Show instance list
$ redux-dispatch ls-instance

# Select instance
$ redux-dispatch select <instance>

# Sync currently selected instance states to all instances
$ redux-dispatch sync

# Dispatch action
$ redux-dispatch action "{ type: 'ACTION', ... }"

# Start daemon (`connect` can also start daemon)
$ redux-dispatch start
# Restart daemon
$ redux-dispatch restart
# Stop daemon
$ redux-dispatch stop
# Check daemon status
$ redux-dispatch status

Run redux-dispatch --help or redux-dispatch <command> --help for more information.

Steps

Connect to remotedev-server (hostname default: localhost)

$ rrd connect --hostname <hostname> --port <port>

It will create a daemon, the daemon process will exit when $HOME/.remotedev_d_port is removed.

Show available instances

$ rrd ls-instance

Make sure have instance can dispatch action.

Select a instance (default: auto)

$ rrd select <instanceKey>

Dispatch action

$ rrd action "{ type: 'ACTION', a: 1 }"

Credits

License

MIT

About

A CLI tool for Redux remote dispatch. Used in remote-redux-devtools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published