Skip to content

CLI

The hedge CLI is the fastest way for a broker to work with Hedge from a terminal or a script. It wraps the REST API and handles OAuth 2.1 sign-in and token refresh for you. Source lives at github.com/taventech/hedge-cli.

Terminal window
npm i -g hedge-broker
Terminal window
hedge login

By default hedge login uses the OAuth 2.1 device flow: it prints a short code and a URL, you approve the sign-in in the broker portal, and the CLI stores a short-lived token. On a machine with a browser, sign in with a loopback redirect instead:

Terminal window
hedge login --browser

Check who you are signed in as at any time with hedge whoami. For the full auth model, see Authentication.

Run hedge <command> --help for flags and examples on any command.

Command What it does
hedge whoami Show the signed-in broker and brokerage for the current token.
hedge appetite <query> Check which markets want a class of business. Narrow with --state and --lob.
hedge submit Create a submission from an applicant and lines of business.
hedge upload Attach documents (ACORDs, loss runs, supplements) to a submission.
hedge requirements Show what a submission still needs, per market and per carrier question.
hedge finalize Hand a submission to Hedge to market to carriers.
hedge status Show the current state of a submission.
hedge submissions List your submissions.
hedge quotes List the carrier API quote sessions on a submission.
hedge answer Answer outstanding carrier questions on a quote session.
hedge request-quote Start or refresh an instant carrier quote for a submission.
hedge policies List your bound policies, or show one with its documents.
hedge payments List commission payments and payout status.
  1. Check appetite for the class and state:

    Terminal window
    hedge appetite "roofing" --state CA
  2. Create the submission:

    Terminal window
    hedge submit --insured "Acme Roofing LLC" --state CA --line "General Liability"
  3. Upload supporting documents and confirm readiness:

    Terminal window
    hedge upload <submission-id> ./acord-125.pdf ./loss-runs.pdf
    hedge requirements <submission-id>
  4. Hand it to Hedge to market:

    Terminal window
    hedge finalize <submission-id>
  5. Track progress and read results:

    Terminal window
    hedge status <submission-id>
    hedge quotes <submission-id>
    hedge policies