open-index/open-npm huggingface dataset:
npm package: @sqlbro/builder
Description: Quickly prototype Sqlite databases
Latest version: 0.0.5

# Sqlbro builder

[![pub package](https://img.shields.io/npm/v/@sqlbro/builder)](https://www.npmjs.com/package/@sqlbro/builder)

Tooling to quickly prototype Sqlite databases in Nodejs

## Install

```bash
npm install @sqlbro/builder
```

## Usage

### Initialize the db

Define a database schema:

```ts
const schemas = [
  `CREATE TABLE "category" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "name" TEXT NOT NULL,
  "slug" TEXT NOT NULL UNIQUE,
  "icon" TEXT NOT NULL,
  "parent_id" INTEGER,
  FOREIGN KEY(parent_id) REFERENCES category(id)
)`,
  `CREATE TABLE "product" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "name" TEXT NOT NULL UNIQUE,
  "description"	TEXT NOT NULL,
  "props"	TEXT DEFAULT '{}',
  "category_id" INTEGER NOT NULL,
  FOREIGN KEY(category_id) REFERENCES category(id)
)`];
```

Initialize the database:

```ts
import DatabaseConstructor from "better-sqlite3";
import { readJsonFile, DbBuilder, execute } from "@sqlbro/builder";

const dbPath = "/some/path/db.sqlite";
const db = new DatabaseConstructor(dbPath);
const builder = new DbBuilder(db).init(schemas);
```

### Insert data

Read `Record<string, Array<Record<string, any>>>` objects in a json file:

```ts
const jsonData = await builder.readJsonFileObjects(__dirname + "/data.json");
```

Or read `Array<Record<string, any>>` objects in a json file:

```ts
const jsonData = await builder.readJsonFileArray(__dirname + "/data.json");
```

Insert into the database from the json data:

```ts
builder.insertJson("category", jsonData["categories"]);
```

This will parse the json and convert the rows to an insert query. Possible data types:

- `string`: for TEXT fields
- `number`: for INTEGER or REAL fields
- `object`: any json array or object. Will be parsed into a TEXT field

Example json:

```json
[
  {
    "id": 37,
    "name": "item",
    "props": {
      "foo": "bar"
    }
  }
]
```

Will be transformed into:

```sql
INSERT INTO mytable VALUES (37, "item", '{"foo": "bar"}')
```

## Example

