PHPackages                             orangephp/curl-to-cli - 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. orangephp/curl-to-cli

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

orangephp/curl-to-cli
=====================

CurlToCLI is a Orange PHP, LLC, Project meant to convert standard `curl\_exec()` calls to `curl` CLI commands.

v0.1(4y ago)06MITPHPPHP &gt;=7.2

Since Jul 1Pushed 4y agoCompare

[ Source](https://github.com/Orange-PHP/CurlToCLI)[ Packagist](https://packagist.org/packages/orangephp/curl-to-cli)[ RSS](/packages/orangephp-curl-to-cli/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (2)Used By (0)

CurlToCLI (Curl To CLI)
=======================

[](#curltocli-curl-to-cli)

CurlToCLI is a Orange PHP, LLC, Project meant to convert standard `curl_exec()` calls to `curl` CLI commands.

This makes it trivial to export even complex PHP curl calls to Postman, Insomnia or other dev teams.

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

[](#installation)

Via Composer

```
composer require --dev orangephp/curl-to-cli
```

Usage
-----

[](#usage)

You must properly prepend the `OrangePHP\` namespace every single `curl_` function call.

Then call `OrangePHP\convert_to_cli();`

```
    $handler = OrangePHP\curl_init($this->endpoint . $url);
    OrangePHP\curl_setopt($handler, CURLOPT_HTTPHEADER, $headers);
    OrangePHP\curl_setopt($handler, CURLOPT_TIMEOUT, 65);

    OrangePHP\curl_setopt($handler, CURLOPT_POSTFIELDS, $jsonData);
    OrangePHP\curl_setopt($handler, CURLOPT_POST, 1);

    OrangePHP\curl_setopt($handler, CURLOPT_CUSTOMREQUEST, $customRequest);
    OrangePHP\curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
    OrangePHP\curl_setopt($handler, CURLOPT_SSL_VERIFYPEER, $this->verifySSL);

    $response = OrangePHP\curl_exec($handler);
    $httpCode = OrangePHP\curl_getinfo($handler, CURLINFO_HTTP_CODE);

    $curlCLICommand = OrangePHP\convert_to_cli();
    error_log("CURL CLI: $curlCLICommand");
```

Use cases
---------

[](#use-cases)

✔ Rapidly start up a project right.
✔ Less time spent on boilerplating a git repo.
✔ Conforms to the most widely-deployed PHP layout.
✔ Fully compatible with the Bettergist Collective recommendation.

Testing
-------

[](#testing)

```
phpunit --testdox
```

License
-------

[](#license)

MIT license. Please see the [license file](LICENSE) for more information. :wq

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

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

1463d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f2370e5eb980d06695707bdd139e442ee6880ec9f0d365e45f5adc081a1a1e7?d=identicon)[survivorz](/maintainers/survivorz)

---

Top Contributors

[![survivorz](https://avatars.githubusercontent.com/u/71518196?v=4)](https://github.com/survivorz "survivorz (1 commits)")

---

Tags

new projectuniversal package layoutstandard package layoutproject layout

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/orangephp-curl-to-cli/health.svg)

```
[![Health](https://phpackages.com/badges/orangephp-curl-to-cli/health.svg)](https://phpackages.com/packages/orangephp-curl-to-cli)
```

###  Alternatives

[bolt/bolt-extension-starter

103.3k](/packages/bolt-bolt-extension-starter)

PHPackages © 2026

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