Search by

b4n1 / b4n1-db

b4n1

b4n1-db SDK for PHP - sovereign embedded database over the b4n1-db binary

Package info

github.com/B4N1-com/b4n1-db

Homepage

Language:Java

pkg:composer/b4n1/b4n1-db

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

v0.1.4 2026-11-27 07:34 UTC

This package is auto-updated.

Last update: 2026-11-27 20:09:12 UTC


README

B4N1 DB — Sovereign Data Future

🗄️ b4n1-db

The sovereign embedded data layer. One handle, eight engines — Python, Node.js, Ruby, PHP, Java, .NET and Go. KV, SQL, graph, documents, queues, vectors and a Merkle-DAG audit log in one local, dependency-free core. No daemon, no network, no external database.

License PyPI PyPI downloads Pepy downloads npm npm downloads NuGet NuGet downloads RubyGems Packagist Go Reference

Status: library + standalone binary. Ships a native library AND a standalone b4n1-db CLI (KV, SQL, graph, documents, queues, vectors, audit, migrations, transfer, plus an offline demo and docs). No MCP server.

Languages: العربية · Deutsch · Español · Français · हिन्दी · Italiano · 日本語 · 한국어 · Português (BR) · Русский · 中文

Table of contents

What it is

b4n1-db is an embedded, multi-engine data layer. You open a directory and get a single handle that exposes eight storage engines, all local, all deterministic, all auditable:

Engine What it does
KV Key/value with TTL, atomic counters, CAS
SQL Analytical SQL over columnar storage
Graph Knowledge graph with hybrid search
Doc Document collections with field queries
Queue FIFO queues with ack/nack
Vector Cosine-similarity vector index
Audit Merkle-DAG audit log with time travel
Migration Schema migration registry

No daemon. No network. No external database. Just open a path and use it.

Install

Python

pip install b4n1-db

Node.js

npm install b4n1-db

.NET

dotnet add package B4n1.Db

Ruby

gem install b4n1-db

PHP (Composer)

composer require b4n1/b4n1-db

Go

go get github.com/B4N1-com/b4n1-db/sdks/go

Binary (CLI)

Download from the releases page or build from source.

Quick start

# Open a database and put a value
b4n1-db kv put mydb greeting "hello"

# Read it back
b4n1-db kv get mydb greeting

# Run SQL
b4n1-db sql query mydb "SELECT * FROM users WHERE age > 25"

# Offline demo (no network needed)
b4n1-db demo

# Built-in documentation
b4n1-db docs

# License text
b4n1-db --licenses

Subsystems

Each subsystem is a subcommand of the b4n1-db binary:

Verb Description
kv Key/value store: put, get, delete, scan, TTL
sql Analytical SQL engine
graph Knowledge graph and hybrid search
doc Document collections
queue FIFO queues with ack/nack
vector Vector index with cosine similarity
audit Merkle-DAG audit log
migration Schema migration registry
transfer Backup, restore and JSON transfer
stats Database statistics
demo Offline 1-click demonstration
docs Built-in documentation

SDKs

The sdks/ directory contains thin wrappers for 7 languages. Each SDK embeds the native binary and resolves it in this order:

  1. B4N1_DB_BIN env var (explicit override)
  2. Embedded binary in bin/ (shipped with the package)
  3. PATH (system-wide install)
SDK Directory Package
Python sdks/python/ PyPI: b4n1-db
Node.js sdks/node/ npm: b4n1-db
.NET sdks/cs/ NuGet: B4n1.Db
Ruby sdks/ruby/ RubyGems: b4n1-db
PHP sdks/php/ Packagist: b4n1/b4n1-db
Go sdks/go/ Go modules
Java sdks/java/ (Maven pending)

License

Business Source License 1.1 (BUSL-1.1). See LICENSE and EULA.txt.

Part of the B4N1 ecosystem.