Search by

darkterminal / turso-php-installer

darkterminal

Turso libSQL Extension PHP Installer

Package info

github.com/darkterminal/turso-php-installer

pkg:composer/darkterminal/turso-php-installer

Fund package maintenance!

darkterminal

Statistics

Installs: 11 234

Dependents: 2

Suggesters: 0

Stars: 20

Open Issues: 0


README

Turso PHP Installer

Turso PHP Installer

A Composer package and Laravel Zero CLI that installs the native libSQL PHP extension on Linux and macOS.

MIT License Release Total downloads Contributors

Overview

turso-php-installer downloads the prebuilt libSQL extension for your PHP runtime and wires it into php.ini. It also ships local development helpers: database tokens, server certificates and local sqld environments.

  • Installs the NTS or TS build matching your PHP version
  • Stable releases only, from tursodatabase/turso-client-php
  • Interactive and non-interactive modes
  • Laravel Sail stubs with a fail-hard extension preflight

Supported Versions

PHP Versions Build Versions
8.2 TS / NTS
8.3 TS / NTS
8.4 TS / NTS
8.5 TS / NTS

TS = Thread Safe, NTS = Non Thread Safe

Supported on Linux (x86_64, arm64) and macOS. On Windows, use WSL or download the extension binary from the extension releases.

The CLI itself requires PHP 8.2 or newer. PHP 8.1 support was dropped; --php-version=8.1 is rejected.

Installation

composer global require darkterminal/turso-php-installer

Add the Composer global bin directory to your PATH:

export PATH="$(composer config --global home)/vendor/bin:$PATH"

Install interactively:

turso-php-installer install

Or non-interactively (example for PHP 8.3):

turso-php-installer install -n --php-version=8.3

Custom php.ini and extension directory:

turso-php-installer install -n --php-version=8.3 \
  --php-ini=/etc/php/8.3/cli/php.ini \
  --extension-dir=/path/to/extensions

Verify the extension is loaded:

php -m | grep libsql

Other commands: uninstall, update (extension only, not the CLI), version, token:*, server:*, sqld:*. Run turso-php-installer list for the full surface.

Documentation

Full documentation is published on GitHub Pages: https://darkterminal.github.io/turso-php-installer/

Canonical Sail stubs live in stubs/sail/.

Development

composer install
vendor/bin/pest
bash -n stubs/sail/run_turso stubs/sail/sail-entrypoint
python3 scripts/check_docs.py

Community & Support

License

This project is open-sourced under the MIT License.