
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
github.com/rediwo/redi-orm
A modern, AI-native ORM for Go with Prisma-like JavaScript interface. RediORM bridges the gap between traditional database access and modern AI applications through sophisticated schema management and the Model Context Protocol (MCP).
# Install CLI tool
go install github.com/rediwo/redi-orm/cmd/redi-orm@latest
# Or download pre-built binary
wget https://github.com/rediwo/redi-orm/releases/latest/download/redi-orm-linux-amd64.tar.gz
// schema.prisma
model User {
id Int @id @default(autoincrement())
email String @unique
name String
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
userId Int
user User @relation(fields: [userId], references: [id])
}
package main
import (
"context"
"github.com/rediwo/redi-orm/database"
"github.com/rediwo/redi-orm/orm"
_ "github.com/rediwo/redi-orm/drivers/sqlite"
)
func main() {
ctx := context.Background()
// Connect and load schema
db, _ := database.NewFromURI("sqlite://./app.db")
db.Connect(ctx)
db.LoadSchemaFrom(ctx, "./schema.prisma")
db.SyncSchemas(ctx)
// Use ORM
client := orm.NewClient(db)
// Create user
user, _ := client.Model("User").Create(`{
"data": {
"name": "Alice",
"email": "alice@example.com"
}
}`)
// Find many with complex queries
users, _ := client.Model("User").FindMany(`{
"where": {
"email": { "contains": "@example.com" }
},
"include": { "posts": true },
"orderBy": { "name": "asc" }
}`)
// Advanced query with OR conditions
adminsOr25, _ := client.Model("User").FindMany(`{
"where": {
"OR": [
{"age": 25},
{"role": "admin"}
]
}
}`)
// Query with operators
products, _ := client.Model("Product").FindMany(`{
"where": {
"AND": [
{"price": {"gte": 100, "lte": 500}},
{"name": {"startsWith": "Pro"}}
]
},
"orderBy": {"price": "desc"},
"take": 10
}`)
}
const { fromUri } = require('redi/orm');
async function main() {
const db = fromUri('sqlite://./app.db');
await db.connect();
await db.loadSchemaFrom('./schema.prisma');
await db.syncSchemas();
// Create user with posts
const user = await db.models.User.create({
data: {
name: "Alice",
email: "alice@example.com",
posts: {
create: [
{ title: "Hello World", content: "My first post!" }
]
}
}
});
// Query with relations
const users = await db.models.User.findMany({
where: { email: { contains: "@example.com" } },
include: { posts: true },
orderBy: { name: "asc" }
});
// Advanced query with OR conditions
const adminsOr25 = await db.models.User.findMany({
where: {
OR: [
{ age: 25 },
{ role: "admin" }
]
}
});
// Complex query with operators
const products = await db.models.Product.findMany({
where: {
AND: [
{ price: { gte: 100, lte: 500 } },
{ name: { startsWith: "Pro" } }
]
},
orderBy: { price: "desc" },
take: 10
});
}
RediORM supports a rich set of query operators:
equals
, gt
, gte
, lt
, lte
in
, notIn
contains
, startsWith
, endsWith
AND
, OR
, NOT
take
, skip
orderBy
(with asc
/desc
)include
(with nested support)RediORM provides comprehensive Model Context Protocol support, enabling AI assistants to understand and manipulate your database through intelligent, schema-aware operations:
# Start MCP server for AI assistants
redi-orm mcp --db=sqlite://./app.db --schema=./schema.prisma
# With security for production
redi-orm mcp \
--db=postgresql://readonly:pass@localhost/db \
--enable-auth \
--read-only \
--allowed-tables=users,posts
AI Can Now:
# Start GraphQL + REST API server
redi-orm server --db=sqlite://./app.db --schema=./schema.prisma
# GraphQL: http://localhost:4000/graphql
# REST API: http://localhost:4000/api
query {
findManyUser(
where: { email: { contains: "@example.com" } }
include: { posts: true }
) {
id
name
email
posts {
title
content
}
}
}
Feature | SQLite | MySQL | PostgreSQL | MongoDB |
---|---|---|---|---|
CRUD Operations | ✅ | ✅ | ✅ | ✅ |
Relations | ✅ | ✅ | ✅ | ✅ |
Transactions | ✅ | ✅ | ✅ | ✅ |
Migrations | ✅ | ✅ | ✅ | ❌ |
Aggregations | ✅ | ✅ | ✅ | ✅ |
Raw Queries | ✅ | ✅ | ✅ | ✅ + MongoDB commands |
# Run JavaScript with ORM
redi-orm run script.js
# Database migrations
redi-orm migrate --db=sqlite://./app.db --schema=./schema.prisma
# Start servers
redi-orm server --db=sqlite://./app.db --schema=./schema.prisma # GraphQL + REST
redi-mcp --db=sqlite://./app.db --schema=./schema.prisma # MCP for AI
RediORM includes a built-in MCP server that enables AI assistants to understand and interact with your database through natural language.
# Install and run MCP server
go install github.com/rediwo/redi-orm/cmd/redi-mcp@latest
# Stdio mode (for Claude Desktop)
redi-mcp --db=sqlite://./app.db --schema=./schema.prisma
# HTTP streaming mode (for Cursor, Windsurf, web apps)
redi-mcp --db=sqlite://./app.db --schema=./schema.prisma --port=8080
# Production configuration with security
redi-mcp --db=postgresql://readonly:pass@localhost/myapp --schema=./prisma \
--port=8080 \
--log-level=info \
--read-only=true \
--rate-limit=100
Best for desktop AI applications like Claude Desktop:
// Claude Desktop config (~/.claude/claude_desktop_config.json)
{
"mcpServers": {
"database": {
"command": "redi-mcp",
"args": ["--db=postgresql://localhost/myapp", "--schema=./prisma"]
}
}
}
For web-based AI tools like Cursor, Windsurf, and remote access. HTTP mode uses streaming by default:
# Start HTTP server (streaming mode by default)
redi-mcp --db=postgresql://localhost/myapp --schema=./prisma --port=8080
Configure in Cursor/Windsurf:
// .cursor/config.json or .windsurf/config.json
{
"mcpServers": {
"orm-mcp": {
"url": "http://localhost:8080"
}
}
}
HTTP endpoints:
/
- Streaming MCP protocol endpoint/sse
- Server-Sent Events endpointNow your AI assistant can:
Traditional ORMs focus on mapping objects to database tables.
RediORM is designed for the AI era - where databases need to be understandable and manipulable by AI systems, while maintaining full type safety and performance for human developers.
MIT License - see LICENSE file for details.
Ready to build AI-native applications? Start with our Getting Started Guide or explore the MCP Guide for AI integration.
FAQs
Unknown package
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.