A command-line tool for managing time entries between Clockify, Jira, and Tempo
$ dotnet add package ClockifyCliClockify CLI is a powerful command-line tool that bridges the gap between Clockify, Jira, and Tempo, enabling seamless time tracking workflow automation. Whether you're logging time, syncing data between platforms, or managing tasks, this tool simplifies your daily time tracking routine.
9:30, 2:30 PM, 2:30p, 14:30, 1:15a)📝 What's New? Check out the CHANGELOG.md for detailed release notes and version history.
dotnet tool install --global ClockifyCli
dotnet tool update --global ClockifyCli
dotnet tool uninstall --global ClockifyCli
To enable tab completion for commands and options in PowerShell, add the following to your PowerShell profile:
# Enable tab completion for the current PowerShell session
Register-ArgumentCompleter -Native -CommandName clockify-cli -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
$command = "$wordToComplete"
if ($command.Length -eq 0) {
$command = ""
}
# Get available commands and options
$commands = @('add', 'add-project', 'add-task-from-jira', 'archive-tasks-for-completed-jiras', 'breaks-report', 'config', 'delete', 'discard', 'edit', 'full-view', 'show-changelog', 'start', 'status', 'stop', 'timer-monitor', 'update-task-names-for-jiras', 'upload-to-tempo', 'week-view')
$options = @('--help', '--version')
# Filter suggestions based on what user has typed
$suggestions = ($commands + $options) | Where-Object { $_ -like "$wordToComplete*" }
foreach ($suggestion in $suggestions) {
[System.Management.Automation.CompletionResult]::new($suggestion, $suggestion, 'ParameterValue', $suggestion)
}
}
# Add to your PowerShell profile for persistent auto-completion
# First, check if you have a PowerShell profile
Test-Path $PROFILE
# If it returns False, create the profile
if (!(Test-Path $PROFILE)) {
New-Item -Type File -Path $PROFILE -Force
}
# Open your profile in notepad (or your preferred editor)
notepad $PROFILE
# Add the Register-ArgumentCompleter block from above to your profile
# Save the file and restart PowerShell or run: . $PROFILE
Note: Auto-completion helps you quickly discover available commands and options by pressing
Tabwhile typing commands.
Before using the CLI, you need to configure your API credentials for the services you want to integrate.
clockify-cli config set
This interactive command will prompt you for:
clockify-cli config view
This shows your current configuration status and masks sensitive values for security.
clockify-cli add - Add a completed time entry with both start and end times
This command is useful for logging time you've already spent working on a task. It allows you to:
clockify-cli status - See what timer is currently running
clockify-cli delete - Delete completed timers from this week (newest first)
clockify-cli discard - Permanently delete the currently running timer (cannot be undone)
clockify-cli edit - Edit start/end times of existing time entries
clockify-cli edit --days 3 - Look for entries from the last 3 days
While editing you can choose Split timer and assign the new project/task to the start portion, end portion, or a new mid portion. Mid split asks for both start and end times, updates the original entry to finish at the mid start, creates the mid entry with your selected project/task, and creates a trailing entry using the original project/task for the remaining duration.
clockify-cli start - Interactive selection of available tasks with option to start now or at an earlier time
clockify-cli stop - Stop the currently running timer
clockify-cli stop --force - Stop timer immediately without confirmation prompt
clockify-cli week-view - Display current week's logged time
clockify-cli week-view --include-current - Include currently running timer in the view
clockify-cli week-view --detailed - Show detailed view with start time, end time, and duration
clockify-cli week-view --week-start Sunday - Start the week on Sunday instead of Monday
clockify-cli week-view --include-current --detailed --week-start Wednesday - Detailed view with custom week start day
clockify-cli breaks-report - Display break time entries from the last 14 days
clockify-cli breaks-report --detailed - Show detailed view with start time, end time, and duration for breaks
clockify-cli breaks-report --days 7 - Show break entries from the last 7 days
clockify-cli breaks-report --include-current --detailed --days 30 - Comprehensive break report with running break
clockify-cli add-project - Add a new project to Clockify (interactive or via parameter)
This command allows you to create new projects directly in Clockify without needing to use the web interface. It includes:
--name parameter)Optional Parameters:
--name / -n - Specify project name directlyExamples:
# Interactive mode (prompts for project name)
clockify-cli add-project
# Quick mode with parameter
clockify-cli add-project --name "MyNewProject"
clockify-cli add-project -n "Client Project 2024"
clockify-cli add-task-from-jira - Add Jira issues as Clockify tasks (interactive or via parameters)
Features:
Optional Parameters:
--project / -p - Specify project name directly--issue / -i - Specify a single Jira issue key or URL--jql / -j - Specify a JQL query to add multiple issuesExamples:
# Interactive mode (prompts for all inputs)
clockify-cli add-task-from-jira
# Quick add single issue
clockify-cli add-task-from-jira --project "MyProject" --issue "PROJ-123"
clockify-cli add-task-from-jira -p "MyProject" -i "https://jira.company.com/browse/PROJ-123"
# Quick add multiple issues via JQL
clockify-cli add-task-from-jira --project "MyProject" --jql "project = PROJ AND status = 'In Progress'"
clockify-cli add-task-from-jira -p "MyProject" -j "assignee = currentUser() AND status != Done"
clockify-cli archive-tasks-for-completed-jiras - Archive Clockify tasks that are marked as Done in Jira
clockify-cli update-task-names-for-jiras - Sync Clockify task names with current Jira data
Purpose:
REF [PROJECT] - [PARENT / SUMMARY]Features:
clockify-cli upload-to-tempo - Upload recent time entries to Tempo
clockify-cli upload-to-tempo --days 7 - Upload last 7 days
clockify-cli upload-to-tempo --days 30 --cleanup-orphaned - Upload last 30 days and cleanup orphaned entries
The CLI automatically separates break time from work time to provide accurate reporting and ensure break entries don't get exported to work tracking systems.
week-view): Shows only regular work time, excludes all break entriesbreaks-report): Shows only break-related time entriesupload-to-tempo): Automatically excludes break time from exports to maintain clean work logs# View work time only (excludes breaks)
clockify-cli week-view
# View break time only
clockify-cli breaks-report
# Export work time to Jira (breaks are automatically filtered out)
clockify-cli upload-to-tempo
clockify-cli timer-monitor - Check timer status and show notifications
clockify-cli timer-monitor --silent - Silent mode (no console output)
clockify-cli timer-monitor --always-notify - Always show notifications regardless of timer state
clockify-cli config schedule-monitor - Set up scheduled task to monitor every 30 minutes
clockify-cli config schedule-monitor --interval 60 - Custom interval (60 minutes)
clockify-cli config schedule-monitor --remove - Remove scheduled task
clockify-cli full-view - Open Clockify in your default browser
clockify-cli --help - Show available commands
clockify-cli start --help - Show help for specific command
clockify-cli show-changelog - Display changelog with interactive version selection
clockify-cli show-changelog --version 1.11 - Display changelog for a specific version
| Command | Description |
|---|---|
config set | Interactive setup of API keys and credentials |
config view | Display current configuration status |
config schedule-monitor | Set up automated timer monitoring |
The configuration is stored securely in your user profile:
%USERPROFILE%\.clockify-cli\config.json~/.clockify-cli/config.jsonClockifyCli features an intelligent time input system that makes entering times natural and intuitive. No more struggling with seconds or manually specifying AM/PM for obvious times!
| Format | Example | Description |
|---|---|---|
| 24-hour | 14:30, 09:15 | Military time format (leading zeros optional) |
| 12-hour with PM/AM | 2:30 PM, 9:15 AM | Traditional format with full AM/PM |
| 12-hour with p/a | 2:30p, 9:15a, 1:15p | Shortened format with single letter |
| Ambiguous times | 9:30, 10:00 | Smart detection based on context |
When you enter ambiguous times (like 9:30), the system intelligently determines AM or PM based on:
| Scenario | Input | Interpretation | Why |
|---|---|---|---|
| Adding manual entry at 2 PM | Start: 8:00, End: 10:00 | 8:00 AM - 10:00 AM | Short morning session |
| Adding manual entry at 2 PM | Start: 8:00, End: 6:00 | 8:00 AM - 6:00 PM | Full work day |
| Starting timer at 2 PM | Earlier time: 9:30 | 9:30 AM (today) | Before current time |
| Starting timer at 8 AM | Earlier time: 10:00 | 10:00 PM (yesterday) | After current time → previous day |
The intelligent time input works across all time entry scenarios:
add command)edit command)start command with "Earlier time" option)| Command | Description | Examples |
|---|---|---|
add | Add a completed time entry with both start and end times | clockify-cli add |
breaks-report | Display break time entries and separate break tracking | clockify-cli breaks-report --detailed --days 7 |
delete | Delete completed timers from this week | clockify-cli delete |
discard | Permanently delete the currently running timer | clockify-cli discard |
edit | Edit, split, and retarget existing time entries | clockify-cli edit --days 7 |
start | Start a new timer by selecting from available tasks with customizable start time | clockify-cli start |
status | Display current in-progress time entry | clockify-cli status |
stop | Stop the currently running timer | clockify-cli stopclockify-cli stop --force |
week-view | Display current week's time entries | clockify-cli week-view --include-current --detailed --week-start Sunday |
| Command | Description | Examples |
|---|---|---|
add-project | Add a new project to Clockify | clockify-cli add-projectclockify-cli add-project --name "MyProject" |
add-task-from-jira | Add Jira issues as Clockify tasks | clockify-cli add-task-from-jiraclockify-cli add-task-from-jira -p "MyProject" -i "PROJ-123"clockify-cli add-task-from-jira -p "MyProject" -j "status = 'In Progress'" |
archive-tasks-for-completed-jiras | Archive Tasks For Completed Jiras | clockify-cli archive-tasks-for-completed-jiras |
update-task-names-for-jiras | Update task names with Jira hierarchy | clockify-cli update-task-names-for-jiras |
| Command | Description | Examples |
|---|---|---|
timer-monitor | Monitor timer status with notifications | clockify-cli timer-monitor --silent |
upload-to-tempo | Upload time entries from Clockify to Tempo | clockify-cli upload-to-tempo --days 7 |
| Command | Description | Examples |
|---|---|---|
config set | Configure API keys and credentials | clockify-cli config set |
config view | View current configuration | clockify-cli config view |
full-view | Open Clockify web app in browser | clockify-cli full-view |
show-changelog | Display changelog with version selection | clockify-cli show-changelog, clockify-cli show-changelog --version 1.11 |
We welcome contributions! Here's how you can help improve Clockify CLI:
git clone https://github.com/yourusername/ClockifyCli.git & cd ClockifyClidotnet restoredotnet build
dotnet test
git checkout -b feature/your-feature-namedotnet build and dotnet run -- --helpgit commit -m "Add: Description of your changes"git push origin feature/your-feature-name--help)clockify-cli config view
clockify-cli config set
clockify-cli status
clockify-cli stop
When reporting issues, please include:
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Chris Blyth using Copilot, .NET 8 and Spectre.Console
Streamline your time tracking workflow today! 🚀