npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lcyt-cli

v1.4.0

Published

CLI for sending live captions to YouTube Live streams

Readme

LCYT CLI - Live Captions for YouTube

npm version

Command-line tool for sending live captions to YouTube Live streams.

Looking for the library? See lcyt.

Installation

npm install -g lcyt-cli

Or run directly with npx:

npx lcyt-cli

Getting Started

1. Set up your YouTube stream key

lcyt --stream-key "YOUR_STREAM_KEY"

To get your stream key:

  1. Go to YouTube Studio
  2. Click Create > Go Live
  3. In stream settings, find Closed captions
  4. Enable POST captions to URL
  5. Copy the stream key (cid value)

2. Verify connection (optional)

lcyt --heartbeat

3. Send captions

lcyt "Hello, world!"          # Send a single caption
lcyt -i                       # Start interactive mode
lcyt -f                       # Start full-screen interactive mode

When running via npx lcyt-cli without arguments, it defaults to full-screen mode.

Options

| Option | Alias | Description | |--------|-------|-------------| | --stream-key <key> | -k | YouTube stream key (cid value) | | --base-url <url> | -u | Base ingestion URL (default: http://upload.youtube.com/closedcaption) | | --region <reg> | -r | Region identifier (default: reg1) | | --cue <cue> | | Cue identifier (default: cue1) | | --use-region | | Include region/cue in caption body (optional) | | --interactive | -i | Interactive mode (read from stdin) | | --fullscreen | -f | Full-screen interactive mode with file loading | | --show-config | | Show current configuration | | --heartbeat | | Send heartbeat to verify connection | | --test | | Send test payload from Google docs | | --timestamp <iso> | -t | Manual ISO timestamp override | | --reset | | Reset sequence counter to 0 | | --config <path> | -c | Config file path | | --verbose | -v | Enable verbose output | | --help | -h | Show help | | --version | | Show version number | | --log-stderr | | Write human logs to stderr instead of stdout (env: LCYT_LOG_STDERR=1) |

Interactive Mode (-i)

A simple line-by-line mode that reads from stdin.

lcyt -i

Commands:

  • <text> - Send single caption
  • timestamp|text - Send with custom timestamp
  • /batch [seconds] - Start auto-batch mode (default: 5s)
  • /send - Send collected batch immediately
  • <empty line> - Send batch (if any captions queued)
  • /heartbeat - Send heartbeat
  • /status - Show current status
  • Ctrl+C - Exit

Batch example

lcyt -i
/batch 10        # Start batch mode with 10 second timeout
Caption 1        # Timer starts here
Caption 2        # Added to batch
Caption 3        # Added to batch
# ... after 10 seconds from first caption, batch auto-sends

Full-Screen Mode (-f)

A rich terminal UI with file loading, navigation, and sent history.

lcyt -f

Keyboard shortcuts

| Key | Action | |-----|--------| | Enter | Send current file line and advance | | Up / k | Move to previous line | | Down / j | Move to next line | | PageUp / PageDown | Move up/down 10 lines | | Tab | Switch focus between input and preview | | h | Show help | | q / Ctrl+C | Quit |

Commands (type in input field)

| Command | Description | |---------|-------------| | /load <file> [line] | Load a text file, optionally jump to line number | | /reload | Reload the current file | | /goto <N> | Jump to line number N | | /batch [seconds] | Toggle batch mode (auto-send after N seconds) | | /send | Send batch immediately | | /status | Show current status | | /heartbeat | Send heartbeat to server | | /quit or /exit | Quit the application | | +N or -N | Shift pointer forward/backward N lines |

Text typed without a / prefix is sent as a custom caption (does not move the file pointer).

Example workflow

lcyt -f

# In the UI:
/load script.txt          # Load a file
/goto 10                  # Jump to line 10

# Press Enter to send the current line and advance
# Use arrow keys to navigate
# Type custom text and press Enter to send ad-hoc captions

/batch 3                  # Enable batch mode (3s auto-send)
# Press Enter multiple times to queue lines rapidly
/send                     # Or send the batch immediately

Sequence

YouTube requires an incrementing sequence counter for each stream. The counter is saved to your config file automatically.

Reset when restarting a stream:

lcyt --reset

Configuration

Config is stored in ~/.lcyt-config.json:

{
  "baseUrl": "http://upload.youtube.com/closedcaption",
  "streamKey": "YOUR_STREAM_KEY",
  "region": "reg1",
  "cue": "cue1",
  "sequence": 42
}

View current config:

lcyt --show-config

Use a custom config file:

lcyt --config /path/to/config.json

Docker / MCP notes

If you run the MCP host or a relay in Docker, rebuild the image after pulling changes so the container picks up the updated CLI behavior (logger stderr option):

# from repo root
docker build -t lcyt-mcp ./packages/lcyt-mcp
# restart your container using the new image
docker rm -f lcyt-mcp-container || true
docker run -d --name lcyt-mcp-container lcyt-mcp

Adjust image name and container commands to match your deployment.

License

MIT