@junjie-wu/lyric-timer-cli
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

LyricTimer CLI

GitHub Workflow Status Clack Chalk ncc Vitest semantic-release ESLint Husky

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.

lyric-timer-cli

⭐ Quick Start

# 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

📚 Usage

🐳 Docker

# 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

📦 NPM Package

CLI Usage

# 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

Library Integration

import { createTimer } from '@junjie-wu/lyric-timer-cli';

await createTimer({
  duration: 25,
  lyricInterval: 10
});

🧪 Executables

Running Locally with Node.js

# Build uncompressed version
npm run build:exe

# Run it
npm run start:built

Platform-specific Builds (Standalone, no Node.js required):

# 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

📋 Examples

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

🍄 Features

  • ⏱️ Configurable timer duration
  • 🔄 Adjustable lyric change intervals
  • ⏸️ Pause/Resume functionality
  • 🎨 Interactive CLI interface (built with @clack/prompts and chalk)

Configuration Options

Option Type Default Description
duration number 25 Timer duration in minutes
lyricInterval number 15 Interval between lyric changes in seconds

🛠️ Development

# Install dependencies
npm install

# Start development
npm run dev

# Run tests
npm test

# Build
npm run build

# Run the built application
npm start

🤝 Contributing

Contributions, issues, and feature requests are welcome. Feel free to check issues page.

🚀 Distribution

📄 License

MIT

Dependents (0)

Package Sidebar

Install

npm i @junjie-wu/lyric-timer-cli

Weekly Downloads

2

Version

1.2.3

License

MIT

Unpacked Size

43.3 kB

Total Files

48

Last publish

Collaborators

  • junjie-wu