PHPackages                             moismailzai/clockify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. moismailzai/clockify

ActiveLibrary[API Development](/categories/api)

moismailzai/clockify
====================

Rough PHP bindings for the Clockify API. The main reason I built this is because none of Clockify's built-in reports allow time entries with duplicate titles to be aggregated.

82103PHP

Since Jan 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/moismailzai/clockify)[ Packagist](https://packagist.org/packages/moismailzai/clockify)[ RSS](/packages/moismailzai-clockify/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

UNMAINTAINED
============

[](#unmaintained)

Checkout  instead.

Summary
-------

[](#summary)

Rough PHP bindings for the Clockify API. Built because Clockify's web reports don't aggregate time entries with duplicate titles.

Installation
------------

[](#installation)

Install via Composer:

```
composer require moismailzai/clockify dev-master

```

Then include it in your PHP code:

```
require_once './vendor/autoload.php';

use MoIsmailzai\Clockify;
```

Usage
-----

[](#usage)

Use by creating a new Clockify object with your API key and the workspace you want to make reports for:

```
$clockify = new Clockify( ">", ">" );
```

### Making arbitrary API calls

[](#making-arbitrary-api-calls)

To use this as a PHP wrapper for the API, just pass in the API path to the `apiRequest` method:

```
$clockify->apiRequest( 'workspaces/' . $clockify->workspaceId . '/projects/' )
```

You can also make POST requests by including a JSON-encoded payload:

```
$clockify->apiRequest( 'workspaces/' . $clockify->workspaceId . '/reports/summary/',
    json_encode( array(
        "archived" => "Active",
        "billable" => "BOTH",
        "clientIds" => [],
        "description" => "",
        "endDate" => "2018-10-01T23:59:59.999Z",
        "firstTime" => true,
        "includeTimeEntries" => true,
        "me" => false,
        "name" => "",
        "projectIds" => [],
        "startDate" => "2018-10-01T00:00:00.000Z",
        "tagIds" => [],
        "taskIds" => [],
        "userGroupIds" => [],
        "userIds" => [],
        "zoomLevel" => "week"
    ) )
)
```

### Generating daily reports

[](#generating-daily-reports)

To generate a daily report, pass in a date to the `getReportByDay` method:

```
$report = $clockify->getReportByDay( '2018-10-01' );
```

Which will return an object like:

```
array(3) {
  ["total"]=>
  string(31) "0 hours, 12 minutes, 38 seconds"
  ["date"]=>
  string(10) "2018-10-01"
  ["projects"]=>
  array(1) {
    ["Project Name"]=>
    array(2) {
      ["time"]=>
      string(31) "3 hours, 38 minutes, 43 seconds"
      ["entries"]=>
      array(1) {
        ["First Entry"]=>
        array(3) {
          ["intervals"]=>
          array(1) {
            [0]=>
            object(stdClass)#1 (3) {
              ["start"]=>
              string(20) "2018-10-01T16:10:00Z"
              ["end"]=>
              string(20) "2018-10-01T16:22:38Z"
              ["duration"]=>
              string(8) "PT12M38S"
            }
          }
          ["total"]=>
          string(9) "PT12M38S"
          ["totalString"]=>
          string(31) "0 hours, 12 minutes, 38 seconds"
        }
      }
    }
  }
}
```

And you can format it yourself or pass the result to the built-in formatter:

```
$clockify->formatReport( $report )
```

Which will return something like:

```

---------------------------------------------------------
 Report for 2018-10-01 (0 hours, 12 minutes, 38 seconds)
---------------------------------------------------------

First Project (0 hours, 12 minutes, 38 seconds):

• First Entry (0 hours, 12 minutes, 38 seconds)

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8223318?v=4)[Mo Ismailzai](/maintainers/moismailzai)[@moismailzai](https://github.com/moismailzai)

---

Top Contributors

[![moismailzai](https://avatars.githubusercontent.com/u/8223318?v=4)](https://github.com/moismailzai "moismailzai (21 commits)")[![sajtdavid](https://avatars.githubusercontent.com/u/4595284?v=4)](https://github.com/sajtdavid "sajtdavid (1 commits)")

### Embed Badge

![Health badge](/badges/moismailzai-clockify/health.svg)

```
[![Health](https://phpackages.com/badges/moismailzai-clockify/health.svg)](https://phpackages.com/packages/moismailzai-clockify)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
