> ## Documentation Index
> Fetch the complete documentation index at: https://developer.revise.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install from npm. Free for evaluation, personal projects, and education.

The SDK is the `revise` package on the public npm registry. You don't need an
account, a token, or a conversation with us to install it.

```bash theme={null}
npm i revise
```

npm and pnpm install the peer dependencies (React, `yjs`, `y-protocols`) for
you. On Yarn, list them: `yarn add revise yjs y-protocols`. For `revise/server`
in Node, also run `npm i jsdom`.

`revise` is free for evaluation, personal projects, and education. Production
use by businesses, nonprofits, and government requires a
[commercial license](/editor-sdk/license). You can build and prototype with it
before buying one.

## Entry points

| Import               | What it is                                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------------------------------ |
| `revise/editor`      | The React editor. `import ReviseEditor from "revise/editor"`.                                                |
| `revise/editor/full` | The same editor plus Tree-sitter syntax highlighting and the WASM hot paths. Not CSP-safe; opt in if needed. |
| `revise/server`      | Node-side conversion and the deterministic semantic tools over a host-owned Y.Doc.                           |
| `revise/style.css`   | The stylesheet. Import it once.                                                                              |
| `revise`             | Build identity (`REVISE_SDK_VERSION`, `REVISE_SDK_BUILD`) and the shared types. No runtime weight.           |

## Peer dependencies

React 18 or newer, `yjs`, and `y-protocols` are required peers. The SDK never
bundles its own copies, and every editor session is Yjs-backed even when you do
not attach a collaboration provider:

| Package              | Needed for                                                                                                                                                 |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `yjs`, `y-protocols` | All editor sessions; [collaboration](/editor-sdk/guides/collaboration) also passes host-created Yjs objects, so your bundler must resolve exactly one copy |
| `jsdom`              | `revise/server`, the Node-side document primitives                                                                                                         |

`jsdom` remains optional and is never installed automatically; only
`revise/server` needs it, and it tells you to `npm i jsdom` if it is missing.

## Versioning

The package follows semantic versioning. Pin what you ship:

```json package.json theme={null}
{
  "dependencies": {
    "revise": "2.0.0"
  }
}
```

Use an exact version, not a range, so upgrades stay deliberate. The package
ships a `CHANGELOG.md`; read it before changing versions. Breaking changes to
the component props or the handle controllers arrive in a major version, never
a patch.

<Note>
  Versions `1.0.0` and earlier of `revise` on npm are an unrelated library whose
  author passed the name on to us. Everything from `2.0.0` onward is the Revise
  SDK.
</Note>

## Coming from `@reviseio/sdk`

The private `@reviseio/sdk` package is retired. Replace the dependency with
`revise`, delete the `@reviseio` lines from `.npmrc`, and update imports:

| Before                    | After                |
| ------------------------- | -------------------- |
| `@reviseio/sdk`           | `revise/editor`      |
| `@reviseio/sdk/full`      | `revise/editor/full` |
| `@reviseio/sdk/backend`   | `revise/server`      |
| `@reviseio/sdk/style.css` | `revise/style.css`   |

The named `ReviseEditor` export still works alongside the new default export.

## Reporting a problem

Include the build. Both are exported, so your error reporting can attach them
automatically:

```ts theme={null}
import { REVISE_SDK_VERSION, REVISE_SDK_BUILD } from "revise";
// "2.0.0", "f7dc7173"
```

`npm bugs revise` opens the [support](/editor-sdk/support) route.

## Assets

The package stays small by loading heavy static assets on demand instead of
bundling them: PDF export fonts (including the large CJK and world-script
faces), the math fonts and stylesheet, the PDF reader's worker, and, for
`revise/editor/full`, the Tree-sitter grammars. By default they load from
`https://revise.io`, so a strict Content Security Policy needs to allow it in
`connect-src`, `font-src`, `style-src`, and `worker-src`.

To serve them yourself, mirror these paths from `https://revise.io` onto your
own origin, keeping the layout, and point the SDK at it once at startup:

* `fonts/`
* `katex.min.css`
* `pdfjs/`
* `tree-sitter/` (only for `revise/editor/full`)

```ts theme={null}
import { setAssetBaseUrl } from "revise/editor";

setAssetBaseUrl("https://assets.example.com/revise");
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="ERESOLVE peer dependency errors">
    The package needs React 18 or newer as a peer. On React 17 or earlier the
    install fails by design.
  </Accordion>

  <Accordion title="Unexpected content type in insert operation">
    Two copies of Yjs are loaded. Make your bundler resolve a single `yjs`, for
    example with a `resolve.dedupe` entry in Vite.
  </Accordion>

  <Accordion title="Installed revise@1.0.0">
    That is the unrelated legacy package. Install `revise@2` or later.
  </Accordion>
</AccordionGroup>
