
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
A typesafe and lightweight database query builder for Bun, inspired by Knex.js but built from the ground up with TypeScript and Bun's native performance in mind.
bun add bunerly
import { Bunerly } from 'bunerly';
// Initialize with your database configuration
const db = new Bunerly({
client: 'sqlite3',
connection: {
filename: './database.sqlite'
}
});
// Query with full type safety
const users = await db('users')
.select('id', 'name', 'email')
.where('active', true)
.orderBy('created_at', 'desc')
.limit(10);
// TypeScript knows the exact shape of your data
console.log(users[0].name); // ✅ Fully typed
// Select queries
const users = await db('users')
.select('*')
.where('age', '>', 18)
.whereIn('status', ['active', 'pending'])
.orderBy('name', 'asc')
.limit(10);
// Joins
const posts = await db('posts')
.select('posts.*', 'users.name as author_name')
.join('users', 'posts.user_id', 'users.id')
.where('posts.published', true);
// Aggregations
const stats = await db('orders')
.select('status')
.count('* as count')
.sum('amount as total')
.groupBy('status');
// Insert
const [newUser] = await db('users')
.insert({
name: 'John Doe',
email: 'john@example.com',
created_at: new Date()
})
.returning('*');
// Update
const updated = await db('users')
.where('id', 1)
.update({
name: 'Jane Doe',
updated_at: new Date()
})
.returning('*');
// Delete
const deleted = await db('users')
.where('id', 1)
.del();
await db.transaction(async (trx) => {
await trx('users').insert({ name: 'User 1' });
await trx('profiles').insert({ user_id: 1, bio: 'Bio' });
// Transaction automatically commits if no errors
});
Bunerly maintains a Knex-compatible API, making migration straightforward:
// Before (Knex)
import knex from 'knex';
const db = knex({ client: 'sqlite3', connection: { filename: './db.sqlite' } });
// After (Bunerly)
import { Bunerly } from 'bunerly';
const db = new Bunerly({ client: 'sqlite3', connection: { filename: './db.sqlite' } });
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE for details.
Built with ❤️ for the Bun ecosystem
FAQs
A typesafe and lightweight database query builder for Bun, inspired by Knex.js
The npm package bunerly receives a total of 6 weekly downloads. As such, bunerly popularity was classified as not popular.
We found that bunerly demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.