### Quick Start - Global Installation Source: https://github.com/hellodigua/code996/blob/main/README.md Install the tool globally for easier access. ```bash npm i -g code996 code996 ``` -------------------------------- ### Usage Examples - Multi-Repository Analysis Source: https://github.com/hellodigua/code996/blob/main/README.md Examples for analyzing multiple Git repositories. ```bash # If subdirectories contain multiple repos, automatically enter multi-repo mode code996 # Specify multiple paths for analysis code996 /path/proj1 /path/proj2 # Scan all sub-repositories in a directory code996 /workspace # Analyze data and trends for 2025 across multiple repositories code996 /workspace -y 2025 # Analyze commits from the current user across all repositories code996 --self ``` -------------------------------- ### Usage Examples - Single Repository Analysis Source: https://github.com/hellodigua/code996/blob/main/README.md Examples for analyzing a single Git repository. ```bash # Analyze current repository (last year) code996 # Analyze specified repository code996 /path/to/repo # Analyze year 2025 code996 -y 2025 # Analyze years 2023-2025 code996 -y 2023-2025 # Query entire repository history code996 --all-time # Analyze only current user's commits code996 --self # Analyze current user's commits in 2025 code996 --self -y 2025 ``` -------------------------------- ### Usage Examples - Fine-grained Analysis Source: https://github.com/hellodigua/code996/blob/main/README.md Examples for performing analysis with half-hour granularity. ```bash # Display time distribution in half-hour increments code996 --half-hour # Combine with year analysis for precise display code996 -y 2025 --half-hour # Multi-repository analysis with half-hour granularity code996 /proj1 /proj2 --half-hour ``` -------------------------------- ### Quick Start - Using npx Source: https://github.com/hellodigua/code996/blob/main/README.md Run the tool with a single command using npx. ```bash npx code996 ``` -------------------------------- ### Usage Examples - Cross-Timezone Project Analysis Source: https://github.com/hellodigua/code996/blob/main/README.md Examples for analyzing projects across different timezones. ```bash # Analyze commits only in the Eastern 8th timezone (China) code996 --timezone "+0800" # Analyze commits only in the Western 7th timezone (US West Coast) code996 --timezone "-0700" # Analyze commits for a specific timezone in 2025 code996 -y 2025 --timezone "+0800" ``` -------------------------------- ### Basic Filtering Examples Source: https://github.com/hellodigua/code996/blob/main/README.md Examples of using code996 to filter commits by author and message. ```bash code996 --ignore-author "bot" # 排除所有包含 "bot" 的作者 code996 --ignore-author "bot|jenkins|github-actions" # 排除多个作者(使用 | 分隔) code996 --ignore-msg "^Merge" # 排除所有以 "Merge" 开头的提交消息 code996 --ignore-msg "merge|lint|format" # 排除多个关键词 code996 -y 2025 --ignore-author "renovate|dependabot" --ignore-msg "^Merge" # 综合过滤 ``` -------------------------------- ### Usage Examples - China Holiday and Makeup Day Analysis Source: https://github.com/hellodigua/code996/blob/main/README.md Examples for analyzing with China's holiday and makeup day logic. ```bash # Automatically enabled when the primary timezone is detected as +0800 code996 # Manually force enable holiday and makeup day logic (for non +0800 timezone projects) code996 --cn # Analyze non-China timezone projects but apply China holiday logic code996 --timezone "-0700" --cn ``` -------------------------------- ### Usage Examples - Manual Working Hours Source: https://github.com/hellodigua/code996/blob/main/README.md Examples of specifying manual working hours for more accurate analysis. ```bash # Specify 9:30 AM to 6:30 PM (supports decimals) code996 --hours 9.5-18.5 # Combine with year analysis code996 --hours 9.5-19 -y 2025 ``` -------------------------------- ### Smart Analysis Mode - Multiple Repositories Source: https://github.com/hellodigua/code996/blob/main/README.md Automatically enter multi-repository analysis mode if multiple repositories are found in a directory or by specifying multiple paths. ```bash code996 code996 /path/proj1 /path/proj2 code996 /workspace ``` -------------------------------- ### Smart Analysis Mode - Single Repository Source: https://github.com/hellodigua/code996/blob/main/README.md Analyze a single repository by running the command within it or specifying the path. ```bash code996 code996 /path/to/repo ``` -------------------------------- ### Time Range Options Source: https://github.com/hellodigua/code996/blob/main/README.md Options to specify the time range for analysis. ```bash # Specify year or year range (recommended). Single year: 2025; Range: 2023-2025 code996 -y 2025 code996 -y 2023-2025 # Specify custom start date (YYYY-MM-DD) code996 --since 2023-01-01 # Specify custom end date (YYYY-MM-DD) code996 --until 2023-12-31 # Cover the entire repository history code996 --all-time ``` -------------------------------- ### Common Exclusion Scenarios Source: https://github.com/hellodigua/code996/blob/main/README.md Common scenarios for excluding commits using code996 flags. ```bash # 排除所有 CI/CD 机器人 --ignore-author "bot|jenkins|github-actions|gitlab-ci|circleci|travis" # 排除依赖更新机器人 --ignore-author "renovate|dependabot|greenkeeper" # 排除合并和格式化提交 --ignore-msg "^Merge|^merge|lint|format|prettier" # 排除自动生成的提交 --ignore-msg "^chore|^build|^ci|auto" ``` -------------------------------- ### Filtering and Display Options Source: https://github.com/hellodigua/code996/blob/main/README.md Options for filtering and customizing the display of analysis results. ```bash # Manually specify standard working hours (e.g., 9-18) ⭐ Recommended for more accurate results code996 --hours 9-18 # Display time distribution in half-hour increments (default is hourly) 📊 More precise code996 --half-hour # Specify timezone for analysis (e.g., +0800, -0700) 🌍 For cross-timezone teams code996 --timezone "+0800" # Force enable China holiday and makeup day logic (automatically enabled for +0800 timezone) code996 --cn # Only count commits from the current Git user code996 --self # Ignore commits by specific authors (e.g., bot, jenkins) code996 --ignore-author "bot|jenkins" # Ignore commits with specific messages (e.g., ^Merge, lint) code996 --ignore-msg "^Merge|lint" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.