PHPackages                             coquibot/coqui-toolkit-packagist-publish - 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. coquibot/coqui-toolkit-packagist-publish

ActiveLibrary

coquibot/coqui-toolkit-packagist-publish
========================================

Packagist package publishing toolkit for Coqui — submit, edit, and update packages on Packagist.org

v0.1.0(5d ago)00MITPHPPHP ^8.4CI passing

Since Mar 17Pushed 5d agoCompare

[ Source](https://github.com/carmelosantana/coqui-toolkit-packagist-publish)[ Packagist](https://packagist.org/packages/coquibot/coqui-toolkit-packagist-publish)[ RSS](/packages/coquibot-coqui-toolkit-packagist-publish/feed)WikiDiscussions main Synced today

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

Coqui Packagist Publish Toolkit
===============================

[](#coqui-packagist-publish-toolkit)

Packagist package publishing toolkit for [Coqui](https://github.com/AgentCoqui/coqui). Submit, edit, and update packages on Packagist.org — the main Composer repository.

This is the **write** companion to [coqui-toolkit-packagist](https://github.com/AgentCoqui/coqui-toolkit-packagist) (read-only search/discovery). Separated into its own package so that anonymous read operations are never blocked by credential guards.

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

[](#requirements)

- PHP 8.4+
- `symfony/http-client`
- Packagist account with API token

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

[](#installation)

```
composer require coquibot/coqui-toolkit-packagist-publish
```

When installed alongside Coqui, the toolkit is **auto-discovered** via Composer's `extra.php-agents.toolkits` — no manual registration needed.

Credentials
-----------

[](#credentials)

This toolkit requires two credentials, managed automatically by Coqui's credential system:

CredentialDescription`PACKAGIST_USERNAME`Your Packagist username`PACKAGIST_API_TOKEN`Your Packagist **MAIN** API token (not the SAFE token)Get both from your [Packagist profile page](https://packagist.org/profile/).

The **MAIN** token is required for `submit` and `edit` actions. The `update` action works with either the MAIN or SAFE token.

When running inside Coqui, the credential guard automatically prompts for these values before any tool execution. You can also set them manually:

```
# In your .env file
PACKAGIST_USERNAME=your-username
PACKAGIST_API_TOKEN=your-main-api-token
```

Tools Provided
--------------

[](#tools-provided)

### `packagist_publish`

[](#packagist_publish)

Submit, edit, and update packages on Packagist.org.

ParameterTypeRequiredDescription`action`enumYes`submit`, `edit`, `update``repository`stringVariesFull repository URL. Required for submit and update. For edit, the new URL to set.`package`stringVariesFull package name (`vendor/package`). Required for edit only.#### Actions

[](#actions)

**submit** — Register a new package on Packagist by its repository URL.

```
packagist_publish(action: "submit", repository: "https://github.com/vendor/my-package")

```

The repository must be publicly accessible and contain a valid `composer.json` with a unique package name.

**edit** — Change the repository URL for an existing package.

```
packagist_publish(action: "edit", package: "vendor/my-package", repository: "https://github.com/vendor/new-repo")

```

**update** — Trigger Packagist to re-crawl a package and pick up new releases.

```
packagist_publish(action: "update", repository: "https://github.com/vendor/my-package")

```

Returns job IDs for the crawl tasks. You can also pass a Packagist URL (`https://packagist.org/vendor/package`).

Recommended Workflow
--------------------

[](#recommended-workflow)

1. Ensure the package has a valid `composer.json` with `name`, `description`, and `license`
2. Push to a public Git repository
3. Use `packagist` search/details (from the read-only toolkit) to verify the name isn't taken
4. `packagist_publish` submit → register the package
5. `packagist_publish` update → trigger immediate crawl
6. `packagist` details → verify the package appears on Packagist

Standalone Usage
----------------

[](#standalone-usage)

```
