ClockifyCli 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ClockifyCli --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ClockifyCli --version 1.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ClockifyCli&version=1.0.3
                    
nuke :add-package ClockifyCli --version 1.0.3
                    

Clockify CLI

A powerful command-line interface for managing time entries between Clockify, Jira, and Tempo. Built with .NET 8 and featuring a beautiful, interactive terminal experience powered by Spectre.Console.

✨ Features

  • 🔄 Upload time entries from Clockify to Tempo with smart deduplication
  • 📝 Add new tasks to Clockify directly from Jira issues
  • 📊 List archivable tasks based on Jira status
  • 🔐 Secure configuration with encrypted credential storage
  • 🎨 Beautiful CLI with colors, progress bars, and interactive prompts
  • 🛡️ Safe operations with confirmation prompts and validation

🚀 Quick Start

Prerequisites

  • .NET 8.0 Runtime or later
  • Access to:
    • Clockify workspace
    • Jira instance (with API access)
    • Tempo (for time tracking)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/ClockifyCli.git
cd ClockifyCli
  1. Build the project:
dotnet build src/ClockifyCli/ClockifyCli.csproj -c Release
  1. Run the application:
dotnet run --project src/ClockifyCli/ClockifyCli.csproj

First-Time Setup

Before using any commands, you need to configure your API credentials:

# Interactive setup - you'll be prompted for each credential
clockify-cli config set

# View current configuration
clockify-cli config view

You'll need to provide:

  • Clockify API Key - From Clockify → Profile Settings → API
  • Jira Username - Your Jira email address
  • Jira API Token - From Atlassian → Account Settings → Security → API tokens
  • Tempo API Key - From Tempo → Settings → API Integration

📋 Commands

Configuration Management

config set

Interactive setup of API keys and credentials (required first step).

clockify-cli config set
config view

Display current configuration with masked sensitive values.

clockify-cli config view

Time Management

upload-to-tempo

Upload time entries from Clockify to Tempo with smart deduplication.

# Upload last 14 days (default)
clockify-cli upload-to-tempo

# Upload specific number of days
clockify-cli upload-to-tempo --days 7

# Upload with orphaned entry cleanup (use with caution)
clockify-cli upload-to-tempo --days 30 --cleanup-orphaned

Options:

  • -d, --days <number> - Number of days to upload (default: 14)
  • --cleanup-orphaned - Remove orphaned entries without Clockify IDs

Task Management

add-task

Add a new task to Clockify from a Jira issue with interactive project selection.

clockify-cli add-task

This command will:

  1. Show available Clockify projects
  2. Prompt for Jira issue reference or URL
  3. Fetch issue details from Jira
  4. Create the task with format: {IssueKey} [{Summary}]
archive-list

List tasks that can be archived based on their Jira status.

clockify-cli archive-list

Shows a table of tasks where the corresponding Jira issue is marked as "Done".

Help

Get help for any command:

clockify-cli --help
clockify-cli upload-to-tempo --help
clockify-cli config --help

🔧 Configuration

Secure Storage

All credentials are stored securely using AES-256 encryption in:

  • Windows: %APPDATA%\ClockifyCli\clockify-config.dat
  • macOS: ~/.config/ClockifyCli/clockify-config.dat
  • Linux: ~/.config/ClockifyCli/clockify-config.dat

API Keys Setup

Clockify API Key
  1. Go to Clockify → Profile Settings → API
  2. Copy your API key
Jira API Token
  1. Go to Atlassian Account Settings
  2. Create a new API token
  3. Use your Jira email as username
Tempo API Key
  1. Go to Tempo → Settings → API Integration
  2. Generate a new API token

🏗️ Architecture

Project Structure

ClockifyCli/
├── Commands/           # CLI command implementations
│   ├── BaseCommand.cs
│   ├── ConfigCommand.cs
│   ├── UploadToTempoCommand.cs
│   ├── AddTaskCommand.cs
│   └── ArchiveListCommand.cs
├── Models/            # Data models for APIs
│   ├── Clockify/      # Clockify API models
│   ├── Jira/          # Jira API models
│   └── Tempo/         # Tempo API models
├── Services/          # API clients and business logic
│   ├── ClockifyClient.cs
│   ├── JiraClient.cs
│   ├── TempoClient.cs
│   └── ConfigurationService.cs
└── Program.cs         # Application entry point

