A command-line focus timer, available as a Docker image for containerized usage, an NPM package for both CLI usage and library integration, and as platform-specific executables.
# Using Docker
docker run -it --rm junjiewu0/lyric-timer-cli
# Using NPM (with CLI)
npx @junjie-wu/lyric-timer-cli
# Using NPM (as library)
npm install @junjie-wu/lyric-timer-cli
# Using Pre-built Image
docker pull junjiewu0/lyric-timer-cli
docker run -it --rm junjiewu0/lyric-timer-cli
# For ARM-based machines (Apple Silicon, etc.)
docker pull --platform linux/amd64 junjiewu0/lyric-timer-cli
docker run -it --rm --platform linux/amd64 junjiewu0/lyric-timer-cli
# Build and Run Locally
docker build -t lyric-timer-cli .
docker run -it --rm lyric-timer-cli
# Run with default settings (25 minutes, 15-second lyric intervals)
npx @junjie-wu/lyric-timer-cli
# Or install globally
npm install -g @junjie-wu/lyric-timer-cli
lyric-timer
import { createTimer } from '@junjie-wu/lyric-timer-cli';
await createTimer({
duration: 25,
lyricInterval: 10
});
# Build uncompressed version
npm run build:exe
# Run it
npm run start:built
# Build compressed executables for all platforms
npm run build:exe:compress
# Run based on your platform:
npm run start:mac-arm # For ARM-based machines (Apple Silicon, etc.)
npm run start:mac-intel # For Intel Macs
npm run start:linux # For Linux
# For Windows:
# After running build:exe:compress:
# 1. Find lyric-timer-win-x64.exe.gz in the executables folder
# 2. Extract using 7-Zip, WinRAR, or similar tool
# 3. Run the extracted lyric-timer-win-x64.exe
For working examples, check out the examples directory:
git clone https://github.com/junjie-w/lyric-timer-cli.git
cd lyric-timer-cli/examples
# Try different examples
npm install
npm run start:lib # Library usage
npm run start:cli # CLI usage
npm run start:docker # Docker usage
npm run start:exe # Executable usage
- ⏱️ Configurable timer duration
- 🔄 Adjustable lyric change intervals
- ⏸️ Pause/Resume functionality
- 🎨 Interactive CLI interface (built with @clack/prompts and chalk)
Option | Type | Default | Description |
---|---|---|---|
duration |
number | 25 | Timer duration in minutes |
lyricInterval |
number | 15 | Interval between lyric changes in seconds |
# Install dependencies
npm install
# Start development
npm run dev
# Run tests
npm test
# Build
npm run build
# Run the built application
npm start
Contributions, issues, and feature requests are welcome. Feel free to check issues page.
- NPM Registry: @junjie-wu/lyric-timer-cli
- Docker Hub: junjiewu0/lyric-timer-cli
- Platform-specific executables (see Executables)
MIT