# README
sorashell
Interactive shell for soracom-cli
. Features include:
- commands and flags automatic, interactive, fuzzy-match completion
- just works by copying the cross-compiled binary file into the target environment. There is no need to build an environment or solve dependencies.
Install
$ go get github.com/rakyll/statik # install rakyll/statik, asset embedder
$ make sorashell
$ cp ./sorashell /path/to/your/bin/directory
Usage
- Install and configure
soracom-cli
according to the repo's README or SORACOM CLI 利用ガイド | SORACOM Developers (Japanese) - Run
sorashell
- The shell automatically provides suggestions as you type. Enjoy!
- Tab to move cursor or display suggestions
- Space to select
Tips and Tricks
You can:
- fuzzy match commands, options, IMSIs, device IDs, etc. Try with
subscribers get --imsi
and type SIM status (online or offline), or a part of it's name. - use pipe (
|
) or redirect (>
) with your risk e.g.SORASHELL> subscribers list --speed-class-filter s1.slow | jq '.[] | .imsi' > slow-subscribers.txt
- run local shell command by preceding the command with
!
e.g.SORASHELL> !cd /Users/soracom/Desktop SORASHELL> !ls
Limitation
sorashell
has rough edges, and is not yet suitable for non-technical users. Please note that this is one of my first Go program :)- cannot handle parameters in body well e.g. createEventHandler
- macOS only at this moment. PRs welcome!
Acknowledgements
c-bata/go-prompt and soracom/soracom-cli, which does all the heavy lifting.
Contributing
Please read CONTRIBUTING for details.
License
MIT. See LICENSE for details.