GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing gitbook.com — GitBook CLI | GitBook Documentation The GitBook CLI ( It wraps the GitBook API as a set of commands, so you can list organizations, inspect spaces and pages, ask questions against your docs, and build and publish integrations — all without leaving the shell. Human and agentic workflowsThe CLI is built for two kinds of use:
If you want an AI agent to create and edit content through GitBook’s API using a purpose-built protocol, see GitBook MCP. The CLI is a good fit when you want scriptable commands, integration development, or an agent that already works comfortably in a terminal. InstallThe GitBook CLI requires Node v18 or later. Install it globally from npm: This installs the AuthenticateSign in once and the CLI stores your credentials locally, refreshing them as needed. The quickest way to sign in is through your browser: This opens GitBook in your browser, asks you to authorize the CLI, and stores the resulting token locally. Sessions are refreshed automatically. This is the recommended path for everyday use. To skip the browser flow — for CI, scripts, or publishing integrations — authenticate with a personal API token. Create one at app.gitbook.com/account/developer, then run: If you omit Confirm who you're signed in as at any time: To sign out, run Publishing integrations ( Run your first commandsMost commands are generated from the GitBook API and grouped by resource — Grab an organization ID from that output, then list its spaces: Fetch the details of a single space: List the pages in a space: Path parameters like Run Output formatsEvery API command supports the same output flags: Flag Output
Human-readable summaries (default in an interactive terminal)
JSON — best for scripts and agents
YAML
Show every field instead of the compact summary If you don't pass a flag, the CLI picks a sensible default: pretty output in an interactive terminal, and YAML when the output is piped or redirected. Pass Ask your docs a questionThe CLI can query your content with natural language and stream the answer back as it's generated: The answer streams to your terminal, followed by its sources and suggested follow-up questions. Press Drive the CLI from an AI coding agentBecause the CLI is scriptable and speaks JSON, an AI coding agent can use it as a tool while it works. Point your agent at the commands above and let it authenticate, explore your content, and act on the results. Explore an organization’s docs from the terminal. Answer a question using my docs and cite sources. Build integrationsBeyond querying content, the CLI is the primary tool for developing GitBook integrations. Scaffold a new project with: Then use Last updated Was this helpful? |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |