@guren/core

中文文档
1.27.0发布于 2026/11/13MITTypeScriptES Module构建来源已验证近 30 天下载 9758

Guren: the Bun-first fullstack TypeScript framework. Laravel-style MVC on Hono, Drizzle ORM and Inertia.js + React. Develop on Bun; deploy to Bun, AWS Lambda (Node.js), Vercel or Cloudflare Workers.

原始使用文档
文档目录4 节
  1. Usage
  2. Entry points
  3. CLI
  4. Documentation

@guren/core

The framework entry point for Guren — a Bun-first fullstack TypeScript framework with Laravel-style conventions. Develop on Bun; deploy to Bun, AWS Lambda (Node.js), Vercel, or Cloudflare Workers. Application code imports the whole framework API from this one package.

bun add @guren/core

Starting a new app? Scaffold one instead — it wires all of this up for you:

bunx create-guren-app my-app --auth

Usage

import { Controller, Router, defineModel } from '@guren/core'
import { z } from 'zod'
import { posts } from '@/db/schema'

class Post extends defineModel(posts) {
  static fillable = ['title', 'body']
}

class PostController extends Controller {
  async store() {
    const data = await this.validateBody(
      z.object({ title: z.string().min(1), body: z.string().min(1) }),
    )
    const post = await Post.create(data)
    return this.redirect(`/posts/${post.id}`)
  }
}

export function registerWebRoutes(router: Router): void {
  router.post('/posts', [PostController, 'store'])
}

Boot the app with createApp({ routes, providers }), then app.boot() and app.listen().

Entry points

ImportContents
@guren/coreThe framework API: controllers, routing, middleware, auth, models, queues, mail, events, notifications, cache, validation
@guren/core/runtimeBun server helpers used by the scaffolded bin/serve.ts
@guren/core/viteThe Vite plugin: Inertia + React integration, codegen watching, SSR builds
@guren/core/lambdaAWS Lambda adapters: createLambdaHandler, createSqsHandler, createScheduleHandler, createConsoleHandler
@guren/core/redisRedis-backed session, cache, and queue stores

CLI

The guren CLI ships with this package. bunx guren inside an app gives you scaffolding (make:*), codegen, migrations, and the integrity checks (check, audit, doctor).

Documentation

Guides, API reference, and deployment docs (Cloudflare Workers, AWS Lambda, Vercel, Docker) live at guren.dev/docs.

版本与发布记录

@guren/core 共发布 61 个版本,首次发布于 2025/11/02;过去 12 个月发布了 53 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.27.0latest2026/11/134 天前
1.26.12026/11/0511 天前
1.26.02026/11/0214 天前
1.25.02026/10/2225 天前
1.24.02026/10/051 个月前
1.23.02026/09/261 个月前

其他发布通道:alpha → 0.1.1-alpha.0,rc → 1.0.0-rc.26。

关于 @guren/core 的常见问题

@guren/core 是什么?

Guren: the Bun-first fullstack TypeScript framework. Laravel-style MVC on Hono, Drizzle ORM and Inertia.js + React. Develop on Bun; deploy to Bun, AWS Lambda (Node.js), Vercel or Cloudflare Workers.

如何安装 @guren/core?

在项目目录运行 npm install @guren/core,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 guren,可以用 npx guren 直接运行。

@guren/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@guren/core 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@guren/core 可以商用吗?

@guren/core 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@guren/core 的下载量有多少?

根据 npm 官方下载统计,@guren/core 在 2026/10/17 – 2026/11/15 这 30 天内被下载 9,758 次,日均约 325 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@guren/core 还在维护吗?

最新版本 1.27.0 发布于 2026/11/13(4 天前);至今共发布 61 个版本,其中过去 12 个月发布了 53 个;首次发布于 2025/11/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。