GitHub 37
Skip to content
ViteHub is still experimental. Expect bugs and breaking changes.

ViteHub documentation

Add server features to your Vite or Nuxt app, build an Agent, and deploy to your host.

Start with Installation, then save your first value or run your first Agent. Both run locally, with no account or model key.

To build a full app, follow a project tutorial. If a coding agent does the work, give it the ViteHub skill or docs MCP server.

Each feature keeps its quickstart, configuration, API, host support, and errors together. Use the catalog below when you know what you need.

Use the guides to connect hosted services or deploy an Agent. Read the comparisons to choose a framework or keep your current server stack.

Agents

Agents
Define an AI agent on your server in one file, choose what runs it, and reach it from chat, Slack, GitHub, or HTTP.
Agent presets
Start from a ready-made Agent Definition, such as Babysitter or the Workspace preset, and configure it for your application.

UI

UI
Build UI that people and Agents use: ui-sdk parts with the kit, UI specs that an Agent sends, and the live page that an Agent works.
Docs site
Turn a folder of Markdown files into a documentation site with navigation, search, tutorials, agent resources, and a docs assistant.

Data

KV
Save small values such as settings under a key, and read them from any server route.
Database
Define SQL tables in TypeScript and query them from your server routes with typed results.
Blob
Save uploads and other files from your server, then read or serve them with the same code on every host.
Sync
Keep a local copy of a table in the browser. Writes show at once and work offline, and the server stays the authority for every row.
Device
Show the last server answer at once from the browser, for the signed-in account, then refresh it.

Compute

Queue
Send slow work to a queue so your route replies at once, and run jobs in the background on Node, Cloudflare, or Vercel.
Workflows
Run long tasks in steps, get a run ID at once, and check the status and result later.
Schedule
Run server code on a schedule as native cron on Cloudflare, Vercel, or Netlify, or inside a long-running Node process.
Sandbox
Run a small package in an isolated cloud machine on Vercel or Cloudflare, and use its result in your app.
Shell
Run shell commands from server code on files you choose, with limits on commands, output, and time.
Browser
Load and control web pages in a Cloudflare browser from your server code, with no browser setup in your app.
Choices
Turn what people type into choices from your options, for filters, search facets, and command palettes.
AI Gateways
Send AI model requests through one gateway object, and ask typed TypeSafe Jev questions, from Agents, Choices, or your own server code.
Logs
Structured request logs for Vite apps with Evlog. Capture events locally, read an existing backend, and inspect them in the Console and the CLI.

Access

Auth
Add sign-up, sign-in, and protected routes to your app with Better Auth, from one server file.
Env
Declare your settings and secrets once, then read them as typed values in browser and server code.
Connections
Connect a Google account or an API key once, then call the provider API from your server.
Rate Limit
Add an API rate limiter to your server routes. Limit requests per client or user, and reject the extra ones with HTTP 429 on Node or Cloudflare.
Forge
Act as your GitHub App, or with a GitLab, Forgejo, or Gitea token, from server code. One set of env names for routes, Channels, and Agents.

Delivery

Email
Send email from your server through Resend or Cloudflare, and write messages as Markdown or Vue templates.
Channels
One connection to Slack, Teams, Stripe, or any HTTP sender, for messages in both directions.
Realtime collaboration
Let several people edit a TipTap document together in real time and save changes to a file.
Comments
Let your team pin comments on the pages of your live site, reply, resolve, and edit Content text in place.
Forms
Let visitors write to you through a contact, feedback, or "report a problem" form, with a spam guard, validation, an inbox, and email.
i18n
Write your app in one language with no message keys. ViteHub collects the messages for translators and serves each request in its own locale.
MCP server
Serve your app's own MCP server, so Agents such as Claude Code, Codex, or ChatGPT can call your code. Each file is one tool.
Webhooks
Send your app's events to external URLs with HMAC signatures, retries, and a durable debounce window, such as 30 minutes, on every host.

Files

Workspace
One folder of files for your server and AI Agents, with rules for each path and a record of every change.
Source
Read files from your project, GitHub, or your own code without changing them, and serve lists as paged routes.
Content
Turn Markdown files into pages your app can read, list, and search, and let people edit drafts and publish them.
CMS
Store editable Markdown, JSON, and YAML documents from one file, edit them in the Console, and publish them to your site or to a pull request.

Develop and deploy

Frameworks and hosts
Choose a framework integration and a host, and see what ViteHub builds for each host.
Development
Run ViteHub locally, inspect generated files, and verify the behavior you changed.
CLI
Run package-owned development workflows through the local Vite config with the vitehub command.
Console
Inspect and run your app from console.vitehub.dev, the vitehub CLI, or an agent on the ViteHub MCP. All three call one signed route of your app.
Guides
Connect ViteHub to hosted databases, storage and email, deploy an Agent, and choose providers for background work.
Bundle
Measure the client and the server of a production build, the code that loads at startup, and why each package is in the output.
Codemods
Move an app to ViteHub, or to a newer ViteHub API, with npx @vite-hub/codemods. Each codemod edits what it can change safely and reports the rest.
WebContainer
Run a ViteHub app in the reader's browser tab with a StackBlitz WebContainer for docs tutorials and playgrounds.

Reference

Reference
Find the ViteHub package and public import path for each Server Primitive and feature.
Comparisons
Compare ViteHub with Mastra, VoltAgent, AI SDK, LangGraph, Cloudflare Agents, NuxtHub, and Nitro by scope and deployment model.
Runtime
Shared contracts across ViteHub packages, including Runtime Context, Capabilities, policy, traces, errors, leases, and host bindings.
Markdown templates
Render predictable Markdown from explicit data, simple conditions, and reusable fragments.

Built with ViteHub Docs