← 返回
未分类 中文

Stopwatch

Run stopwatch, timer, and lap tracking with precision in terminal. Use when timing tasks, checking durations, running countdowns, analyzing splits.
在终端中精确运行秒表、计时器和圈速追踪。用于计时任务、检查时长、倒计时和分析分段。
ckchzh ckchzh 来源
未分类 clawhub v2.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 434
下载
💾 2
安装
1
版本
#latest

概述

Stopwatch

Stopwatch v2.0.0 — a versatile utility toolkit for logging, tracking, and managing time-related entries from the command line. Each command logs timestamped entries to individual log files, provides history viewing, summary statistics, data export, and full-text search across all records.

Commands

Run stopwatch [args] to use.

CommandDescription
----------------------
run Log a run entry (or view recent run entries if no input given)
check Log a check entry (or view recent check entries if no input given)
convert Log a convert entry (or view recent convert entries if no input given)
analyze Log an analyze entry (or view recent analyze entries if no input given)
generate Log a generate entry (or view recent generate entries if no input given)
preview Log a preview entry (or view recent preview entries if no input given)
batch Log a batch entry (or view recent batch entries if no input given)
compare Log a compare entry (or view recent compare entries if no input given)
export Log an export entry (or view recent export entries if no input given)
config Log a config entry (or view recent config entries if no input given)
status Log a status entry (or view recent status entries if no input given)
report Log a report entry (or view recent report entries if no input given)
statsShow summary statistics across all log files (entry counts, data size)
export Export all data in json, csv, or txt format
search Full-text search across all log entries (case-insensitive)
recentShow the 20 most recent entries from history.log
helpShow usage help
versionShow version (v2.0.0)

How It Works

Every command (run, check, convert, analyze, etc.) works the same way:

  • With arguments: Saves a timestamped entry (YYYY-MM-DD HH:MM|input) to .log and writes to history.log.
  • Without arguments: Displays the 20 most recent entries from that command's log file.

This gives you a lightweight, file-based logging system for any kind of time-tracking workflow.

Data Storage

All data is stored locally in ~/.local/share/stopwatch/:

~/.local/share/stopwatch/
├── run.log          # Run entries (timestamp|value)
├── check.log        # Check entries
├── convert.log      # Convert entries
├── analyze.log      # Analyze entries
├── generate.log     # Generate entries
├── preview.log      # Preview entries
├── batch.log        # Batch entries
├── compare.log      # Compare entries
├── export.log       # Export entries
├── config.log       # Config entries
├── status.log       # Status entries
├── report.log       # Report entries
├── history.log      # Master activity log
└── export.<fmt>     # Exported data files

Override the data directory by setting STOPWATCH_DIR (if supported) or editing the DATA_DIR variable in the script.

Requirements

  • Bash (4.0+)
  • Standard POSIX utilities: date, wc, du, tail, grep, sed, cat
  • No external dependencies — works on any Linux or macOS system out of the box

When to Use

  1. Tracking timed activities — Log start/stop times for tasks, pomodoro sessions, or work intervals throughout the day.
  2. Comparing performance across runs — Use compare and analyze to log different attempts, then search or stats to review trends.
  3. Batch processing records — Use batch to log bulk operations, then export json to feed results into other tools.
  4. Quick status checks in automation — Integrate stopwatch status or stopwatch stats into cron jobs or CI pipelines for operational dashboards.
  5. Generating reports from logged data — Use report to log milestones, then export csv to create spreadsheets or feed into reporting tools.

Examples

# Log a run entry
stopwatch run "Morning sprint: 25 minutes"

# Check recent activity
stopwatch recent

# View all run entries
stopwatch run

# Search for a specific term across all logs
stopwatch search "sprint"

# Get summary statistics
stopwatch stats

# Export everything to JSON
stopwatch export json

# Export to CSV for spreadsheet import
stopwatch export csv

Output

All commands output to stdout. Redirect to a file if needed:

stopwatch stats > report.txt
stopwatch export json  # writes to ~/.local/share/stopwatch/export.json

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

版本历史

共 1 个版本

  • v2.0.0 当前
    2026-03-30 16:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Short Drama Writer

ckchzh
短剧剧本生成器。竖屏短剧、微短剧、剧情设计、角色塑造。Short drama script generator for vertical video dramas, plot design, character building. 短剧脚本
★ 10 📥 4,310
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 42,127
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 686 📥 331,235