PHPackages                             ext-php-copilot/client - 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. ext-php-copilot/client

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

ext-php-copilot/client
======================

Generic PHP 8.3 client wrapper for the ext-php-copilot native extension.

v0.1.3(3w ago)00[2 PRs](https://github.com/soderlind/ext-php-copilot/pulls)MITRustPHP &gt;=8.3CI passing

Since May 16Pushed 1w agoCompare

[ Source](https://github.com/soderlind/ext-php-copilot)[ Packagist](https://packagist.org/packages/ext-php-copilot/client)[ RSS](/packages/ext-php-copilot-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)DependenciesVersions (7)Used By (0)

ext-php-copilot
===============

[](#ext-php-copilot)

`ext-php-copilot` is a PHP 8.3+ extension, written in Rust with `ext-php-rs`, for driving GitHub Copilot through the Rust `github-copilot-sdk`.

The extension embeds the GitHub Copilot CLI when built with `COPILOT_CLI_VERSION`, while still supporting `COPILOT_CLI_PATH` and PATH resolution for local development.

Requirements
------------

[](#requirements)

- PHP 8.3 or newer, NTS recommended for the initial release, with development headers and `php-config` available.
- Rust 1.94+; nightly is configured because Windows extension builds require `abi_vectorcall`.
- GitHub Copilot CLI in `COPILOT_CLI_PATH` or PATH for dev builds, unless `COPILOT_CLI_VERSION` is set at build time.

Build
-----

[](#build)

```
cargo build
```

Build with an embedded CLI:

```
COPILOT_CLI_VERSION=1.0.48 cargo build --release
```

Run a PHP script with the debug extension on macOS:

```
php -d extension=target/debug/libext_php_copilot.dylib examples/basic.php
```

On Linux the extension suffix is `.so`; on Windows it is `.dll`.

Acceptance Test
---------------

[](#acceptance-test)

Create a local `.env` file with a Copilot-enabled token. The file is ignored by Git.

```
GITHUB_COPILOT_TOKEN=your_token_here
```

Then run the live acceptance test:

```
cargo build
php -d extension=target/debug/libext_php_copilot.dylib tests/acceptance.php
```

The script loads `.env`, verifies authentication, sends one prompt, and stores local Copilot CLI state under `var/copilot-acceptance`.

Usage Documentation
-------------------

[](#usage-documentation)

See [docs/README.md](docs/README.md) for PHP wrapper usage, native extension methods, every supported option, and examples for each method.

Platform Support
----------------

[](#platform-support)

The Copilot SDK supports embedded CLI targets for macOS arm64/x64, Linux arm64/x64, and Windows arm64/x64. PHP extensions are ABI-specific, so release artifacts must be built per OS, architecture, PHP 8.3 patch version, ZTS/NTS mode, and debug/non-debug mode.

`cargo-php` is useful for install/stub workflows on macOS and Linux. Windows support should build through Cargo directly with PHP 8.3 development headers and `rust-lld`.

Release Artifacts
-----------------

[](#release-artifacts)

Version tags build downloadable release archives for Linux, macOS, and Windows. Each OS gets two variants:

- `no-cli`: requires `COPILOT_CLI_PATH` or a GitHub Copilot CLI available on `PATH`.
- `embedded-cli`: embeds the GitHub Copilot CLI selected by `COPILOT_CLI_VERSION` in the release workflow.

Available releases are published on GitHub:

- [v0.1.3](https://github.com/soderlind/ext-php-copilot/releases/tag/v0.1.3) latest, embeds GitHub Copilot CLI `1.0.48` in the `embedded-cli` archives.
- [v0.1.2](https://github.com/soderlind/ext-php-copilot/releases/tag/v0.1.2) adds downloadable release archives for each OS and variant.
- [v0.1.1](https://github.com/soderlind/ext-php-copilot/releases/tag/v0.1.1) includes the initial CI portability fixes.

AI Contribution Attribution
---------------------------

[](#ai-contribution-attribution)

Assisted-by: GitHub Copilot

License
-------

[](#license)

MIT License.

Copyright (c) 2026 Per Søderlind.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance97

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Every ~0 days

Total

4

Last Release

24d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1649452?v=4)[Per Søderlind](/maintainers/soderlind)[@soderlind](https://github.com/soderlind)

---

Top Contributors

[![soderlind](https://avatars.githubusercontent.com/u/1649452?v=4)](https://github.com/soderlind "soderlind (14 commits)")

---

Tags

copilotcopilot-sdkphpphp-extension

### Embed Badge

![Health badge](/badges/ext-php-copilot-client/health.svg)

```
[![Health](https://phpackages.com/badges/ext-php-copilot-client/health.svg)](https://phpackages.com/packages/ext-php-copilot-client)
```

###  Alternatives

[calotype/seo

A package containing SEO helpers.

732.6k](/packages/calotype-seo)[silverstripe/multiuser-editing-alert

A module that indicates when people are editing the same page in the CMS

1531.2k1](/packages/silverstripe-multiuser-editing-alert)

PHPackages © 2026

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