For tru.ID to be successful we have to make you, the developer, successful. One of the ways we're doing this is by building and open-sourcing our developer tools. The tru.ID CLI is one such tool and today we're excited to share an update that will make getting started and building with tru.ID even easier.
The latest version of the tru.ID CLI comes with plugin support along with a new `server` plugin. This update will:
Our CLI is built upon the fantastic Oclif Open CLI Framework by the folks at Heroku. Oclif comes with support for plugins via a "plugins" plugin, that enables you to build CLIs with a plugin architecture and also support plugins to be added and removed on the fly.
The ability to manage plugins on the fly lets us try out new functionality within our CLI without having to push a new main CLI release. It also opens up the possibility for you to build plugins that make you and other developers more productive.
To get started with our CLI run:
You can then run the following and you can now run a new `tru plugins` command.
As mentioned, the `tru plugins` command now lets us experiment with new features, and will allow others to contribute their own plugins.
Ordinarily, you would need to clone a git repository, configure the cloned application, install a localtunnel solution, start the server, and start the localtunnel. The localtunnel solution is required for mobile development because you'll likely want to try the application only connected to the mobile network and not a local network. All this feels like painful overhead – so we've simplified it.
With the release of the tru.ID CLI development server plugin we have removed a number of those steps by incorporating a development server and localtunnel solution within a CLI plugin. A big thanks to localtunnel.me for letting us use their awesome service.
With the tru.ID CLI installed, install the development server plugin:
Create a tru.ID project:
Run the development server:
You'll then see your development server running with a localtunnel:
You can then navigate to `http://localhost:8080` to see a basic page served by the dev server. You can also navigate to `https://{generated-sub-domain}.loca.lt` (`{generated-sub-domain}` will be an actual generated sub-domain) where you'll first see a prompt reminding you that `This website is served via a localtunnel`. After clicking `Click to Continue` you'll see the same site served via a public URL.
With the dev server up and running with a public URL, you can then focus on setting up one or all of our example applications:
We believe that this CLI feature and new plugin is one more step towards enabling you to be more successful on our platform, and we'd love to hear what you think. Please message us on Twitter or send us an email.