When I started building Terminalwire over six months ago, my goal was to build an end-to-end client/server stack and validate it with real people in production environments. I knew then I’d have to open source it then for people to take it seriously, but I kept it closed source so I could stay focused on shipping the core features.
Today is the day the Terminalwire source code is now available under the GNU Affero General Public License (AGPL)! That means that you can confidently use Terminalwire in your project and not have to worry about what happens if the company behind it goes out of business 🥷💨 or goes in a direction you don’t like.
If AGPL doesn’t work for your organization or you need support, integration, and consulting services, don’t worry, Terminalwire is available under a commercial license.
Terminalwire streams the command line from your web framework to a thin client that runs on your users’ workstations. It borrows familiar concepts from web browsers like cookies and same-domain policies so that it’s familiar to people who use web frameworks, like Rails.
The source code is available on GitHub. Do me a favor and give it a star ⭐️ while you’re there! Let’s have a look at the major sections of the code.
The Terminalwire server is split into two parts:
Terminalwire Server - Most of the Terminalwire server is implemented here, including the protocol that emits commands to the thin client and the Thor wrapper. It’s designed to work on Rack-compatible web servers across a wide variety of Ruby servers and frameworks.
Terminalwire Rails - The Rails integration for Terminalwire provides generators so you can run commands like rails g terminalwire:install MyApp
and you get the files you expect in the ./app/terminal/*.rb
directory.
The goal for Terminalwire is to have server implementations per major web framework outside of Ruby and Rails, like Next.js, Django, Phoenix, Flask, Express.js, etc.
The Terminalwire thin client is split into a few parts too:
Terminalwire Client - The Terminalwire client is implemented here, including the protocol that receives commands from the server, an entitlements security layer that protects the client from malicious server commands, and the UI that displays them.
Terminalwire executable - Packages up the Terminalwire Client code above into a self-contained cross-platform executable that can be run on any platform that supports Ruby.
Note that while the client is implemented in Ruby, it can be deployed to systems that don’t have Ruby installed.
As more people adopt Terminalwire, I expect to see more features, improvements, and bug fixes come through from the community. Additionally, we may see Terminalwire server implementations on more platforms, languages, and frameworks.
Commercial organizations that deploy Terminalwire in production are encouraged to acquire a commercial license to support Terminalwire.
While Terminalwire makes it magnitudes easier to deploy a command-line app for a SaaS and keep it always up-to-date, many organizations need help, support, and customizations beyond “install it, build it, and you’re done.”
If you need help integrating Terminalwire into your project, reach out and talk to a human to discuss your needs.
Builing a command-line app is one thing, but distributing the installer is another thing entirely. Terminalwire simplifies the process of distributing your command-line tool with a one-liner curl installer, like this:
# Installs the TinyZap command-line tool curl -s https://tinyzap.terminalwire.sh | bash
Then it’s automatically kept up-to-date so you don’t have to worry about building and maintaining software infrastructure yourself.
If you like what you read and want to see more articles like this, please consider using Terminalwire for your web application’s command-line interface. In under 10 minutes you can build a command-line in your favorite language and web framework, deploy it to your server, then stream it to the Terminalwire thin-client that runs on your users desktops. Terminalwire manages the binaries, installation, and updates, so you can focus on building a great CLI experience.