newX 1.3: islands to disk, server-mode islands, and an image proxy

Installation

Install x

X requires the Bun runtime. Scaffold a new project with the create command, or add the packages manually to an existing app.

Prerequisites

Install Bun first, since X uses Bun.serve, Bun.file, and other Bun-only APIs. Verify with:

terminal · bun
bun --version

Create a new project

The fastest path is the project scaffolder. It generates package.json, resolves the latest @thexjs/core and @thexjs/cli versions, and runs bun install.

~/projects · zsh
bun create thexjs-app@latest my-app
cd my-app
bun run dev

The scaffolder is feature-based: it prompts with a multi-select of tailwind, auth, content, hooks, and shadcn; pick nothing for a plain blank project. Ready-made example apps live under examples/ in the repo if you prefer a fuller starting point.

Pass features non-interactively instead: --tailwind, --auth, --content, --hooks, --shadcn. Also available: --no-install (skip bun install).

~/projects · zsh
bun create thexjs-app@latest my-app --tailwind --auth

Add to an existing project

Install the core packages and wire up scripts in package.json:

terminal
bun add @thexjs/core
bun add -d @thexjs/cli
package.json
{  "scripts": {    "dev": "x dev",    "build": "x build",    "start": "x start"  }}

Create x.config.ts at the project root:

x.config.ts
import { defineConfig } from "@thexjs/core";export default defineConfig({  pagesDir: "./src/pages",  port: 3000,});

Optional: environment validation

Add @thexjs/env when you want typed, validated environment variables:

terminal
bun add @thexjs/env

See the @thexjs/env docs for the full API.

Verify the install

terminal
x dev
[x] compiling Tailwind CSS...
[x] dev server starting...
✓ dev server running at http://localhost:3000

(The Tailwind line only appears when src/styles/globals.css exists, which the default template ships.)