clockwork-cli
Manage Clockwork network operations
TLDR
Monitor Clockwork logs for the current project
Monitor Clockwork logs for a specific project
Monitor Clockwork logs for multiple projects
SYNOPSIS
clockwork-cli [options] [file]
PARAMETERS
--file, -f
Path to Clockwork JSON metadata file (default: latest in cwd)
--panel
Filter output to specific panel (e.g., queries, logs, timeline, http)
--format
Output format: table|json|compact (default: table)
--search
Search within data (e.g., SQL query text)
--version, -v
Display version info
--help, -h
Show usage help
DESCRIPTION
clockwork-cli is a third-party command-line interface primarily associated with Clockwork, a popular PHP application performance profiler and debugging tool (clockworkapp.com). Unlike standard Linux utilities, it is not included in core distributions and must be installed separately, often via Composer (composer global require itsgoingd/clockwork-cli) or from GitHub repositories.
It enables developers to inspect Clockwork-collected metadata (JSON files) from the terminal, bypassing the need for the browser extension or web UI. Key uses include viewing database queries, log entries, HTTP requests, custom events, and performance timelines without a graphical interface. Ideal for server-side debugging, CI/CD pipelines, or headless environments.
The tool parses Clockwork's *.clockwork.json files generated by middleware in frameworks like Laravel, Symfony, or vanilla PHP apps. Output is formatted for readability, with filters for specific panels like slow queries or errors. It's lightweight, fast, and integrates with scripts for automated analysis.
Note: Multiple projects use 'clockwork' name (e.g., Ruby scheduler's clockwork binary), so confirm context. Always refer to project docs for version-specific details.
CAVEATS
Not a standard Linux command; requires PHP & Composer install. Limited to Clockwork JSON format. No real-time monitoring—use with collected files only.
INSTALLATION
composer global require itsgoingd/clockwork-cli
Add ~/.composer/vendor/bin to PATH.
EXAMPLE
clockwork-cli storage/clockwork/app-abc123.clockwork.json --panel queries
Displays slow DB queries table.
HISTORY
Introduced around 2014 alongside Clockwork v2+ for PHP devs by itsgoingd. Evolved with framework integrations; maintained on GitHub with sporadic updates tied to profiler releases.


