# Installing the editor extension

> Installs the Osy# editor extension that ships with the CLI into VS Code (or a compatible editor). The extension launches the toolchain's own language server (`osy lsp`) and drives the same CLI, so once the CLI is on your PATH it just works.

<!-- id: local-installing-the-editor-extension · area: local · stability: stable · html: https://osysharp.com/reference/local/installing-the-editor-extension/ -->

## Summary        {#summary}

Installs the Osy# editor extension — a small package shipped with the CLI, whose language server is the CLI itself (`osy lsp`) — into VS Code or a compatible editor (Cursor, VSCodium,
Windsurf). The extension brings language intelligence (completions, diagnostics, go-to-definition, the test explorer)
and runs your project through this same CLI.

## Signature      {#signature}

```console
osy vscode install [--editor <cmd>] [--vsix <path>]
```

## Description    {#description}

It finds the extension shipped alongside the CLI, detects your editor's command-line launcher on your PATH (`code`,
`code-insiders`, `cursor`, `codium`, or `windsurf`), and installs it. Reload the editor afterwards to activate it.

The extension drives the CLI through its `osy.cli.path` setting, which defaults to `osyrin` — so as long as the CLI is
on your PATH, no editor configuration is needed.

- `--editor <cmd>` installs into a specific editor (by its CLI command) instead of the first one found.
- `--vsix <path>` installs a specific extension package instead of the one shipped with the CLI.

If no editor CLI is found, it says so — in VS Code you may need to run *"Shell Command: Install 'code' command in
PATH"* first.

### It marks where your code changes side   {#side-crossing-hints}

The extension ghosts a `→ server` (or `→ client`) in front of any call that **leaves the side the body it is written
in runs on**. Nothing in the source says so otherwise: the seam is deliberately invisible, so that you write ordinary
code across it — which is right for correctness and hides the one thing you may need to act on. Each of those arrows
is a network round trip.

What you see on screen — the arrows are the editor's, not something you type:

```text
action Save() {
  → server SaveDraft(draft);      // a round trip
  → server Notify(author);        // …and another. Could these have been one call?
  closed = true;                  // client-side: no arrow, no cost
}
```

**Only the crossings are marked.** A server function that calls three more server functions crosses nothing, and gets
nothing — the arrows appear where the cost is, not on every call to a server function. That is what keeps the
annotation readable in the half of an app that never leaves one side.

The arrow says the direction and nothing about saving. Calling a server function from a page carries your
uncommitted edits along with the call — the server reads your own changes — but it does **not** commit; only an
explicit `UnitOfWork.Commit()` does. See [[realtime-topic#one-unit-of-work]].

## Examples       {#examples}

```console
osy vscode install                 # install into the first editor found on PATH
osy vscode install --editor cursor # install into Cursor specifically
```

## See also       {#see-also}

[Running a local platform](https://osysharp.com/reference/local/running-a-local-platform/) — the local platform the editor's commands run against.

[Launching your app](https://osysharp.com/reference/local/launching-your-app/) — open your app in a browser from the editor or the CLI.

[Launching the page you're on](https://osysharp.com/reference/local/launching-the-page-youre-on/) — what F5 does once the extension is installed.
