# paratext/csi

> Every export of paratext/csi, with its signature and doc comment: cursorTo, cursorMove, cursorUp, cursorDown, cursorForward, cursorBackward and 25 more.

Source: https://paratext.interlace.tools/docs/api/csi

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import { cursorTo, cursorMove, cursorUp, … } from 'paratext/csi';
```

## Constants

### beginSynchronizedOutput

```ts
const beginSynchronizedOutput = "\u001B[?2026h";
```

### clearScreen

```ts
const clearScreen = "\u001Bc";
```

### clearTerminal

Erase the screen, the scrollback, and home the cursor. ponytail: upstream has a second form
for Windows 10 before build 10586 (November 2015), whose console predates these sequences; it
is not carried, so such a host gets this form. Add the branch if one is ever reported.

```ts
const clearTerminal = "\u001B[2J\u001B[3J\u001B[H";
```

### clearViewport

```ts
const clearViewport = "\u001B[2J\u001B[H";
```

### cursorBackward

```ts
const cursorBackward: (count?: number) => string;
```

### cursorDown

```ts
const cursorDown: (count?: number) => string;
```

### cursorForward

```ts
const cursorForward: (count?: number) => string;
```

### cursorGetPosition

```ts
const cursorGetPosition = "\u001B[6n";
```

### cursorHide

```ts
const cursorHide = "\u001B[?25l";
```

### cursorLeft

```ts
const cursorLeft = "\u001B[G";
```

### cursorMove

Relative move: negative `x` is left, negative `y` is up; zero emits nothing on that axis.

```ts
const cursorMove: (x: number, y?: number) => string;
```

### cursorNextLine

```ts
const cursorNextLine = "\u001B[E";
```

### cursorPrevLine

```ts
const cursorPrevLine = "\u001B[F";
```

### cursorRestorePosition

```ts
const cursorRestorePosition: string;
```

### cursorSavePosition

```ts
const cursorSavePosition: string;
```

### cursorShow

```ts
const cursorShow = "\u001B[?25h";
```

### cursorTo

`cursorTo(x)` moves along the line; `cursorTo(x, y)` to a cell. Zero-based, as upstream.

```ts
const cursorTo: (x: number, y?: number) => string;
```

### cursorUp

`ansi-escapes`' spelling exactly, zero included: `cursorUp(0)` is `ESC[0A`, and a terminal
reads a zero count as one, so it **moves up a row**. A caller that can ask for zero guards
it — `@inquirer/ansi` returns `''` there, and `caique/inquirer` keeps that answer by guarding
before it calls this, rather than this changing and breaking the drop-in's byte-for-byte grade.

```ts
const cursorUp: (count?: number) => string;
```

### endSynchronizedOutput

```ts
const endSynchronizedOutput = "\u001B[?2026l";
```

### enterAlternativeScreen

```ts
const enterAlternativeScreen = "\u001B[?1049h";
```

### eraseDown

```ts
const eraseDown = "\u001B[J";
```

### eraseEndLine

```ts
const eraseEndLine = "\u001B[K";
```

### eraseLine

```ts
const eraseLine = "\u001B[2K";
```

### eraseLines

Erase `count` lines upward from the cursor's, then return to column one.

```ts
const eraseLines: (count: number) => string;
```

### eraseScreen

```ts
const eraseScreen = "\u001B[2J";
```

### eraseStartLine

```ts
const eraseStartLine = "\u001B[1K";
```

### eraseUp

```ts
const eraseUp = "\u001B[1J";
```

### exitAlternativeScreen

```ts
const exitAlternativeScreen = "\u001B[?1049l";
```

### scrollDown

```ts
const scrollDown = "\u001B[T";
```

### scrollUp

```ts
const scrollUp = "\u001B[S";
```

### synchronizedOutput

```ts
const synchronizedOutput: (text: string) => string;
```
