status-dev-cli/README.md

66 lines
1.5 KiB
Markdown
Raw Normal View History

2017-02-02 17:23:08 +03:00
# Status CLI
Additional tools for DApps developers. These tools allows to speed up the process of developing DApps for Status.
`status-dev-cli` is included in Status bundle, and all these commands can be executed directly from `status-react` directory. However, `status-dev-cli` is a standalone tool and you can install it without Status.
## Requirements
2017-02-08 17:35:30 +03:00
1. adb (from Android SDK);
2. curl;
3. Node.js;
4. NPM;
5. Watchman (https://facebook.github.io/watchman/docs/install.html).
2017-02-02 17:23:08 +03:00
## Installing standalone
```
git clone https://github.com/status-im/status-dev-cli.git
cd status-dev-cli
npm i -g
```
## Features
### Adding DApp
2017-02-08 17:35:30 +03:00
`./status-dev-cli add-dapp <ip> <dapp>`
2017-02-02 17:23:08 +03:00
2017-02-08 17:35:30 +03:00
* `ip` — device IP address;
2017-02-02 17:23:08 +03:00
* `dapp` — JSON containing DApp information. Required fields are `name`, `dapp-url` and `whisper-identity`.
Example:
```
./status-dev-cli add-dapp \
2017-02-08 17:35:30 +03:00
localhost \
2017-02-02 17:23:08 +03:00
'{"name": "Test dapp", "whisper-identity": "dapp-test", "dapp-url": "http://localhost:1234"}'
```
### Removing DApp
2017-02-08 17:35:30 +03:00
`./status-dev-cli remove-dapp <ip> <dapp_identity>`
2017-02-02 17:23:08 +03:00
2017-02-08 17:35:30 +03:00
* `ip` — device IP address;
2017-02-02 17:23:08 +03:00
* `dapp_identity``whisper-identity` of your DApp.
Example:
```
2017-02-08 17:35:30 +03:00
./status-dev-cli remove-dapp localhost "dapp-test"
2017-02-02 17:48:56 +03:00
```
2017-02-02 17:52:32 +03:00
### Watching for DApp changes and refreshing DApp automatically
2017-02-02 17:48:56 +03:00
2017-02-08 17:35:30 +03:00
`./status-dev-cli watch-dapp <ip> <dapp_identity> <dapp_dir>`
2017-02-02 17:48:56 +03:00
2017-02-08 17:35:30 +03:00
* `ip` — device IP address;
2017-02-02 17:48:56 +03:00
* `dapp_identity``whisper-identity` of your DApp;
* `dapp_dir` dir that should be observed.
Example:
```
2017-02-08 17:35:30 +03:00
./status-dev-cli watch-dapp localhost "dapp-test" ~/Documents/DApps/dapp-test/
2017-02-02 17:48:56 +03:00
```