Dependencies

  • .NET 8.0 - Runtime platform
  • Spectre.Console - Rich terminal UI framework
  • Spectre.Console.Cli - Command-line interface framework
  • Newtonsoft.Json - JSON serialization

🔐 Security Features

  • Encrypted Configuration: All API keys stored with AES-256 encryption
  • Masked Display: Sensitive values are masked in output
  • Secure Prompts: API keys hidden during input
  • User-Scoped: Configuration encrypted per user account
  • No Hardcoded Values: All credentials configurable

🎨 User Experience

  • Rich Terminal UI: Colors, tables, and progress indicators
  • Interactive Prompts: Select projects, confirm actions
  • Progress Feedback: Real-time status during operations
  • Error Handling: Clear error messages and recovery guidance
  • Validation: Input validation and helpful error messages

🔄 Workflow Integration

Typical Workflow

  1. Setup (one-time):

    clockify-cli config set
    
  2. Daily/Weekly Upload:

    clockify-cli upload-to-tempo --days 7
    
  3. Adding New Tasks:

    clockify-cli add-task
    
  4. Cleanup (periodic):

    clockify-cli archive-list
    

CI/CD Integration

The CLI can be integrated into automation workflows:

# Upload time entries in a scheduled job
clockify-cli upload-to-tempo --days 1

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Clone and setup
git clone https://github.com/yourusername/ClockifyCli.git
cd ClockifyCli

# Restore dependencies
dotnet restore

# Build
dotnet build

# Run tests (if available)
dotnet test

# Run locally
dotnet run --project src/ClockifyCli/ClockifyCli.csproj -- --help

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🐛 Troubleshooting

Common Issues

"Configuration is incomplete"

Run clockify-cli config set to set up all required API credentials.

"No workspace found"

Ensure your Clockify API key is valid and you have access to at least one workspace.

Connection errors
  • Check your internet connection
  • Verify API keys are correct and not expired
  • Ensure API endpoints are accessible
Permission errors
  • Verify your Jira user has necessary permissions
  • Check Tempo API key permissions
  • Ensure Clockify workspace access

Debug Mode

For detailed error information, check the console output or enable verbose logging in your development environment.

📞 Support


Made with ❤️ using .NET 8 and Spectre.Console

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.11.64 120 9/8/2025
1.10.62 93 9/5/2025
1.9.61 98 9/5/2025
1.8.60 100 9/5/2025
1.8.59 139 9/4/2025
1.8.58 135 9/4/2025
1.7.57 131 9/4/2025
1.7.56 133 9/4/2025
1.7.54 130 9/4/2025
1.7.53 133 9/4/2025
1.7.52 138 9/4/2025
1.7.50 134 9/4/2025
1.7.49 131 9/4/2025
1.7.48 134 9/4/2025
1.7.47 136 9/4/2025
1.7.46 136 9/4/2025
1.6.43 137 9/4/2025
1.5.41 183 8/28/2025
1.4.40 194 8/26/2025
1.3.39 79 8/22/2025
1.2.38 129 8/19/2025
1.1.36 118 7/31/2025
1.1.33 114 7/31/2025
1.0.31 453 7/24/2025
1.0.30 525 7/23/2025
1.0.29 531 7/23/2025
1.0.27 529 7/23/2025
1.0.26 534 7/23/2025
1.0.25 532 7/23/2025
1.0.24 533 7/22/2025
1.0.23 533 7/22/2025
1.0.17 517 7/22/2025
1.0.16 484 7/21/2025
1.0.15 483 7/21/2025
1.0.14 415 7/21/2025
1.0.13 79 7/18/2025
1.0.12 75 7/18/2025
1.0.11 76 7/18/2025
1.0.10 80 7/18/2025
1.0.9 80 7/18/2025
1.0.7 88 7/18/2025
1.0.6 89 7/18/2025
1.0.5 101 7/18/2025
1.0.4 91 7/18/2025
1.0.3 86 7/18/2025