@officexapp/catalogs-cli
v0.8.7
Published
CLI for Catalog Kit — upload videos, push catalogs, manage assets
Maintainers
Readme
@officexapp/catalogs-cli
CLI for Catalog Kit — upload videos, push catalog schemas, manage assets.
Setup
npm install -g @officexapp/catalogs-cliConfigure authentication:
export CATALOG_KIT_TOKEN="cfk_your_api_key_here"The API URL defaults to https://api.catalogkit.cc. To override (e.g. for staging):
export CATALOG_KIT_API_URL="https://api-staging.catalogkit.cc"Or create ~/.catalog-kit/config.json:
{
"token": "cfk_your_api_key_here"
}Commands
Video
Upload a video, transcode to HLS, and get the streaming URL:
catalogs video upload ./demo.mp4Skip transcoding (upload only):
catalogs video upload ./demo.mp4 --no-transcodeCheck transcode status:
catalogs video status <videoId>Catalog
Push a catalog schema (creates or updates):
catalogs catalog push ./my-funnel.json
catalogs catalog push ./my-funnel.json --publishList all catalogs:
catalogs catalog listAuth
Check your current config:
catalogs whoamiLocal Dev
Preview locally with hot reload:
catalogs catalog dev my-catalog.ts
# => Local preview: http://localhost:3456
# => Watching for changes...The dev server watches your entire catalog directory:
.ts/.js/.jsonchanges — re-parses the catalog and auto-refreshes the browser (SSE-based). This includes imported modules — if your catalog imports./products.ts, editing that file triggers a reload too- Asset changes (images, CSS, etc.) — triggers a browser refresh so you see updated files immediately
- TypeScript cache-busting — each reload imports a fresh copy of your
.tsfiles, bypassing Node's ESM module cache
Custom port: catalogs catalog dev my-catalog.ts --port 8080
Using HLS URLs in Catalog Schemas
After uploading a video, use the returned hls_url in your catalog schema:
{
"id": "comp_intro_video",
"type": "video",
"props": {
"hls_url": "https://d1k9qtz75bfygl.cloudfront.net/media/transcoded/user123/video456/index.m3u8",
"poster": "https://example.com/thumb.jpg",
"chapters": [
{ "time": 0, "label": "Intro" },
{ "time": 120, "label": "Demo" },
{ "time": 300, "label": "Pricing" }
],
"skippable": false,
"require_watch_percent": 80
}
}