ilmtest-cli
v1.12.1
Published
CLI for IlmTest API.
Readme
ilmtest-cli
ilmtest-cli is a powerful command-line interface for interacting with the IlmTest APIs, providing tools for transcription, translation, content management, and data processing workflows.
Table of Contents
Features
- AI Transcription: Automatically transcribe audio/video content using AI
- Translation Management: Process and manage translations for content
- Content Migration: Migrate entries between different formats and sources
- Shamela Integration: Process content from Shamela digital library
- AWS S3 Integration: Upload and manage files in AWS S3
- OCR Processing: Extract and process OCR data
- Interactive CLI: User-friendly interactive prompts for all operations
Installation
To install the IlmTest CLI, ensure you have Node.js version 22.0.0 or later.
Global Installation
npm install -g ilmtest-cliUsing npx (Recommended)
npx ilmtest-cliUsing Bun
bunx ilmtest-cliUsage
Interactive Mode
Run the CLI without any arguments to enter interactive mode:
ilmtest-cliThis will present you with a menu of available actions:
- AI Transcribe
- AI Translate
- Check ASL
- Delete ASL
- Download ASL
- Extract
- Upload ASL
Command Line Mode
You can also run specific commands directly:
# Transcribe content for a specific collection
ilmtest-cli --transcribe [collection-id] [volume]
# Download ASL file
ilmtest-cli --downloadAsl [collection-id]
# Process Shamela content
ilmtest-cli --shamela --collection [id] --pages [from-to]
# Extract OCR data
ilmtest-cli --extract
# Migrate entries
ilmtest-cli --migrate
# Compile translations
ilmtest-cli --compile [collection-id]
# Adjust indices with diff
ilmtest-cli --diff [number]Commands
Transcription Commands
--transcribe
Transcribe audio/video content using AI. Supports YouTube videos and local files.
ilmtest-cli --transcribe [collection-id] [volume]Content Management
--shamela
Process content from Shamela digital library with various options:
ilmtest-cli --shamela --collection [id] --pages [from-to] --multi --unused [pages|index]Options:
--collection: Shamela collection ID--pages: Page range (e.g., "1-100")--multi: Enable multi-segment processing--unused: Filter unused content by pages or index
--migrate
Migrate entries between different formats and link them with source content:
ilmtest-cli --migrate--compile
Compile translations for a specific collection:
ilmtest-cli --compile [collection-id]File Operations
--downloadAsl
Download ASL files from S3 storage:
ilmtest-cli --downloadAsl [collection-id]Upload ASL
Upload ASL files to S3 storage (interactive mode only).
Check/Delete ASL
Check existence or delete ASL files from S3 (interactive mode only).
Data Processing
--extract
Extract and process OCR data from JSON files:
ilmtest-cli --extract--diff
Adjust indices in translation files:
ilmtest-cli --diff [number]Add --preview flag to preview changes without applying them.
Configuration
The CLI requires configuration for various services. On first run, you'll be prompted to configure:
collectionsEndpoint: API endpoint for collectionstafrighApiKeys: API keys for transcription serviceawsRegion: AWS region for S3 operationsawsAccessKey: AWS access keyawsSecretKey: AWS secret keyawsBucket: AWS S3 bucket name
Configuration is stored securely using the conf package.
Requirements
- Node.js v22.0.0+ or Bun v1.2.22+
- AWS credentials (for S3 operations)
- API keys for transcription services
Development
Scripts
# Start development server
bun run start
# Build for production
bun run build
# Compile to standalone binary
bun run compile
# Format code
bun run format
# Lint code
bun run lint
# Run CI linting
bun run lint:ciDependencies
The CLI leverages several powerful libraries:
- Transcription:
tafrighfor AI transcription - Content Processing:
shamela,baburchi,bitaboom - OCR:
kokokorfor OCR data processing - AWS: Native Bun S3 client
- CLI:
@inquirer/promptsfor interactive prompts - Logging:
pinofor structured logging
License
Licensed under the MIT License. See the LICENSE file for details.
