Skip to content
Rinhelp
Esc
navigateopen⌘Jpreview
On this page

Run commands

Learn the CLI syntax, input modes, output, and exit codes.

Run rinhelp followed by a tool name and its inputs. You can pass inputs as JSON or as command flags.

Basic commands

rinhelp login
rinhelp logout
rinhelp ops
rinhelp account.whoami --help

rinhelp ops lists the current tool names. rinhelp <tool> --help lists that tool’s fields and marks required fields.

Run a tool

Pass one JSON object with --input:

rinhelp --json widget.preview \
  --input '{"message":"What is your return policy?"}'

Read the object from a file, or from standard input with --input-file -:

rinhelp --json inbox.list_items --input-file ./inbox-query.json
cat ./crawl.json | rinhelp --json sources.start_crawl --input-file -

Or pass each field as a flag. For example, the JSON field idempotency_key becomes the flag --idempotency-key:

rinhelp --json sources.start_crawl \
  --url https://example.com/help \
  --idempotency-key example-help-1

Do not mix --input or --input-file with field flags. The CLI rejects that combination.

JSON output

--json prints one object on standard output. A successful call looks like:

{
  "ok": true,
  "op": "account.whoami",
  "output": {}
}

Errors with --json look like:

{
  "ok": false,
  "error": {
    "code": "invalid_input",
    "message": "Input must be a JSON object"
  }
}

Without --json, successful tool results print formatted JSON and errors print to standard error.

Retry safely

When a tool requires idempotency_key, create one key for one request and reuse it only with the same input. The CLI does not create keys for you.

After adding a website, use the returned run_id as source_id in sources.show to check its progress. For a refund approval, stop if Shopify’s result is unconfirmed and check the refund status before retrying.

See the tools reference for every tool’s accepted inputs, required role, and example.

Exit codes

  • 0: success.
  • 1: tool, network, or other runtime failure.
  • 2: invalid input or command usage.
  • 3: login is required or the credential expired.
  • 4: the signed-in account is not allowed to use the tool.

If the CLI exits with 3, run rinhelp login again or provide RINHELP_ACCESS_TOKEN.

Was this page helpful?