The rh command line

Each command is one API request, checked on your machine first the way the server will check it. It's open source (MIT or Apache-2.0) at github.com/Ringhuddle/rh, with release builds for macOS, Linux and Windows on its releases page; issues and pull requests are welcome there.

Install

Use the installer for your system, or Cargo:

# macOS and Linux
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Ringhuddle/rh/releases/latest/download/ringhuddle-cli-installer.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Ringhuddle/rh/releases/latest/download/ringhuddle-cli-installer.ps1 | iex"

# With a Rust toolchain
cargo install ringhuddle-cli

Sign in

rh login shows a code and a link, waits for you to approve it in a browser where you're signed in, and saves the key it is given. You choose there what the key can reach.

rh login
rh groups list
rh now <group>

Where a command takes <group>, give the ring group's id (from rh groups list), or its name when no other group has that name.

Making changes

Every change takes --dry-run, which asks the server to check it and save nothing. A whole call flow can be exported as text, edited, and applied back:

rh numbers add <group> "+1 510 555 0123" --label "Front desk" --dry-run
rh export <group> -o flow.txt   # edit it, then
rh apply <group> -f flow.txt --dry-run

In scripts and CI

Set RH_API_KEY to a key made on your account page and no sign-in is needed; rh login --paste saves one you paste or pipe in. --json prints the API's reply as JSON for a script to read.

rh groups list --json
rh login --paste
rh webhooks add https://example.com/hooks/ringhuddle --event call.completed

Every command

From rh's own help. rh <command> --help has each one's arguments.

  • rh loginSign in and save an API key to a profile. In a terminal, shows a code to approve on the site; with --paste (or a key piped in), reads a key you made on your account page. RH_API_KEY overrides the saved key
  • rh logoutRemove the profile's saved API key
  • rh profilesList saved profiles
  • rh checkCheck a call-flow file without sending it, and print it as rh would send it
  • rh whoamiWho this API key belongs to
  • rh balanceMinutes left, and whether auto-reload is on
  • rh minutes buyA Checkout page for one pack. Nothing is charged until you pay there
  • rh auto-reloadTurn auto-reload (buying a pack on the saved card when minutes run low) off. `on` is refused with the page where you turn it on yourself: a key can't set the card up to be charged
  • rh cardPrints the page where you add or change the card (asks for two-step verification there)
  • rh available-numbersRingHuddle numbers for sale in an area code, for `rh groups create`
  • rh groups listList the account's ring groups
  • rh groups getOne ring group's settings, numbers and warnings
  • rh groups updateChange a ring group's settings
  • rh groups createStart a ring group on a number from `rh available-numbers`. Prints the Stripe Checkout page for its yearly subscription; it appears once paid
  • rh groups deleteDelete a ring group. Prints the link to confirm it on the site, which shows the refund. Take the number out of any call box or call forwarding first: once deleted it answers no calls for 30 days, then is released for good
  • rh groups pauseStop a ring group taking calls: callers are turned away until it's resumed
  • rh groups resumeLet a paused ring group take calls again
  • rh nowWhat a call to a ring group does right now, and when that next changes
  • rh exportPrint a ring group's call flow as text
  • rh applyReplace a ring group's call flow with the one in a file; shows what changes
  • rh steps moveMove a whole step up or down the call flow: its phones or codes and its settings go with it
  • rh steps setChange how one step rings: its dialing mode, its ring time or both. Its phones stay in it
  • rh numbers addAdd a phone at the end of a step
  • rh numbers updateChange a phone's number, label, step or the hours it rings
  • rh numbers removeRemove a phone from the ring group
  • rh numbers moveMove a phone up or down the ring order within its step
  • rh codes listA ring group's gate codes, by step, and whether each works now. PINs aren't shown (`rh export` shows them in the flow text)
  • rh codes addAdd a gate code to a keypad step. Its PIN is printed
  • rh codes updateChange a gate code: what you give replaces what it had (its name and PIN stay unless given). Moving a step's last code takes the step away
  • rh codes removeRemove a gate code
  • rh codes logKeypad entries, newest first
  • rh calendar listA ring group's calendars (never their addresses), and how a call reads the events of the next 7 days
  • rh calendar previewFetch a calendar's address and show how a call would read its events. Nothing is saved
  • rh calendar addAdd a calendar. The server fetches it first and refuses an address that gives no calendar
  • rh calendar syncFetch a calendar again now (the server does every 30 minutes)
  • rh calendar updateSet an Airbnb calendar's check-in and check-out times (its guests' codes work from check-in to check-out). It syncs again
  • rh calendar removeRemove a calendar and its events
  • rh callsCalls the ring groups took, newest first
  • rh ledgerCharges, purchases, refunds and minutes used, newest first
  • rh snoozeStop one phone, or the whole ring group, ringing for a while
  • rh webhooks listThe account's webhooks and how each last delivered
  • rh webhooks addAdd a webhook; prints its signing secret, this once
  • rh webhooks testSend a webhook a ping (within a few minutes; `rh webhooks list` then shows how it went)
  • rh webhooks rotateGive a webhook a new signing secret, printed this once. The old one also signs for 24 hours, so the receiver can switch over
  • rh webhooks removeRemove a webhook and what was waiting to be sent to it
  • rh sessions listThe browsers and devices signed in, most recently active first
  • rh sessions revokeSign out one session (an id from `rh sessions list`), or `--all`
  • rh keys listThe account's API keys, without their secrets
  • rh keys revokeRevoke a key (an id from `rh keys list`), this one included
  • rh activityWhat the account's API keys changed in the last 90 days, newest first