PHPackages                             uwebpro/curl-printer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. uwebpro/curl-printer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uwebpro/curl-printer
====================

Print psr requests as curl command string

v3.0.0(3y ago)07PHPPHP ^8.2

Since Apr 19Pushed 3y agoCompare

[ Source](https://github.com/willpercey-gb/curl-printer)[ Packagist](https://packagist.org/packages/uwebpro/curl-printer)[ RSS](/packages/uwebpro-curl-printer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

curl-printer [![Build Status](https://camo.githubusercontent.com/83b8a7a846a75c2ddff04a4d1327944ccb4df7971a7649be1702894707ad950f/68747470733a2f2f7472617669732d63692e636f6d2f53657267657942656c2f6375726c2d7072696e7465722e7376673f6272616e63683d6d61696e)](https://travis-ci.com/SergeyBel/curl-printer)
==========================================================================================================================================================================================================================================================================================================

[](#curl-printer-)

**curl-printer** is a library which allows you print php PSR-7 request as curl command line string. It is useful for logging and debugging

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

[](#installation)

```
composer require sergey-bel/curl-printer

```

Usage
-----

[](#usage)

```
use CurlPrinter\CurlPrinter;
use GuzzleHttp\Psr7\Request;

$request = new Request(
    'POST',
    'https://someapi.com/v2/user/create',
     [
       'Accept' => 'application/json',
     ],
     'user_id=12345'
);
$printer = new CurlPrinter();
echo $printer->printRequest($request);
// curl -X POST https://someapi.com/v2/user/create -d 'user_id=12345' -H 'Accept: application/json'
```

Guzzle middleware
-----------------

[](#guzzle-middleware)

You can use **CurlPrinterMiddleware** for comfortable work with Guzzle (see [examples](https://github.com/SergeyBel/curl-printer/tree/main/examples))

```
$logger = // some LoggerInterface

$stack = // Guzzle handler stack
$stack->push(new CurlPrinterMiddleware($logger));
$client = new Client(['handler' => $stack]);
$client->post(...);
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca3a7016e84c48548703f96b6c4f62e6c7d543c8b7d17d4851115a15b35e5ab7?d=identicon)[UWebPro](/maintainers/UWebPro)

---

Top Contributors

[![SergeyBel](https://avatars.githubusercontent.com/u/1206414?v=4)](https://github.com/SergeyBel "SergeyBel (13 commits)")[![willpercey-gb](https://avatars.githubusercontent.com/u/33656628?v=4)](https://github.com/willpercey-gb "willpercey-gb (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/uwebpro-curl-printer/health.svg)

```
[![Health](https://phpackages.com/badges/uwebpro-curl-printer/health.svg)](https://phpackages.com/packages/uwebpro-curl-printer)
```

###  Alternatives

[dan-on/php-interval-tree

Is an implementation of interval binary search tree according to Thomas Cormen book "Introduction to Algorithms".

1517.6k](/packages/dan-on-php-interval-tree)

PHPackages © 2026

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