Guides

In your editor

Carrick editor diagnostics, cross-repo go to definition, the code lens, the boundary line and one setting per surface.

The Carrick editor extension integrates with your IDE to provide immediate feedback on cross-service contracts for the active TypeScript file:

  • Routes and client calls extracted from the current file
  • Counterpart handlers and consumers across other repositories on disk
  • Contract drift and type compatibility diagnostics
  • Code lenses showing caller counts and contract status
  • Cross-repository Go to Definition linking API calls directly to remote route handlers

Diagnostics appear in your editor’s Problems panel and are accessible to editor-integrated AI assistants without additional tool invocations.

Install the CLI and extension

The extension relies on the local Carrick Language Server (carrick lsp --stdio). Install the CLI globally and initialise your workspace before enabling the extension:

npm install -g carrick
cd ~/code                  # the folder that holds your repos
carrick init               # signs in, detects repos, and syncs index

If an index exists in Carrick Cloud, carrick init downloads it into .carrick/. If no index exists, run carrick index after generating your carrick.json to perform the initial scan.

Install the extension

Install the extension for your editor from the appropriate marketplace:

code --install-extension carrick-tools.carrick
cursor --install-extension carrick-tools.carrick
windsurf --install-extension carrick-tools.carrick

The extension is published on the Visual Studio Marketplace and Open VSX. You can also install .vsix binaries directly from GitHub Releases:

mkdir -p carrick-extension
gh release download -R carrick-tools/carrick --pattern '*.vsix' --dir carrick-extension
code --install-extension carrick-extension/carrick-*.vsix

The extension activates automatically when you open TypeScript (.ts) and TSX (.tsx) files.

Editor features

Contract diagnostics

Contract verdicts appear in the Problems panel. When a type mismatch or missing route is detected, Carrick includes the counterpart file as a related location, allowing you to jump directly between producer and consumer code in one click.

Opening a producer file can also trigger diagnostics on consumer files in other repositories. A finding is marked as an Error when all of the following conditions hold:

  • The finding is based on a deterministic fact extracted directly from source code.
  • The producer and consumer shapes are incompatible.
  • The counterpart repository exists on your local disk.

Other findings, such as unverified model classifications or missing counterpart checkouts, appear as Warnings.

Cross-repository go to definition

Triggering Go to Definition on an outbound API call navigates directly to the route handler in the target repository. Triggering Go to Definition on an API route displays an editor picker listing all known consumer call sites across the project.

If a route or call is not tracked in the Carrick index or its counterpart file is not checked out locally, navigation falls back to standard TypeScript definition lookup.

Code lenses

Carrick renders a code lens above routes and client calls that have counterpart mappings or contract issues in the index. The lens indicates the number of counterpart locations and current contract status.

Clicking the lens opens a picker to navigate directly to counterpart implementations across your repositories.

Boundary status

A status bar indicator displays the active service name, indexed commit hash, and any unclassified route elements. This indicator provides immediate visibility into index freshness and local coverage completeness.

Diagnostic limits

To prevent editor performance degradation, Carrick publishes up to 10 diagnostics per file and 30 across the entire workspace. When a file exceeds this limit, an additional summary diagnostic notes the omitted count and directs you to carrick check <file> for the complete report.

Configuration settings

Configure extension behaviour through standard editor settings:

SettingDefaultDescription
carrick.binarycarrick on PATHPath to the carrick executable used to launch lsp --stdio.
carrick.diagnosticstrueEnables contract verdict diagnostics in the Problems panel.
carrick.definitiontrueEnables cross-repository Go to Definition navigation.
carrick.boundarytrueEnables the status bar indicator showing workspace index state.
carrick.codeLenstrueEnables code lenses above routes and client calls with indexed counterparts.

To disable all local Carrick diagnostics and hook outputs across your environment, set CARRICK_CHANNEL=off in your shell environment.

Generic LSP client integration

Any Language Server Protocol client can integrate with Carrick by starting the language server process:

carrick lsp --stdio

Clients pass configuration settings via initializationOptions using the property names from the table above (omitting the carrick. prefix). To update settings during an active session, send a workspace/didChangeConfiguration notification containing { "settings": { "carrick": { ... } } }.

The server associates with the primary workspace folder provided by the client, falling back to the nearest parent .carrick/ directory if required.