TBX Docs

Get started

Create your first TBX textbook

This guide walks you through creating a TBX textbook and getting it running.

Prerequisites

Configure npm to access @bside-tech/tbx from GitHub Packages:

  1. Create a personal access token with read:packages permission
  2. Add to ~/.npmrc:
    @bside-tech:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=YOUR_TOKEN

Create a new textbook

Run:

npx @bside-tech/tbx@latest create

Follow the prompts. When the book is created:

  1. Install dependencies: npm install
  2. Start the dev server: npm run dev
  3. Open the Dev bar (bottom right) for quick links to Admin, README, and other resources

Update a textbook

To upgrade your textbook when new TBX versions are released:

npx @bside-tech/tbx@latest update

This updates dependencies and scaffolding. Run it from your textbook project root.

Archive a textbook

To zip the production build for sharing:

npx @bside-tech/tbx@latest archive

The command prompts for the book folder (default ./). If dist/ is missing you will be asked to create a new build. If it already exists you can reuse it or rebuild first.

The zip is written next to dist/ as {folder}-{YYYYMMDDHHmm}.zip. Inside the zip, files sit under a folder named after the project. macOS junk such as .DS_Store is skipped.

Generate reports

To generate AMII compliance and media inventory CSVs:

npx @bside-tech/tbx@latest report

The same folder and build prompts as archive. A built dist/ with image, audio, or video assets is required. ffprobe on your PATH is optional and fills in richer audio/video metadata when present.

Two UTF-8 BOM CSVs are written at the book root, formatted for Romanian AMII “Anexa nr. 2”:

FileContents
{folder}-AMII-{YYYYMMDDHHmm}.csvHotspot inventory grouped as static, multimedia, and interactive
{folder}-ASSETS-{YYYYMMDDHHmm}.csvMedia inventory (format, size, and metadata)

NR. LOT is left blank for the publisher to fill in. The book title is taken from src/book/bookConfig.json.

Where to begin

On this page