Download the PHP package marko/docs-vec without Composer

On this page you can find all versions of the php package marko/docs-vec. 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 docs-vec

marko/docs-vec

Hybrid FTS5 + sqlite-vec semantic documentation search driver for Marko — combines keyword and vector search for best-in-class relevance.

Overview

marko/docs-vec implements DocsSearchInterface using both SQLite FTS5 (keyword) and sqlite-vec (vector embeddings) with ONNX Runtime for local inference via codewithkyrian/transformers. Results are fused (reciprocal-rank fusion) across BM25 keyword ranking and cosine similarity, giving accurate answers even when the query wording differs from the documentation. When the sqlite-vec extension, the model, or transformers is unavailable — or the PHP build can't load SQLite extensions — it falls back to FTS5-only keyword search using its own built-in index. Use marko/docs-fts instead if you only want lightweight keyword search.

Installation

That alone gives you working FTS5-only search. For full hybrid semantic search, add the ONNX runtime and fetch the native extension and model:

Graceful fallback. Every piece above is optional: if the extension, model, or transformers is missing (or PHP can't load SQLite extensions), build and search degrade to FTS5-only instead of failing. marko docs-vec:build reports which mode it used.

The sqlite-vec extension

Vector search loads the native sqlite-vec extension via PHP's Pdo\Sqlite::loadExtension() (not a SELECT load_extension(...) SQL call, which SQLite blocks by default). Fetch a pinned, checksum-verified build for your platform:

Ships sqlite-vec builds for macOS, Linux, and Windows (x86_64 / arm64), written to resources/sqlite-vec/ (gitignored). Mirror/firewall override: --base-url=<your-mirror>.

ONNX model

This package uses the bge-small-en-v1.5 model (~130MB across onnx/model.onnx plus config.json, tokenizer.json, tokenizer_config.json, and special_tokens_map.json) for semantic embeddings. The files use the HuggingFace layout transformers-php expects. The model is not committed to the repository — it is downloaded on demand and verified by SHA-256.

Downloading the model

Files are written into the package at resources/models/bge-small-en-v1.5/ (gitignored). The download is pinned to a specific HuggingFace commit and each file's SHA-256 is verified. Behind a firewall or using a mirror? Pass --base-url=<your-mirror>:

marko docs-vec:build fails loudly with a pointer to this command if the model is missing.

Why not bundled?

The model is ~130MB — too large to commit to a Composer package. If you only need keyword search (no semantic/vector ranking), use the lighter marko/docs-fts driver instead, which needs no model.

Platform support

The ONNX runtime supports Linux (x64, ARM64), macOS (x64, ARM64), and Windows (x64). On unsupported platforms, or when the model has not been downloaded, docs-vec falls back to FTS5-only keyword search (no semantic ranking) using its own built-in index — it does not depend on the marko/docs-fts package.

Usage

module.php binds DocsSearchInterface to VecSearch automatically. After fetching the extension and model, build the index, then inject the contract and search:

Documentation

Full configuration, ranking details, and the docs-driver comparison: marko/docs-vec


All versions of docs-vec with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-pdo_sqlite Version *
marko/cli Version self.version
marko/core Version self.version
marko/docs Version self.version
marko/docs-markdown Version self.version
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 marko/docs-vec contains the following files

Loading the files please wait ...