The rbt CLI
rbt is Reboot's command line tool. It ships with the Reboot library
rather than being installed separately — see
Develop locally for how to run it in
Python and Node.js projects.
Every command reads its flags from an
.rbtrc file, so you rarely type
more than the command itself.
Commands
| Command | What it does |
|---|---|
rbt generate | Generate server, client, and React code from your API definitions. |
rbt dev run | Run your application for development, regenerating code and restarting on change. |
rbt dev expunge | Delete the state a named development application has persisted. |
rbt dashboard | Serve the developer dashboard, which watches your API directory and your feature files as you write them. Needs the reboot[dev] extra installed. |
rbt inspect type list | List the state types a running application serves. |
rbt inspect state list | List the state IDs of one type. |
rbt inspect state get | Print one instance's state as JSON. |
rbt task list / rbt task cancel | List and cancel an application's tasks. |
rbt export / rbt import | Export application data to, or import it from, JSON-lines files. |
rbt serve run | Run your application in production on your own infrastructure. |
rbt cloud up / rbt cloud down | Deploy to, or terminate on, Reboot Cloud. |
rbt cloud logs | Stream a deployed application's logs. |
rbt cloud secret set / list / delete | Manage a deployed application's secrets. |
Add --help to any of them for the full flag list.
rbt inspect works against a local rbt dev run backend and against
a deployed Reboot Cloud application (via --application-url and
--admin-credential). During local development there is also a web
view at
http://localhost:9991/__/inspect.
Bring your own certificate with rbt dev run
By default rbt dev run backends use plain HTTP, not HTTPS. That is
convenient, but browsers only use HTTP/2 over TLS, and without HTTP/2
two limits apply. Every reactive reader holds its own WebSocket, and
browsers allow only around 200 open WebSockets per page (255 in
Chrome); beyond that, new ones fail and the Reboot client logs a
warning. Other calls share a handful of HTTP/1.1 connections per
host, so many outstanding calls queue behind each other, which the
client also warns about. Over HTTPS the browser multiplexes all of
them over one HTTP/2 connection. To enable HTTPS you must provide
your own TLS certificate when running rbt dev run.
Generating a Certificate with mkcert
You can use mkcert to issue a certificate. Follow these steps:
- Install
mkcert: Refer to the instructions in themkcert READMEfor installation. - Install the root certificate: Run the following command:
mkcert -install. - Issue a certificate:
mkcert localhost.
Running mkcert <domain> will issue a certificate for the specified domain. For
local development, it is recommended to include localhost in the certificate's
Subject Alternative Names. If you use a custom domain, ensure it points to
127.0.0.1 in your /etc/hosts file for rbt dev run to work.
Configuring rbt dev run with the Certificate
Once the certificate is issued, configure rbt dev run with the following flags:
--tls-certificate=<path>- The path to the certificate file (e.g.localhost.pem).--tls-key=<path>- The path to the key file (e.g.localhost-key.pem).--tls-root-certificate=<path>- The path to the root certificate file (e.g.rootCA.pem). To locate the root certificate, use:mkcert -CAROOT.
Updating Reboot React Endpoint
Make sure to update the RebootClientProvider's url
to use HTTPS when using a custom certificate.
This setup ensures secure local development with custom certificates and enables
compatibility with rbt dev run.