Introduction to WireStarter
WireStarter is a Docker container which sets up the SignalWire SDKs and builds a development and testing environment for new developers.
WireStarter includes SWSH (the SignalWire interactive Shell) by default. SWSH is a scriptable utility built to easily configure and manage SignalWire Spaces from a command-line environment.
Prerequisites
Before you begin, ensure you have the following prerequisites:
- A free SignalWire Account
- SignalWire API Credentials: Copy your Project ID and API Token from the API tab of your SignalWire Dashboard. Read our Introduction to SignalWire API Calls to learn more.
- Docker Desktop
Installation
The instructions for installing WireStarter using Docker are universal and will work on MacOS, Linux, and Windows.
- Start Docker Desktop
Docker must be running at the start of the process.
- Download and install WireStarter
WireStarter has been updated recently. If you've used WireStarter before, be sure to delete the previous version and reinstall the latest version of the container.
docker run --name wirestarter briankwest/wirestarter:latest
- Start SWSH
This command starts a terminal UI which will prompt you for relevant IDs and tokens. It will walk you through configuring the development and testing environment. It then automatically enters SWSH.
Follow the prompts on screen to enter your SignalWire Space, Project ID, and API token.
Your SignalWire Space is the subdomain that prefixes signalwire.com
.
If your Dashboard is accessed at https://spacename.signalwire.com/dashboard
,
you should enter spacename
when prompted for your Space.
Copy the Project ID and REST API token from the
API pane of your SignalWire Dashboard.
If you don't plan to set up a WireStarter example application, you can safely ignore both ngrok prompts by leaving them blank and hitting Enter or Return.
docker exec -ti wirestarter bash
Learn more about WireStarter by visiting its repository on GitHub.
Running SWSH
If you'd like to run SWSH after completing the WireStarter installation, do so by entering the following commmand:
swsh
The Project ID, API Token, and API Key must be correctly configured in order to use SWSH commands.
Startup Variables
The following variables can be set to streamline startup.
They are also 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>
Have a question or bug to report?
Help us improve WireStarter for your use case by reporting an Issue on the GitHub Repository.