Download the PHP package tcrawf/zebra without Composer

On this page you can find all versions of the php package tcrawf/zebra. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zebra

Zebra - Time Tracking CLI Tool

A powerful command-line time tracking application built with PHP 8.4.

Zebra helps you track time spent on activities, which belong to projects. It supports both local and remote (Zebra API) project management.

About

This library is based on Watson, a wonderful Python-based CLI time tracking tool. Zebra written as a PHP port/reimplementation in order to provide additional zebra specific features. Pull requests are welcome!

Note: Zebra is intended for use by employees of Liip, who have access to Zebra, Liip's proprietary management system.

Features

Requirements

Installation

Via Composer (Packagist)

Note: This package is currently in alpha. To install via Composer, you must specify the stability level:

Or specify a specific version:

From Source

  1. Clone the repository:

  2. Install dependencies:

  3. Install the PHAR to your system (optional, but highly recommended):

This will build the PHAR (if needed) and install the zebra executable to:

Make sure the install directory is in your PATH.

Configuration

Zebra requires three environment variables:

  1. ZEBRA_TOKEN: Your Zebra API authentication token
  2. ZEBRA_BASE_URI: The base URI for the Zebra API (e.g., https://api.example.com)
  3. TZ: Your timezone identifier (e.g., Europe/Zurich, America/New_York)

You can set these in one of two ways:

Option 1: Environment Variables

Option 2: .env File

Create a .env file in the project root:

Note: Environment variables take precedence over .env file values.

For a list of valid timezone identifiers, see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Usage

Zebra provides a command-line interface for tracking time. Activities belong to projects, and you track time against activities.

Available Commands

Time Tracking

Frame Management

Project & Activity Management

Timesheet Management

Reporting

User & Configuration

Backup & Restore

Installation

Getting Help

For detailed usage information and available options for any command, use:

For example:

Example Output

Here's an example of time tracking entries displayed by Zebra:

Configuration

Configuration is stored in ~/.config/zebra/config.json. Use the config command to manage settings:

Development

Project Structure

Architecture

Zebra follows a clean architecture pattern with:

Code Style

This project follows PSR-12 Extended Coding Style Guide:

Check Code Style

Auto-fix Code Style Issues

Static Analysis

Run PHPStan for static analysis:

Generate a baseline (for first-time setup):

Testing

Run the test suite:

Generate test coverage report:

Coverage report will be generated in coverage/ directory.

Note: Code coverage requires a PHP coverage driver to be installed. PHPUnit supports:

Install PCOV (recommended):

Install Xdebug:

After installation, restart your PHP CLI or ensure the extension is enabled in your PHP configuration.

Development Workflow

  1. Make Changes: Edit source code following PSR-12 standards
  2. Check Style: Run composer run phpcs-check
  3. Fix Style: Run composer run phpcbf-fix if needed
  4. Run Tests: Run composer run test to ensure all tests pass
  5. Test Coverage: Run composer run test-coverage to generate coverage reports
  6. Static Analysis: Run composer run phpstan to catch type errors

Dependencies

Runtime Dependencies

Development Dependencies

Configuration Storage

Timezone Handling

All timestamps are normalized to UTC internally. The application uses the TZ environment variable to display times in your local timezone. Make sure to set TZ to a valid timezone identifier.

API Integration

Zebra integrates with the Zebra API for:

API requests are authenticated using the ZEBRA_TOKEN environment variable and use the ZEBRA_BASE_URI environment variable to determine the API endpoint. Use the refresh command to synchronize user data, projects, and activities from the API.

Troubleshooting

Xdebug Warning

If you see a warning about Xdebug being enabled, you can:

Missing Environment Variables

If you get errors about missing ZEBRA_TOKEN, ZEBRA_BASE_URI, or TZ:

  1. Check that your .env file exists in the project root
  2. Verify the variables are set correctly
  3. Ensure environment variables are exported in your shell

Note: The application will start without ZEBRA_TOKEN or ZEBRA_BASE_URI, but will warn when these are needed for API requests. This is a security precaution to prevent accidental API calls.

PHAR Execution Issues

If running from PHAR:

Backup Issues

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.

Author

Trent Crawford ([email protected])


All versions of zebra with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tcrawf/zebra contains the following files

Loading the files please wait ...