Skip to main content

CLI

The Hey Bible CLI brings Scripture to your terminal, your scripts, and your AI agents. It's a thin wrapper over the Node.js client, and every command supports --json for clean, machine-readable output.

npm version

Installation

npm install -g @hey-bible/cli

Or run it on demand with npx (no install required):

npx -y @hey-bible/cli search John 3

Configuration

Set your API key as an environment variable (or pass --api-key per command):

export HEY_BIBLE_API_KEY=your_api_key_here

See Generating API Keys to create one.

VariableDescription
HEY_BIBLE_API_KEYYour API key (required).
HEY_BIBLE_API_URLOverride the API base URL (default: https://api.heybible.app).

Usage

# Look up a verse range (defaults to ESV)
hey-bible search John 3 --start-verse 16 --end-verse 18

# Look up a whole chapter in a specific translation
hey-bible bibles
hey-bible search Psalms 23 --bible-id kjv

# List the books of the Bible
hey-bible books

# Get raw JSON (recommended for scripts and AI agents)
hey-bible search "1 Corinthians" 13 --json

Commands

CommandDescription
biblesList available Bible translations.
booksList the 66 books with their 3-letter codes and chapter counts.
search <book> <chapter>Look up verses. Saves the lookup to your account.
favoritesList favorited verses with notes, images, conversations, and tags.
notesList your verse notes.
imagesList AI-generated verse images (use --id for a signed URL).
chatsList chat conversations with verse context.
tagsList the tags you use to organize favorites.

search options

FlagDescription
-s, --start-verse <n>Starting verse number.
-e, --end-verse <n>Ending verse number.
-b, --bible-id <id>Translation ID (defaults to ESV; see hey-bible bibles).

Global options

FlagDescription
--jsonOutput raw JSON (recommended for scripts and AI agents).
--api-key <key>API key (or set HEY_BIBLE_API_KEY).
--api-url <url>Override the API base URL (or set HEY_BIBLE_API_URL).
-v, --versionPrint the version.
-h, --helpShow help for any command.

The list commands (favorites, notes, images, chats) accept -l, --limit <n> and -o, --offset <n> for pagination, and notes/images/chats accept -i, --id to fetch a single record.

Use with AI agents

Because every command emits structured JSON with --json, the CLI is an easy way to give an AI agent access to Scripture. For OpenClaw-compatible agents, install the Agent Skill, which wraps this CLI.

npx -y @hey-bible/cli search John 3 --json