remix README

项目的 README,来自 github.com/remix-run/remix。合并为一个 markdown 文件:README.md。



Remix



Remix is a full-stack TypeScript framework for building web applications. It comes with everything you need to build fast, safe, modern web applications. We use it to build many of our production applications at Shopify.

Get started

With Node.js 24.3 or later, create an app and start the development server.

npx remix new my-remix-app
cd my-remix-app
npm i
npm run dev

To add Remix to an existing project, install the package.

npm i remix

Follow the Getting Started tutorial to build a page with an editable form. Explore the record store demo to see how sign-in, a shopping cart, and checkout fit together.

Install from main

To try a new feature or test a fix before the next release, install the latest build from main in your project.

pnpm add "$(curl -fsSL https://github.com/remix-run/previews/releases/latest/download/remix.url)"

This pins your project to a specific commit. Run the command again when you want a newer build. You can find the source commit and tarballs for individual packages in the latest preview release.

If pnpm blocks tarball dependencies, set blockExoticSubdeps: false in your project's pnpm-workspace.yaml.

Design principles

  1. Model-First Development. We design Remix for developers who build with coding agents and use models in their apps. New apps include the Remix skill for coding agents, and node_modules/remix/INDEX.md points to the guides and API docs for your installed version.
  2. Build on Web APIs. The router accepts a standard Request and returns a Response. The generated app connects it to Node.js through a server adapter. You can test the same routes by passing requests directly to the router.
  3. Religiously Runtime. Routes and middleware run directly from source. You can test them without bundling your app or generating types.
  4. Avoid Dependencies. A new Remix app has one runtime dependency, remix. Where Remix uses third-party code, it wraps that code behind its own APIs.
  5. Demand Composition. Each package does one job. You can use the router in an existing Fetch handler or add the session package to an app that already has a router.
  6. Distribute Cohesively. Import what you need from a single package, such as remix/router for routing or remix/component for UI.

For the ideas behind these principles, read Wake up, Remix!.

Packages

Contributing

See the contributing guide to report a bug, propose a feature, or submit a pull request. To test a pull request, use the preview install command posted on the PR.

License

See LICENSE

remix (remix-run/remix)

正在搜索数据库…

33.5K ·GitHub
这是什么?Remix 3 是一个全栈 Web 框架,直接基于 Web API(Streams、Fetch、Web Crypto)构建,而不是依赖特定打包工具的抽象层。它以一个统一的 'remix' 包发布,该包由许多独立的 JS/TS 工具组成。
这是一个包,还是一组独立的工具?它是一个单一代码仓库(monorepo),其中包含许多功能单一、可独立使用的包(如 router、auth、session、cli、data-table、ui 等)。这些包会被打包在主 'remix' 包之下,便于分发。
我要怎么创建一个新的 Remix 应用?通过 CLI 运行 'npx remix@next new' 即可创建一个新的 Remix 3 应用;或者安装 'next' 分发标签,试用当前的测试版。main 分支的最新构建也会发布到 preview/main 分支,可以用 pnpm 9+ 安装。
它只能在 Node.js 上运行吗?不是。Remix 3 的包基于服务端可用的 Web API 构建,因此可以在 Node.js、Bun、Deno、Cloudflare Workers 以及其他 JS 运行时中无缝运行;但开发本仓库本身需要 Node >=24.3.0。
Remix 3 可以用于生产环境吗?目前还不是稳定版。它只能通过 'next' 分发标签以测试版形式获取,仍在积极开发中,因此 API 可能会发生变化。
这个框架所说的 Model-First Development 是什么意思?这是 Remix 3 的核心设计原则之一:让源代码、文档和工具链针对大语言模型(LLM)进行优化,并构建抽象层,使应用能够直接在产品中使用 AI 模型,而不仅仅将其作为开发工具。
Remix 3 有自己的 UI 库吗?有的。'ui' 包是 Remix 自有的视图层,包含协调器(reconciler)、组件模型和官方 UI 组件,并且独立于 React 构建。
README 里提到的 'remix app' Agent Skill 是什么?这是一个 Agent Skill,AI 编程代理在基于本仓库创建新的 Remix 3 应用时应当使用它。CLI 的 prepack 步骤会把它复制到生成的应用模板中,使通过脚手架创建的应用也能获得相同的指导。
Remix 为什么要避免使用打包工具和外部依赖?这由两条指导原则驱动:'Religiously Runtime' 意味着任何包都不应依赖打包工具、编译器或静态分析;'Avoid Dependencies' 则旨在实现零第三方依赖,并对无法避免的依赖进行封装。
作者
remix-run
大小
121.1 MB
星标
33.5K
时长
6年
提交 · 90 天