AnyCable+ CLI
AnyCable+ is the managed AnyCable service. The anycable-plus command-line tool lets you provision and manage your cables (hosted AnyCable servers) right from the terminal.
Installation
curl -LSs https://anycable-plus.terminalwire.sh | bashThe script installs the CLI under ~/.terminalwire and adds it to your PATH. Restart your shell (or open a new terminal) and verify the installation:
anycable-plus --helpLog in
anycable-plus loginThis opens a browser window where you sign in to AnyCable+ via GitHub. The session is stored on your machine; use anycable-plus whoami to check who you are logged in as and anycable-plus logout to end the session.
Create a cable
Create a hosted AnyCable server with a single command:
anycable-plus cable create my-app --public --waitThe --wait flag keeps the command running until the cable has finished provisioning and prints its connection information:
Cable my-app is being provisioned
...
ID 42
Name my-app
Status created
WebSocket URL wss://<your-cable-host>/cable
Broadcast URL https://<your-cable-host>/_broadcast
Secret none (public mode)Point your client at the WebSocket URL and your backend at the broadcast URL, and you have a working realtime setup; the quick start shows the full round trip.
The --public flag creates a cable that accepts connections and broadcasts without authentication, which is handy for prototyping (like running a local server with anycable-go --public). For production, create a cable with a secret instead and use JWT authentication and signed streams; the quick start walks through both.
Other cable create options:
--secret=SECRET: set the AnyCable secret (for JWT, signed streams, etc.).--framework=FRAMEWORK: adjust the default configuration to your backend framework (rails,hotwire,js, orlaravel).--rpc-host=RPC_HOST: the URL of your backend for running channels (for the Rails setup).
Manage cables
List your cables:
anycable-plus cablesPrint a cable's status and connection information (URLs, secret, configuration):
anycable-plus cable info 42Change the configuration, for example, rotate the secret (pass an empty string to switch the cable to the public mode):
anycable-plus cable update 42 --secret=new-secretTerminate and delete a cable (asks for confirmation unless you pass -y):
anycable-plus cable destroy 42 -yHow it works
The CLI is a thin client for the AnyCable+ web application (built with Terminalwire): commands are defined on the server and their output is streamed to your terminal. You always have the latest command set without reinstalling anything; the flip side is that every command, including --help, requires network access (and most require being logged in).
Curious how a CLI-over-WebSocket works under the hood? Read the Any Cables #34 issue covering the AnyCable+ CLI architecture.