Download the PHP package martin-ro/laravel-herdr without Composer

On this page you can find all versions of the php package martin-ro/laravel-herdr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-herdr

Laravel Herdr

Latest Version on Packagist Tests Total Downloads License

A fluent, Laravel-style client for the Herdr terminal workspace socket API. It gives you an Eloquent-flavoured way to drive workspaces, tabs, panes, agents and worktrees, and to react to Herdr events — all from PHP.

Herdr's socket API is newline-delimited JSON over a local socket (a Unix domain socket on Linux/macOS, a named pipe on Windows). There is no network access and no authentication — your code talks to the Herdr instance running on the same machine. This package speaks that protocol for you.


Requirements

Installation

The service provider and Herdr facade are auto-discovered. To tweak defaults, publish the config:

Configuration

config/herdr.php (all values are env-driven):

Key Env Default Purpose
socket_path HERDR_SOCKET_PATH — Explicit socket/pipe path (highest precedence).
session HERDR_SESSION — Named session to talk to.
base_path HERDR_CONFIG_PATH ~/.config/herdr Where Herdr keeps its sockets.
connect_timeout HERDR_CONNECT_TIMEOUT 5.0 Seconds to wait for the connection.
read_timeout HERDR_READ_TIMEOUT null (block) Seconds a single read may block.

Socket resolution order (mirrors Herdr's CLI): an explicit Herdr::session('name') → socket_path → session → the default ~/.config/herdr/herdr.sock.


Usage

Everything hangs off the Herdr facade (or the herdr() helper, or type-hinting MartinRo\Herdr\HerdrManager).

Workspaces, tabs, panes

Objects returned from reads are live — they carry a connection, so you can act on them directly:

Driving a pane

Agents

Agents are addressed by a target: their unique live name, or the id of the pane hosting them. The agent field is the kind, e.g. "claude".

Declarative agent views filter and sort the sidebar's agent list:

Report agent state for a pane you control (e.g. from a custom CI runner):

Worktrees

Notifications & window title

Events

Herdr pushes events over the socket after you subscribe. Because reading events blocks, run an event loop on its own connection — typically an artisan command or queue worker, not a web request.

Subscription types use dotted names (pane.created). The pushed envelopes use underscore names and nest the payload under data, with full info objects embedded where applicable; $event->name(), $event->data() and $event->pane() unwrap this for you. Data-bearing subscriptions require scope fields: pane.agent_status_changed and pane.scroll_changed require pane_id; pane.output_matched requires pane_id, source and a match.

Block until a single event arrives (server-side, on a one-shot request). As of Herdr 0.7.5 the server only supports pane agent-status matches here:

Or client-side over a subscription stream:

Session snapshot & layouts

Plugins & integrations

Multiple sessions

Escape hatch

Every documented method is reachable, but for anything not yet wrapped (or new Herdr methods) call the raw API directly:

Returned Data/Result objects are permissive: typed accessors exist for the documented fields, and every field is reachable via ->field, ['field'], ->get('dot.path'), or ->toArray() — so undocumented or newly-added fields are never lost.


Error handling

find() helpers swallow not-found errors (Herdr namespaces them per resource, e.g. pane_not_found, workspace_not_found) and return null:


Testing

Fake the transport with Herdr::fake() — no socket required. Stub responses by method name and assert what was sent, just like Http::fake().

Drive the event stream in tests by queuing events:

Run the package's own suite:


Architecture

Field names and the connection model in this package were verified against a live Herdr 0.7.5 server (socket protocol 17).

License

MIT.


All versions of laravel-herdr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package martin-ro/laravel-herdr contains the following files

Loading the files please wait ...