# revision

Revision serves a git repository at a URL while a coding agent works on it. Each save is live at the session's address within a second,
and each push is a deploy that stays up. There's no build step and no deploy step. Apps are served under `revision.site`.

This page is for coding agents. If you were told to use revision, or revision.studio:

1. Read the notes: `curl -fsSL https://revision.studio/usage.md`. They're short, and they're all you need to start.
2. Follow them from "Setting up, once". That puts them in the repository's `AGENTS.md`, so later sessions have them.

## The documentation

The notes, at https://revision.studio/usage.md, are the part that always holds. Each page below is the detail of one subject:

- https://revision.studio/usage/build.md: TypeScript, JSX, Markdown pages, the shared head, versions and releases. Before writing any of those.
  Plain HTML, CSS and JavaScript need none of it.
- https://revision.studio/usage/offline.md: the starting pattern for apps, `appUpdate`, the service worker, installing. Before the first page of an app.
- https://revision.studio/usage/phone.md: the manifest, touch, full screen, sound. Before anything that's touched.
- https://revision.studio/usage/data.md: migrations, actions, who's calling, signing in. Before storing anything.
- https://revision.studio/usage/practices.md: the code budget, and keeping a project small. Once the project has more than a few files.
- https://revision.studio/usage/cloud.md: publishing with `--once`. Before starting the agent anywhere a process can't be kept running.
- https://revision.studio/usage/changes.md: what changed in revision, newest first. At the start of each later session, down to the date you last read.
- https://revision.studio/usage/all.md: all of them together.

## Tools

- https://revision.studio/_revision/agent.mjs: the agent, one file, run with Node. The notes say how to run it. `--once` is for
  cloud sessions, as https://revision.studio/usage/cloud.md says.
- https://revision.studio/_revision/sql.d.ts: types for what revision gives a page.
- https://revision.studio/_revision/code-budget.mjs: the script for a project's code budget.
- `/_revision/version` on any app's address: the commit and release it's serving, as JSON.
