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.
kasl sum [OPTIONS]Options
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “Examples”Basic Monthly Summary
Section titled “Basic Monthly Summary”# Display monthly summary for current monthkasl sumSubmit Monthly Report
Section titled “Submit Monthly Report”# Generate and submit summary to configured APIkasl sum --sendSample Output
Section titled “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
Section titled “Configuration”SiServer Integration
Section titled “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
Section titled “Default Work Hours”Configure default hours for rest days:
# Set default hours for rest days (default is 8 hours)kasl init --default-hours 8Integration with Other Commands
Section titled “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 datapauses: Manual pauses that affect summary calculationsexport: Export monthly data for external analysis
Use Cases
Section titled “Use Cases”Monthly Reporting
Section titled “Monthly Reporting”# Generate monthly report for managementkasl sum --sendProductivity Analysis
Section titled “Productivity Analysis”# Review productivity trendskasl sum# Compare with previous monthsCompliance Reporting
Section titled “Compliance Reporting”# Submit required monthly reportskasl sum --sendTroubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”No data for current month
# Check if monitoring is runningkasl watch --foreground
# Verify data existskasl report --lastAPI submission fails
# Check API configurationkasl init --show-config
# Test API connectionkasl report --sendIncorrect rest days
# Verify SiServer configurationkasl init --si-server-url "https://your-server.com"
# Check rest day settingskasl init --show-configData Validation
Section titled “Data Validation”# Verify daily data before generating summarykasl report --last
# Check for missing dayskasl report --show-allBest Practices
Section titled “Best Practices”Monthly Workflow
Section titled “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
Section titled “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
Section titled “Reporting”- Submit reports promptly at month-end
- Keep local copies of submitted reports
- Review productivity trends over time
- Use insights to improve work patterns