<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj" -->

---
title: cpx 2.0: PHP Finally Has Its Own npx | daily.dev
description: cpx 2.0 is a PHP tool that runs any Composer package command without requiring installation, similar to npx for Node.js. It prioritizes local binaries by...
canonical: https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: cpx 2.0: PHP Finally Has Its Own npx | daily.dev
og:description: cpx 2.0 is a PHP tool that runs any Composer package command without requiring installation, similar to npx for Node.js. It prioritizes local binaries by...
og:url: https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj
og:image: https://api.daily.dev/og/posts/NGISrrQhj.png
og:image:alt: cpx 2.0: PHP Finally Has Its Own npx
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# cpx 2.0: PHP Finally Has Its Own npx

**[PHP Architect](https://daily.dev/sources/phparchitect)** · [@shocm](https://daily.dev/shocm) · 1 min read · 7 upvotes · 1 comments

## Summary

cpx 2.0 is a PHP tool that runs any Composer package command without requiring installation, similar to npx for Node.js. It prioritizes local binaries by default, lets users define their own aliases, and provides JSON output for use by automated agents.

## Content

cpx 2.0 runs any Composer package command without installing it. Local binaries win by default, aliases are yours to define, and agents get JSON output.

https://shocm.me/posts/2026-08-29-cpx-2-composer-package-executor/

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> The npx-to-cpx learning curve fits in one letter

## Similar posts on daily.dev

- [Build an Agent-Friendly CLI Tool in PHP and Run It Anywhere With CPX](https://daily.dev/posts/build-an-agent-friendly-cli-tool-in-php-and-run-it-anywhere-with-cpx-b6elxqqrg) · Tighten · 1 upvotes · 0 comments
- [Practice safe npx with Deno](https://daily.dev/posts/practice-safe-npx-with-deno-2jqcoa6sv) · Bytes by ui.dev · 1 upvotes · 0 comments
- [Features everyone should steal from npmx](https://daily.dev/posts/features-everyone-should-steal-from-npmx-cnlvorbhy) · Andrew Nesbitt · 0 upvotes · 0 comments
- [npmx alternative to npmjs released to fix pain of rpm](https://daily.dev/posts/npmx-alternative-to-npmjs-released-to-fix-pain-of-rpm-kuxeypw2d) · The Register · 17 upvotes · 2 comments

---

Tags: [#php](https://daily.dev/tags/php)

[View this post on daily.dev](https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj","headline":"cpx 2.0: PHP Finally Has Its Own npx","text":"cpx 2.0 is a PHP tool that runs any Composer package command without requiring installation, similar to npx for Node.js. It prioritizes local binaries by default, lets users define their own aliases, and provides JSON output for use by automated agents.","url":"https://daily.dev/posts/cpx-2-0-php-finally-has-its-own-npx-ngisrrqhj","datePublished":"2026-08-29T16:04:23.554Z","dateModified":"2026-09-13T21:16:23.530Z","author":{"@type":"Person","name":"Eric Johnson","url":"https://daily.dev/shocm","image":"https://media.daily.dev/image/upload/s--EPMJ-a-K--/f_auto/v1755890250/avatars/avatar_y7ct3dSEp45NFSALYHve6?_a=BAMClqZW0","description":"PHP Architect team member. I am powered by 16-year-old single malt Scotch and baseball.","worksFor":{"@type":"Organization","name":"php[architect]","logo":"https://res.cloudinary.com/daily-now/image/upload/s--10MwB_VH--/f_auto/v1726147436/companies/phparch"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":450}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"comment":[{"@type":"Comment","text":"The npx-to-cpx learning curve fits in one letter","datePublished":"2026-08-31T19:59:46.716Z","url":"https://daily.dev/posts/NGISrrQhj#c-FWCZxhI5d","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/phparchitect","name":"PHP Architect"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PHP Architect","item":"https://daily.dev/squads/phparchitect"},{"@type":"ListItem","position":3,"name":"cpx 2.0: PHP Finally Has Its Own npx"}]}
```