An [example](https://github.com/synw/sqlbro/tree/main/example/db) is available
npm package: @sqlite-hub/cli
Description: CLI for sqlite-hub — manage databases and API keys from the terminal
Latest version: 0.2.1

# @sqlite-hub/cli

Command-line tool for sqlite-hub. Manage your databases and API keys from the terminal.

## Installation

```bash
npm install -g @sqlite-hub/cli
# or
pnpm add -g @sqlite-hub/cli
```

## Authentication

Log in with your sqlite-hub account token (`shs_...`):

```bash
sqlite-hub auth login --token shs_your_token_here
```

Check who you're logged in as:

```bash
sqlite-hub auth whoami
```

Log out:

```bash
sqlite-hub auth logout
```

Credentials are stored in `~/.sqlite-hub/config.json` (mode `0600`).

## Commands

### Databases

```bash
# List all databases
sqlite-hub databases list

# Create a new database
sqlite-hub databases create my-app-db
sqlite-hub databases create my-app-db --display-name "My App DB" --description "Production database"

# Alias: db
sqlite-hub db list
```

### API Keys

```bash
# List all active API keys
sqlite-hub keys list

# Create a new API key (token shown once — save it!)
sqlite-hub keys create "my-app"

# Revoke a key by ID
sqlite-hub keys revoke <id>
```

## Custom Control Plane URL

If you're self-hosting, pass a custom base URL at login:

```bash
sqlite-hub auth login --token shs_... --base-url https://control.mycompany.com
```

The base URL is saved in `~/.sqlite-hub/config.json` and used for all subsequent commands.
npm package: @sqlite-hub/client
Description: TypeScript SDK for sqlite-hub (Node.js, browser, CLI)
Latest version: 0.3.1

# @sqlite-hub/client

TypeScript SDK for sqlite-hub. Access your databases from Node.js, browsers, or CLI tools.

## Installation

```bash
npm install @sqlite-hub/client
# or
pnpm add @sqlite-hub/client
```

## Quick Start

```typescript
import { SqliteHubClient } from '@sqlite-hub/client';

const client = new SqliteHubClient({
  apiKey: 'shs_your_api_key',
  baseUrl: 'https://control.yourdomain.com'  // your sqlite-hub control plane URL
});

// Query a database
const result = await client.databases
  .get('db-uuid')
  .query('SELECT * FROM users WHERE active = ?', [1]);

console.log(result.rows); // [{ id: 1, name: 'Alice' }, ...]

// Write data
const exec = await client.databases
  .get('db-uuid')
  .exec('INSERT INTO users (name) VALUES (?)', ['Bob']);

console.log(exec.changes); // 1

// Manage API keys
const { key } = await client.apiKeys.create('production-key');
console.log(key); // shs_... (shown once)
```

## Features

- ✅ Type-safe `query()` (SELECT) and `exec()` (INSERT / UPDATE / DELETE / DDL)
- ✅ File storage: `files.list()`, `files.upload()`, `files.delete()`
- ✅ API key management: `apiKeys.list()`, `apiKeys.create()`, `apiKeys.revoke()`
- ✅ Works in Node.js, browsers, and Deno
- ✅ Full TypeScript types included
- ✅ Authorization via API key Bearer token

## Usage

### Execute Queries

```typescript
// Simple query
const result = await client.databases
  .get('my-db')
  .query('SELECT * FROM users');

// With parameters (prevents SQL injection)
const result = await client.databases
  .get('my-db')
  .query('SELECT * FROM users WHERE id = ?', [userId]);

// Get execution metadata
console.log(result.executionTimeMs);
console.log(result.rowCount);
```

### List Databases

```typescript
const databases = await client.databases.list();
// [{ id, name, createdAt, sizeBytes }, ...]
```

### Create Database

```typescript
const db = await client.databases.create({
  name: 'my-new-db',
  displayName: 'My New App Database'
});
```

### File Operations

```typescript
// Upload file
const fileId = await client.databases
  .get('my-db')
  .files.upload(Buffer.from('csv data'), 'data.csv', 'text/csv');

// List files
const files = await client.databases.get('my-db').files.list();

// Download file
const data = await client.databases
  .get('my-db')
  .files.download(fileId);
```

## Error Handling

```typescript
import { SqliteHubError } from '@sqlite-hub/client';

try {
  const result = await client.databases.get('my-db').query('SELECT ...');
} catch (error) {
  if (error instanceof SqliteHubError) {
    console.error(`API Error: ${error.code}`);
    console.error(`Details: ${error.message}`);
  }
}
```

## License

MIT
npm package: @sqlite-hub/ui
Description: React UI components for sqlite-hub (Outerbase studio integration)
Latest version: 0.1.1

# @sqlite-hub/ui

React UI components for sqlite-hub database viewer, SQL editor, and results explorer.

## Features

- 🎨 Modern, composable React components
- 📝 SQL editor with syntax highlighting (CodeMirror)
- 📊 Results grid with sorting and filtering
- 🌳 Database schema browser
- 🔍 Query history
- 🎯 Built on Radix UI with Tailwind CSS

## Installation

```bash
npm install @sqlite-hub/ui
# or
pnpm add @sqlite-hub/ui
```

## Quick Start

```tsx
import { DbViewer } from '@sqlite-hub/ui/board';

function App() {
  async function queryDb(sql: string, params?: any[]) {
    const response = await fetch('/api/db/my-db/query', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ sql, params })
    });
    return response.json();
  }

  return (
    <DbViewer 
      dbId="my-db"
      queryFn={queryDb}
      tables={['users', 'posts', 'comments']}
    />
  );
}

export default App;
```

## Components

### DbViewer
Main component combining editor, results, and schema browser.

```tsx
<DbViewer
  dbId="string"
  queryFn={(sql, params) => Promise}
  tables={string[]}
/>
```

### SqlEditor
Standalone SQL editor with CodeMirror.

```tsx
<SqlEditor
  value={sql}
  onChange={setSql}
  readOnly={false}
/>
```

### ResultsGrid
Display query results in a scrollable grid.

```tsx
<ResultsGrid
  rows={data}
  columns={columns}
  loading={false}
/>
```

## Styling

Components use Tailwind CSS classes. Make sure your project has Tailwind configured:

```bash
npm install tailwindcss
```

## License

MIT
npm package: @sqlite3-libs/promised-sqlite3
Description: A wrapper arround sqlite3 node.js package to use promise
Author: Tristan Guichaoua
Latest version: 1.3.4

# promised-sqlite3
A wrapper for sqlite3 node.js package to use Promise.

[![NPM version](https://badge.fury.io/js/@sqlite3-libs%2Fpromised-sqlite3.svg)](https://www.npmjs.com/package/@sqlite3-libs/promised-sqlite3)

## Motivation
<a href="https://www.npmjs.com/package/sqlite3">sqlite3</a> is a callback-based SQLite3 binding for Node.js.  
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a> is a cool javascript feature.

The goal of promised-sqlite3 is to provide a wrapper arround sqlite3 to provide Promise-friendly methods.

## Install
```
npm install @sqlite3-libs/promised-sqlite3
```

## Usage
```javascript
const { PromisedDatabase } = require("@sqlite3-libs/promised-sqlite3"); // import the class

const db = new PromisedDatabase(); // create a instance of PromisedDatabase
// note: at this stade, the wrapped sqlite3.Database object is not created.

async function init() {
    try {
        await db.open("./db.sqlite"); // create a sqlite3.Database object & open the database on the passed filepath.

        // run some sql request.
        await db.run("CREATE TABLE IF NOT EXISTS foo (id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT NOT NULL, b TEXT)"); 
        await db.run("INSERT INTO foo (a, b) VALUES (?, ?)", "alpha", "beta");
        await db.run("INSERT INTO foo (a, b) VALUES ($goo, $hoo)", { $goo: "GOO !", $hoo: "HOO :" });
        await db.run("INSERT INTO foo (a, b) VALUES (?, ?)", ["Value of a", "Value of b"]);

        // read database
        const row = await db.get("SELECT * FROM foo WHERE id = ?", 2);
        console.log(row2);

        const rows = await db.all("SELECT * FROM foo");
        console.log(rows);

        await db.each("SELECT * FROM foo WHERE id > ?", 5,
            function(row) {
                console.log(row);
            }
        );

        // get the wrapped sqlite3.Database object
        const sqliteDB = db.db;

        // close the database
        await db.close();

    } catch(err) {
        console.error(err);
    }
}

init();
```
## Documentation
See in `./docs/` folder.
npm package: @sqliteai/sqlite-agent-darwin-arm64
Description: SQLite Agent extension for macOS ARM64 (Apple Silicon)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-darwin-arm64

SQLite Agent extension for macOS ARM64 (Apple Silicon)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** darwin
- **CPU:** arm64
- **Binary:** agent.dylib

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-darwin-x86_64
Description: SQLite Agent extension for macOS x86_64 (Intel)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-darwin-x86_64

SQLite Agent extension for macOS x86_64 (Intel)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** darwin
- **CPU:** x64, ia32
- **Binary:** agent.dylib

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-linux-arm64
Description: SQLite Agent extension for Linux ARM64 (glibc)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-linux-arm64

SQLite Agent extension for Linux ARM64 (glibc)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** linux
- **CPU:** arm64
- **Binary:** agent.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-linux-arm64-musl
Description: SQLite Agent extension for Linux ARM64 (musl)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-linux-arm64-musl

SQLite Agent extension for Linux ARM64 (musl)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** linux
- **CPU:** arm64
- **Binary:** agent.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-linux-x86_64
Description: SQLite Agent extension for Linux x86_64 (glibc)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-linux-x86_64

SQLite Agent extension for Linux x86_64 (glibc)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** linux
- **CPU:** x64, ia32
- **Binary:** agent.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-linux-x86_64-musl
Description: SQLite Agent extension for Linux x86_64 (musl)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-linux-x86_64-musl

SQLite Agent extension for Linux x86_64 (musl)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** linux
- **CPU:** x64, ia32
- **Binary:** agent.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-agent-win32-x86_64
Description: SQLite Agent extension for Windows x86_64
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-agent-win32-x86_64

SQLite Agent extension for Windows x86_64

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-agent](https://www.npmjs.com/package/@sqliteai/sqlite-agent).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-agent
```

## Platform

- **OS:** win32
- **CPU:** x64, ia32
- **Binary:** agent.dll

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-darwin-arm64
Description: SQLite MCP extension for macOS ARM64 (Apple Silicon)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-darwin-arm64

SQLite MCP extension for macOS ARM64 (Apple Silicon)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** darwin
- **CPU:** arm64
- **Binary:** mcp.dylib

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-darwin-x86_64
Description: SQLite MCP extension for macOS x86_64 (Intel)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-darwin-x86_64

SQLite MCP extension for macOS x86_64 (Intel)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** darwin
- **CPU:** x64, ia32
- **Binary:** mcp.dylib

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-linux-arm64
Description: SQLite MCP extension for Linux ARM64 (glibc)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-linux-arm64

SQLite MCP extension for Linux ARM64 (glibc)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** linux
- **CPU:** arm64
- **Binary:** mcp.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-linux-arm64-musl
Description: SQLite MCP extension for Linux ARM64 (musl)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-linux-arm64-musl

SQLite MCP extension for Linux ARM64 (musl)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** linux
- **CPU:** arm64
- **Binary:** mcp.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-linux-x86_64
Description: SQLite MCP extension for Linux x86_64 (glibc)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-linux-x86_64

SQLite MCP extension for Linux x86_64 (glibc)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** linux
- **CPU:** x64, ia32
- **Binary:** mcp.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-linux-x86_64-musl
Description: SQLite MCP extension for Linux x86_64 (musl)
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-linux-x86_64-musl

SQLite MCP extension for Linux x86_64 (musl)

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** linux
- **CPU:** x64, ia32
- **Binary:** mcp.so

## License

See [LICENSE](./LICENSE) in the root directory.
npm package: @sqliteai/sqlite-mcp-win32-x86_64
Description: SQLite MCP extension for Windows x86_64
Author: Gioele Cantoni
Latest version: 0.1.9

# @sqliteai/sqlite-mcp-win32-x86_64

SQLite MCP extension for Windows x86_64

**Version:** 0.1.9

This is a platform-specific package for [@sqliteai/sqlite-mcp](https://www.npmjs.com/package/@sqliteai/sqlite-mcp).

It is installed automatically as an optional dependency and should not be installed directly.

## Installation

Install the main package instead:

```bash
npm install @sqliteai/sqlite-mcp
```

## Platform

- **OS:** win32
- **CPU:** x64, ia32
- **Binary:** mcp.dll

## License

See [LICENSE](./LICENSE) in the root directory.