sum
Command
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.
Usage
kasl sum [OPTIONS]
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
Report Components
The monthly summary includes:
- Daily Breakdown: Each workday with hours and productivity percentage
- Rest Days: Company holidays and weekends with default hours
- Monthly Totals: Total hours worked and average daily hours
- Productivity Metrics: Average productivity across all workdays
Data Sources
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 Calculation
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.
Rest Day Integration
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
Examples
Basic Monthly Summary
# Display monthly summary for current month
kasl sum
Submit Monthly Report
# Generate and submit summary to configured API
kasl sum --send
Sample Output
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% |
+------------+----------+-------------+
Configuration
SiServer Integration
To enable rest day integration, configure SiServer in your settings:
kasl init --si-server-url "https://your-server.com" --si-server-token "your-token"
Default Work Hours
Configure default hours for rest days:
# Set default hours for rest days (default is 8 hours)
kasl init --default-hours 8
Integration with Other Commands
The sum
command works with other kasl commands:
report
: Daily reports that feed into monthly summarieswatch
: Activity monitoring that provides the underlying dataadjust
: Manual time adjustments that affect summary calculationsexport
: Export monthly data for external analysis
Use Cases
Monthly Reporting
# Generate monthly report for management
kasl sum --send
Productivity Analysis
# Review productivity trends
kasl sum
# Compare with previous months
Compliance Reporting
# Submit required monthly reports
kasl sum --send
Troubleshooting
Common Issues
No data for current month
# Check if monitoring is running
kasl watch --foreground
# Verify data exists
kasl report --last
API submission fails
# Check API configuration
kasl init --show-config
# Test API connection
kasl report --send
Incorrect rest days
# Verify SiServer configuration
kasl init --si-server-url "https://your-server.com"
# Check rest day settings
kasl init --show-config
Data Validation
# Verify daily data before generating summary
kasl report --last
# Check for missing days
kasl report --show-all
Best Practices
Monthly Workflow
- Review daily reports throughout the month
- Generate summary at month-end
- Submit to organization if required
- Archive data for historical analysis
Data Quality
- Ensure monitoring is active during work hours
- Review and adjust any incorrect time entries
- Validate rest day configuration
- Check API integration before submission
Reporting
- Submit reports promptly at month-end
- Keep local copies of submitted reports
- Review productivity trends over time
- Use insights to improve work patterns