hop-top/kit

This package is abandoned and no longer maintained. No replacement package was suggested.

Cross-language CLI UX parity toolkit

Maintainers

Package info

github.com/hop-top/kit-php

pkg:composer/hop-top/kit

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

dev-main 2026-05-17 03:33 UTC

This package is not auto-updated.

Last update: 2026-05-17 06:45:30 UTC


README

experimental PHP client SDK.

URI facade

The experimental SDK exposes a thin facade over hop-top/uri so kit callers can use the shared URI contract without depending on kit-specific parsing code.

<?php

use Hop\Uri\ActionRoute;
use Hop\Uri\Policy;
use HopTop\Kit\Uri\UriFacade;

$uri = UriFacade::parse('task://hop-top/uri/T-0001');
echo $uri->namespace; // hop-top/uri
echo UriFacade::canonical($uri); // task://hop-top/uri/T-0001

$policy = new Policy(
    defaultNamespaceSegments: 1,
    schemeNamespaceSegments: ['tlc' => 2],
    actionRoutes: [
        'task.claim' => new ActionRoute(
            command: 'tlc',
            args: ['-C', '{namespace}', 'task', 'claim', '{id}'],
        ),
    ],
);

$actionUri = UriFacade::parse('tlc://org/repo/T-0001?action=task.claim', $policy);
$plan = UriFacade::resolveAction($actionUri, $policy);

This facade intentionally delegates to hop-top/uri; it does not reimplement URI parsing, vanity handling, action routing, or handler identity.