CLI & Build Tools
AO Lab publishes the entire build pipeline behind bible.helloao.org as two MIT-licensed npm packages so you can parse source manuscripts, generate static API files for your own translations, or run a complete mirror:
@helloao/tools: TypeScript parsers for USFM, USX, OSIS, Codex JSON, CrossWire SWORD modules, and Tyndale XML, plus static JSON API and dataset generators (zero database dependencies; runs in Node.js and browsers with aDOMParser).@helloao/cli: command-line interface (helloao) and Node.js library for SQLite database management, translation sourcing (eBible,fetch.bible,bereanbible.com, OSIS, Wordproject), WhisperX verse audio timing imports, and incrementalhelloao syncdeployments to Amazon S3, zip archives, local directories, and Typesense search clusters.
Install
Install @helloao/tools to parse Bible formats or generate static JSON in code:
npm install @helloao/toolsInstall @helloao/cli to run the helloao pipeline or manage a local SQLite database:
npm install -g @helloao/cliParse USFM or USX and generate static API files
Use @helloao/tools to turn USFM, USX, or Codex files into the exact static JSON structure served by bible.helloao.org:
import { generation } from '@helloao/tools';
const domParser = new DOMParser();
const metadata: generation.ParseTreeMetadata = {
translation: {
id: 'MY_BIBLE',
name: 'My Open Bible',
englishName: 'My Open Bible',
website: 'https://example.org',
licenseUrl: 'https://creativecommons.org/publicdomain/zero/1.0/',
language: 'eng',
direction: 'ltr',
},
};
const inputFiles: generation.InputFile[] = [
{
metadata,
content: usfmString,
fileType: 'usfm', // 'usfm' | 'usx' | 'json'
},
];
const dataset = generation.dataset.generateDataset(inputFiles, domParser);
const api = generation.api.generateApiForDataset(dataset);
const outputFiles = generation.api.generateFilesForApi(api);
for (const file of outputFiles) {
console.log(file.path); // e.g. /api/MY_BIBLE/GEN/1.json, .simple.json, books.json
}Clone or build a local SQLite database
To clone the live SQLite database or build an English-only subset with @helloao/cli:
helloao init ./bible.db --source https://bible.helloao.org/bible.db
helloao init ./bible.eng.db --overwrite --source ./bible.db --language engYou can also download prebuilt bible.db, bible.eng.db, and api.zip archives directly.
Keep a custom API mirror synced with helloao sync
helloao sync fingerprints your local translation, commentary, and dataset folders, reprocesses only changed inputs, rebuilds available_translations.json and sibling index files, and uploads diffs to S3, zip archives, or Typesense (bibleVerses.{language} collections):
{
"db": "./free-use-bible-api.db",
"sources": [
{ "type": "translations", "path": "./sources/ebible" },
{ "type": "translation", "path": "./sources/bsb" },
{ "type": "commentaries", "path": "./sources/comment" },
{ "type": "theographic", "path": "./sources/metadata" },
{ "type": "interlinear", "path": "./sources/interlinear" },
{ "type": "history-globe", "path": "./sources/history-globe" },
{ "type": "verse-of-the-day" }
],
"destinations": [
{ "url": "s3://my-bible-api-bucket", "profile": "default" },
{ "url": "./api.zip" }
]
}Run the pipeline with --dry-run first to inspect pending imports and uploads:
helloao sync ./sync.config.json --dry-run
helloao sync ./sync.config.jsonAudio verse timings
The API's .audioTimings.json endpoints store per-verse start timestamps so apps can highlight verses in sync with chapter audio. To align MP3 chapter recordings against verse text automatically with WhisperX, see tools/audio-timings, then load the resulting JSON into your database with helloao import-audio-timings.
For every CLI command, flag, and library export (actions, db, files, uploads, s3, sync, sourceConfig), read the full @helloao/cli README and @helloao/tools README.