@rentaltide/cli
v0.6.0
Published
Build RentalTide apps and coverage offerings: scaffold, run against your sandbox, push config, and test an underwriter the way RentalTide calls it.
Maintainers
Readme
@rentaltide/cli
Build apps for RentalTide without the deploy-paste-reinstall cycle.
npm install -g @rentaltide/cli
rentaltide init my-app
cd my-app && npm install
rentaltide login
rentaltide link
npm run dev # your app on localhost
rentaltide dev # your sandbox now renders itWhy dev needs no tunnel
Your app is an iframe on a RentalTide page, rendered by your browser — so
http://localhost:5173 resolves fine. rentaltide dev changes your app's embed
URL to your local one, prints the sandbox links, and changes it back when you
stop it.
It refuses to do this to an approved app: repointing one that merchants have installed points all of them at your laptop.
Commands
| | |
| ------------------------------ | ---------------------------------------------------------------------- |
| init [dir] | Scaffold an app that already runs |
| login / logout / whoami | Partner account, stored in ~/.rentaltide/credentials.json (mode 600) |
| link | Attach this directory to one of your apps |
| dev [--url <url>] | Point your sandbox at your local app |
| push [--yes] | Apply rentaltide.app.json to the app record, with a diff |
| pull | Write the app record back into rentaltide.app.json |
| webhook trigger <event> | Send yourself a signed webhook |
| open [booking\|portal\|docs] | Open a sandbox surface |
Embedded insurance
An underwriter builds no iframe and holds no OAuth token — RentalTide calls them. Different world, same CLI:
rentaltide init --underwriter acme-cover
cd acme-cover
export SIGNING_SECRET=whsec_… # shown once when you created the offering
npm run dev # six endpoints on :8787
rentaltide coverage create # register it, secret saved automatically
rentaltide coverage test --url http://localhost:8787Or fire one call at a time while you are writing the thing — signed exactly the way we sign it:
rentaltide coverage quote --subtotal 1200 --currency CAD
rentaltide coverage requote --quote-id q_… --answers '{"prior_claims_3y":true}'
rentaltide coverage bind --quote-id q_…
rentaltide coverage cancel --policy-id POL-…Each prints the signed request, the status, the timing and the body, and exits non-zero on anything but a 200.
coverage test signs its requests exactly as the platform does and checks the
rules that fail quietly:
✓ Refuses an unsigned request
✓ Quote answers inside 800ms 2ms
✓ Premium is a JSON number
✓ Deposit effect is coherent
✓ A decline is a 200 with decision: declined
✓ Bind is idempotent on quoteId
✓ Policy document is httpsThen coverage dev --url https://… points the offering at a deployed endpoint,
coverage status says what is still missing, and coverage submit sends it for
review. dev refuses on an approved offering — repointing its base URL sends
real renters' quotes somewhere else.
rentaltide.app.json
Scopes and embed locations decide what your app may read and where it renders. In a web form they are invisible to review and the only record of a change is that it happened. In your repo they diff.
{
"appId": "…",
"name": "Dock Weather",
"slug": "dock-weather",
"scopes": ["read:bookings", "read:customers"],
"embedLocations": ["order-details"],
"urls": { "embed": "https://dock-weather.example.com/embed" },
"dev": { "embedUrl": "http://localhost:5173" }
}dev is local and is never pushed.
Environment
RENTALTIDE_API_URL— defaults tohttps://v3.api.rentaltide.comRENTALTIDE_APP_URL— defaults tohttps://app.rentaltide.comNO_COLOR— honoured
