Codync
A free, open-source 1:1 alternative to Grok Bot and Muse. Message Claude Code, Codex, Cursor and 40+ coding agents as persistent bots from your iPhone, Mac or Linux desktop. Group chats, threads, appr
A TypeScript ORM with schemas, changesets, composable queries and a repo, typed end to end.
Developer toolsGitHub @egon-ormOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Repository information has not been collected yet.
No updates detected yet. GitHub releases will appear here.
No compromises TypeScript ORM
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗A TypeScript ORM for Postgres, SQLite and MySQL with schemas, changesets, composable queries and a repo, typed end to end with no code generation.
select results are
inferred from your classes. No generate step, no schema file to keep in sync.{ success, data } or { success: false, error }.save() on rows. Nothing joins a transaction you did not open; a single call that
writes several statements (a parent with its children, a chunked insertAll) is atomic
on its own.Status: under construction. Nothing is published to npm yet. The design and build plan live in
docs/plan/README.md.
pnpm add egon-orm @egon-orm/postgres pg
Node.js 22.12 or later; ES modules (a CommonJS project can require() them on Node.js 22.12
or later). For SQLite use @egon-orm/sqlite with better-sqlite3; for MySQL,
@egon-orm/mysql with mysql2.
import { postgres } from "@egon-orm/postgres";
import { belongsTo, cast, count, createRepo, from, hasMany, Schema, t, timestamps } from "egon-orm";
// Over two tables with serial (32-bit) keys, which t.integer() reads.
class User extends Schema("users", {
id: t.integer().primaryKey().dbGenerated(),
email: t.string(),
name: t.string().nullable(),
...timestamps(),
}) {
static posts = hasMany(() => Post, { foreignKey: "authorId" });
static changeset(user: User | typeof User, params: unknown) {
return cast(user, params, ["email", "name"]).validateRequired(["email"]).uniqueConstraint("email");
}
}
class Post extends Schema("posts", {
id: t.integer().primaryKey().dbGenerated(),
authorId: t.integer(),
title: t.string(),
}) {
static author = belongsTo(() => User, { foreignKey: "authorId" });
}
const repo = createRepo({ adapter: postgres({ connectionString: process.env.DATABASE_URL }) });
const result = await repo.insert(User.changeset(User, { email: "[email protected]" }));
if (!result.success) console.log(result.error.errorMessages()); // if the email is taken: { email: ["has already been taken"] }
const authors = await repo.all(
from(User, "u")
.where(({ u }) => u.name.isNotNull())
.preload("posts"),
);
authors[0]?.posts[0]?.title; // string: the type knows "posts" was preloaded
const stats = await repo.all(
from(User, "u")
.leftJoinAssoc("u", "posts", "p")
.groupBy(({ u }) => u.id)
.select(({ u, p }) => ({ email: u.email, posts: count(p.id) })),
); // { email: string; posts: number }[]
The documentation site is egon-orm.github.io/egon-orm.
Its pages are Markdown in docs/site, readable here on GitHub too, and
pnpm docs:dev serves the site, API reference included, locally.
| Package | Purpose |
|---|---|
egon-orm | Schemas, types, changesets, queries, the repo; egon-orm/testing and egon-orm/migration |
@egon-orm/postgres | The Postgres adapter (every feature) |
@egon-orm/sqlite, @egon-orm/mysql | The SQLite and MySQL adapters (documented gaps) |
@egon-orm/zod | Zod schemas derived from schema classes |
@egon-orm/cli | The egon command: migrations and development databases |
Requires Node.js 22.12 or newer, pnpm 12 and Docker.
pnpm i
pnpm db:up # Postgres 16 on localhost:54329
pnpm check # lint + typecheck + unit tests + type tests + build
pnpm test:integration # needs the database
pnpm docs:dev # documentation site
See CONTRIBUTING.md for everything else.