Skip to content
Navigation
View as Markdown

CLI

The thinkbench CLI exposes every API operation as a subcommand: commands, flags, and help text are derived from the same contract as the REST API, so the CLI is never missing an operation.

npx thinkbench drives list

Configuration

Variable Description
THINKBENCH_API_KEY Required. An API key from Settings → API keys.
THINKBENCH_AGENT (optional) Names the software making requests for attribution.
THINKBENCH_BASE_URL (optional) Defaults to https://app.thinkbench.com/api/v1.

Output shaping

Every command accepts --pick <field> to print a single top-level field of the response, raw:

npx thinkbench documents read --document-id "<documentId>" --pick markdown

Piping to jq works too — --pick just keeps the CLI self-sufficient.

Commands

Flags for each command are the operation's input fields, kebab-cased (documentId becomes --document-id); see each operation page for the full list. npx thinkbench --help prints the same catalog.

Command Summary
thinkbench documents read Read a ThinkBench document and return its current content as Markdown.
thinkbench drive-items shared-with-me List items shared directly with the user via share grants.
thinkbench drive-items get Read a drive item with its drive, children, visible ancestors, and shares.
thinkbench drive-items rename Rename a drive item.
thinkbench drive-items move Move an item to another folder or drive.
thinkbench drive-items create-child Create a folder or document inside a folder.
thinkbench drive-items share-suggestions Organization members who could be given access to this item.
thinkbench drive-items share Grant a person access to an item by email.
thinkbench drive-items update-share Change an existing share grant's permission.
thinkbench drive-items remove-share Revoke a share grant.
thinkbench drive-items set-publication Publish or unpublish a document to the web.
thinkbench drives list List every drive the user can access, each with its items and members.
thinkbench drives create Create a shared drive in the active organization.
thinkbench drives rename Rename a drive.
thinkbench drives create-item Create a folder or document at the drive's root.
thinkbench drives upsert-member Add an organization member to a shared drive or change their role.
thinkbench drives remove-member Remove a member from a shared drive.