tivins/llm-stack-sdk

Maintainers

Package info

github.com/tivins/llm-stack-sdk

pkg:composer/tivins/llm-stack-sdk

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-06-14 20:25 UTC

This package is auto-updated.

Last update: 2026-06-15 10:50:43 UTC


README

PHP wrapper for the LLM Stack CLI.

Installation

composer require tivins/llm-stack-sdk

Setup

Point the SDK to your LLM Stack executable:

export LLM_STACK_PROGRAM=/path/to/llm-stack

Or pass the path directly to the constructor.

Usage

use Tivins\LlmStackSdk\Stack;

$stack = new Stack();

// List models
$stack->list();
$stack->listJson();

// Start and wait until ready (default)
$stack->start('llm_main');
$stack->status('llm_main'); // e.g. "ready"
$stack->stop('llm_main');

// Start without waiting
$stack->start('llm_main', noWait: true);
while ($stack->status('llm_main') !== 'ready') {
    sleep(2);
}

// Switch models (starting one stops the previous one)
$stack->start('llm_main');
$stack->start('llm_flash'); // stops llm_main, starts llm_flash

License

MIT