Giter VIP home page Giter VIP logo

swsh's Introduction

SWiSH

SignalWire interactive SHell

A cross-platform command line shell for managing and administrating SignalWire Spaces.


INSTALLATION and SETUP

  1. Open Terminal
  2. Run the following command (Note: using python virtual environment is recommended, but is not required):
pip3 install swsh
  1. The following variables can be set to improve startup. They are required for running in Non-Interactive mode. If they are not set, swsh will ask for them at startup.
    • Linux / MacOS:
      export PROJECT_ID=<YOUR_PROJECT_ID>
      export SIGNALWIRE_SPACE=<YOUR_SIGNALWIRE_SPACE>
      export REST_API_TOKEN=<YOUR_REST_API_TOKEN>
      
    • Windows:
      setx PROJECT_ID=<YOUR_PROJECT_ID>
      setx SIGNALWIRE_SPACE=<YOUR_SIGNALWIRE_SPACE>
      setx REST_API_TOKEN=<YOUR_REST_API_TOKEN>
      
  2. Run swsh in Interactive or Non-Interactive mode
    • Interactive:
      • Type 'swsh' in terminal and hit inter to be taken into the interactive shell environment
    • Non-Interactive:
      • Type 'swsh "command(s)"' to have SWiSH run a command and return the output. (Ideal for automated tasks)

For any questions or assistance, please contact SignalWire Support: [email protected]

swsh's People

Contributors

shane-signalwire avatar briankwest avatar

Stargazers

August avatar  avatar Jeff McJunkin avatar

Watchers

Sergio Tulentsev avatar Ryan Williams avatar Anthony Minessale avatar Evan McGee avatar James Cloos avatar  avatar Edoardo Gallo avatar Dima avatar Andrey Volk avatar Chris Clement avatar Len avatar Olajide Awoyinka avatar  avatar

swsh's Issues

FEATURE: JSON colorization

JSON colorization was lost when decoupled from wirestarter due to a patch requirement. Look for a way to add this back.

delete -f --force switch

example:

Remove SIP Endpoint 5f977d7c-6657-4455-8df7-0e7e07ffb96a? This cannot be undone! (y/n): y
Success! SIP Endpoint 5f977d7c-6657-4455-8df7-0e7e07ffb96a Removed

allow user to use -f or --force to skip asking if they want to delete an object

Help command

Great work!

Could we add a detailed help when the script is invoked with --help?

In these cases, usually that would ignore any env vars (it should work even if the credentials are not set) and return detailed information about the available commands.

Formatting sip_endpoint list

codecs and ciphers showing up with extra comma prepended to list

swsh> sip_endpoint list
1)
 SignalWire ID:	609b648f-0e23-40fd-87e2-3eda8d3a62cb
 Username:		500
 Caller ID Name:	SHANE DEMO
 Caller ID Number:	+14402712973
 Codecs:		, OPUS, G722, PCMU, PCMA, G729, VP8, H264
 Encryption Ciphers:	, AEAD_AES_256_GCM_8, AES_256_CM_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_80, AES_256_CM_HMAC_SHA1_32, AES_CM_128_HMAC_SHA1_32
 Encrytion Enabled:	optional

FEATURE: Add SWiSH env back in

This was removed when decoupled from wirestarter due to patch being required in cmd2.py.

Look for a way to add this back in and not require a patch if possible.

laml_bin create --name command broken

/bin/sh: sha1sum: command not found
cp: /tmp/.foo_laml.xml.orig: No such file or directory
sh: /tmp/foo_laml.xml: No such file or directory
/bin/sh: sha1sum: command not found
LaML Bin XML contents are required!

This was a side effect of decoupling swsh from WireStarter. WireStarter was hard coded to open a template for editing a laml bin and and then use that in the command to create the bin. It also uses the sha1sum to determine if the template file changed at all, before sending (if no changes, then don't bother to send/create).

This needs to be redone, or removed in the newest version of swsh, that no longer has the WireStarter environment to rely on.

ngrok_tunnel command should be deprecated

Really only mattered when on wirestarter. Could still be effective if customer is using ngrok for something else, but probably not worth having the command that mostly will do nothing sitting there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.