Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Effect-TS/tsgo/llms.txt

Use this file to discover all available pages before exploring further.

The @effect/tsgo package ships a CLI for installing and managing the Effect Language Service. All commands are available via npx:
npx @effect/tsgo <command>

setup

Interactive setup wizard that configures @effect/tsgo for your project.
npx @effect/tsgo setup
1

Select a tsconfig.json

The wizard scans the current directory and prompts you to choose which tsconfig.json to configure.
2

Add the dependency

@effect/tsgo is added to your project’s package.json if it is not already present.
3

Configure the plugin

The @effect/language-service plugin entry is added to the selected tsconfig.json.
4

Adjust plugin options

An interactive prompt walks you through the available plugin options so you can set them to your preference.
5

Editor hints

After applying changes, the wizard displays any additional editor configuration needed to activate the language server.
You can re-run setup at any time. It assesses the current state of your project before proposing changes, so it will not duplicate existing configuration.

config

Interactively configure diagnostic severities for an existing tsconfig.json.
npx @effect/tsgo config
1

Select a tsconfig.json

The command scans the current directory and prompts you to pick a tsconfig.json.
2

Pick rules and severities

An interactive rule picker lists all available diagnostics alongside their current configured severity. Select any rule to change its severity.
3

Review and apply

The computed changes to diagnosticSeverity are displayed for review before being written to tsconfig.json.
Use config when you want to tune diagnostics after the initial setup without re-running the full wizard.

patch

Patch the @typescript/native-preview binary, replacing it with effect-tsgo.
npx @effect/tsgo patch
effect-tsgo is a superset of the official tsgo binary — it adds the Effect diagnostics layer on top of standard TypeScript-Go. Patching replaces the binary that editors load through @typescript/native-preview, so no separate editor configuration is needed. What this command does:
  1. Locates the platform-specific tsgo binary inside @typescript/native-preview.
  2. Creates a backup of the original binary at tsgo.original (or tsgo.original.1, tsgo.original.2, … if a backup already exists).
  3. Copies the effect-tsgo binary from the platform package into the target location.
  4. Sets executable permissions (0755) on the patched binary.
  5. Runs tsgo --version to verify the patched binary works.
@typescript/native-preview must be installed in your project before running patch. Install it with:
npm install @typescript/native-preview
Prefer using effect-tsgo as your sole TypeScript language server. Running both effect-tsgo and the stock tsgo in parallel produces duplicate diagnostics and degrades editor performance.

unpatch

Restore the original @typescript/native-preview binary from the backup created by patch.
npx @effect/tsgo unpatch
What this command does:
  1. Locates the backup file (tsgo.original) next to the patched binary.
  2. Renames the current patched binary to a uniquely named .patched file (preserving it in case you need to inspect it).
  3. Renames the backup file back to the original binary name.
If no backup is found, unpatch exits without making any changes and prints an informational message.

get-exe-path

Print the absolute path to the effect-tsgo executable.
npx @effect/tsgo get-exe-path
This is useful when configuring editors that require an explicit path to the language server binary, rather than relying on the patch approach. Example output:
/path/to/node_modules/@effect/tsgo-linux-x64/lib/tsgo
Pass the output to your editor’s TypeScript server binary configuration. For example, in a Neovim LSP config:
lspconfig.effect_tsgo.setup({
  cmd = { vim.fn.system("npx @effect/tsgo get-exe-path"):gsub("\n", ""), "lsp" },
})
Use $(npx @effect/tsgo get-exe-path) in shell scripts or editor launch configurations to resolve the path dynamically.