Skip to content

sum

The sum command generates comprehensive monthly reports showing daily work hours, productivity metrics, and calendar integration with company rest days. It provides both detailed daily breakdowns and aggregate statistics for the current month.

Terminal window
kasl sum [OPTIONS]
  • --send: Submit the monthly summary report
    • Generates and submits the summary to the configured reporting API
    • Useful for organizational reporting requirements
    • Integrates with external systems like SiServer

The monthly summary includes:

  1. Daily Breakdown: Each workday with hours and productivity percentage
  2. Rest Days: Company holidays and weekends with default hours
  3. Monthly Totals: Total hours worked and average daily hours
  4. Productivity Metrics: Average productivity across all workdays

The summary integrates data from multiple sources:

  • Local Database: Recorded workdays and pause information
  • External API: Company rest dates and holidays (if configured)
  • Configuration: Default work hours for rest days

Productivity is calculated as:

Productivity = (Net Working Time / Gross Working Time) * 100%

Where:

  • Net Working Time: Actual productive work (excluding all pauses)
  • Gross Working Time: Total presence time (excluding long breaks only)

This provides insight into how effectively time is used during work sessions.

If SiServer integration is configured, the summary will:

  • Fetch official company rest dates for the current month
  • Include these dates with default 8-hour entries
  • Distinguish between work days and rest days in the display
Terminal window
# Display monthly summary for current month
kasl sum
Terminal window
# Generate and submit summary to configured API
kasl sum --send
December 2024
+------------+----------+-------------+
| DATE | DURATION | PRODUCTIVITY|
+------------+----------+-------------+
| 2024-12-02 | 08:15 | 92.0% |
| 2024-12-03 | 07:45 | 88.0% |
| 2024-12-04 | 08:30 | 95.0% |
| 2024-12-05 | 07:20 | 85.0% |
| 2024-12-06 | 08:00 | 90.0% |
| 2024-12-07 | 08:00 | 100.0% |
| 2024-12-08 | 08:00 | 100.0% |
| 2024-12-09 | 08:15 | 91.0% |
| 2024-12-10 | 07:30 | 87.0% |
| | | |
| TOTAL | 79:15 | 92.5% |
+------------+----------+-------------+

To enable rest day integration, configure SiServer in your settings:

Terminal window
kasl init --si-server-url "https://your-server.com" --si-server-token "your-token"

Configure default hours for rest days:

Terminal window
# Set default hours for rest days (default is 8 hours)
kasl init --default-hours 8

The sum command works with other kasl commands:

  • report: Daily reports that feed into monthly summaries
  • watch: Activity monitoring that provides the underlying data
  • pauses: Manual pauses that affect summary calculations
  • export: Export monthly data for external analysis
Terminal window
# Generate monthly report for management
kasl sum --send
Terminal window
# Review productivity trends
kasl sum
# Compare with previous months
Terminal window
# Submit required monthly reports
kasl sum --send

No data for current month

Terminal window
# Check if monitoring is running
kasl watch --foreground
# Verify data exists
kasl report --last

API submission fails

Terminal window
# Check API configuration
kasl init --show-config
# Test API connection
kasl report --send

Incorrect rest days

Terminal window
# Verify SiServer configuration
kasl init --si-server-url "https://your-server.com"
# Check rest day settings
kasl init --show-config
Terminal window
# Verify daily data before generating summary
kasl report --last
# Check for missing days
kasl report --show-all
  1. Review daily reports throughout the month
  2. Generate summary at month-end
  3. Submit to organization if required
  4. Archive data for historical analysis
  1. Ensure monitoring is active during work hours
  2. Review and adjust any incorrect time entries
  3. Validate rest day configuration
  4. Check API integration before submission
  1. Submit reports promptly at month-end
  2. Keep local copies of submitted reports
  3. Review productivity trends over time
  4. Use insights to improve work patterns
  • report - Generate daily work reports
  • watch - Monitor activity for data collection
  • pauses - Record absences the monitor missed
  • export - Export data for external analysis
  • init - Configure API integration