cr-review
GitBook CR Review (direct API)
Review documentation change requests against a GitBook space or org entirely through the
GitBook REST API (https://api.gitbook.com/v1, hit with curl), so a reviewer never has
to leave Claude Code to find what needs review, understand what changed, and respond. This is
the reviewer-side companion to cr-create (the authoring side over the same API). The
reviewer flow is: discover → understand → comment → decide.
Because every step is a real HTTP call, never fake an output: if a call returns nothing, says nothing changed, or errors, report exactly that.
Auth and the gbapi helper
Every call is a Bearer-authenticated request to https://api.gitbook.com/v1. The token lives
in GITBOOK_TOKEN in the repo-root .env (create one at
https://app.gitbook.com/account/developer). Never print the token; never write it to a
tracked file. Define this helper once per session and use it for every call below — it fails
loudly on any non-2xx and prints the API's error body (curl --fail-with-body, curl ≥ 7.76 /
stock on current macOS):