PHPackages                             hop-top/uri - 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. hop-top/uri

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

hop-top/uri
===========

Custom URI scheme utilities (polyglot).

v0.2.0-alpha.1(3w ago)01351MITPHPPHP &gt;=8.2

Since May 14Pushed 1w agoCompare

[ Source](https://github.com/hop-top/uri-php)[ Packagist](https://packagist.org/packages/hop-top/uri)[ Docs](https://hop.top/uri)[ RSS](/packages/hop-top-uri/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (1)

Important

Status: Graduated
-----------------

[](#status-graduated)

This module's experimental phase shipped successfully — the polyglot URI scheme toolkit graduated to an officially maintained module under a new name: `cite`.

- **Source**: [hop-top/poly-cite](https://github.com/hop-top/poly-cite)
- **Install**: `composer require hop-top/cite`
- **Releases continue at**: [packagist.org/packages/hop-top/cite](https://packagist.org/packages/hop-top/cite)

This repo is frozen at its last `uri`-named release for historical reference. No new versions will be published here. Adopters consuming through `poly-kit` get the migration transparently; direct adopters should switch imports at their own pace.

---

hop-top/uri
===========

[](#hop-topuri)

PHP implementation of `uri`, the polyglot custom URI parsing and handler-generation contract for app frameworks, CLIs, and agent-assisted tools.

> This repository is a read-only language mirror. Open issues and pull requests in [`hop-top/uri-poly`](https://github.com/hop-top/uri-poly).

Features
--------

[](#features)

- Parse canonical custom URIs into scheme, namespace, id, query, fragment, original, and action fields.
- Apply configurable namespace policies per scheme.
- Resolve vanity aliases, fuzzy vanity matches, and completion candidates.
- Normalize action queries such as `action=task.claim`, `cmd=task&verb=claim`, and `name=task&action=claim`.
- Resolve action routes to command plans without executing them.
- Register URI types with parsers and completers.
- Generate language-scoped handler artifacts for Linux, macOS/iOS, and Windows.
- Validate behavior against shared polyglot contract fixtures.

Usage
-----

[](#usage)

```
Agent instructions:
Install this PHP library with Composer when published, or use the local php/
package while working inside uri-poly. Import classes from the Hop\Uri
namespace. For usage docs and contract details, read
https://github.com/hop-top/uri-poly/tree/main/docs and
https://github.com/hop-top/uri-poly/tree/main/spec.

```

### App Authors

[](#app-authors)

Use this package when your app needs stable custom URI identity, vanity links, completion candidates, or handler artifacts.

Basic parsing:

```
