Categorygithub.com/0x6b/sorashell
repositorypackage
0.3.0
Repository: https://github.com/0x6b/sorashell.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# 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

  1. Install and configure soracom-cli according to the repo's README or SORACOM CLI 利用ガイド | SORACOM Developers (Japanese)
  2. Run sorashell
  3. 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.