carrick 0.3.96 → 0.3.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,312 +1,72 @@
1
- # carrick
1
+ <p align="center"><a href="https://carrick.tools"><img src="https://carrick.tools/brand/carrick-banner@2x.png" alt="Carrick" width="100%"></a></p>
2
2
 
3
- Carrick indexes local TypeScript repositories and identifies the routes and
4
- calls in the file you are editing, their counterparts in indexed repositories,
5
- and whether their contracts agree. Configured editors show diagnostics, and
6
- coding agents can receive context through supported hooks or explicit checks.
3
+ # Carrick
7
4
 
8
- ```
9
- npm install -g carrick
10
- carrick login
11
- cd ~/code # a repo, or the folder that holds your repos
12
- carrick init
13
- ```
14
-
15
- `carrick login` opens the browser to authorise a Carrick workspace. `init`
16
- accepts that credential or a `CARRICK_TOKEN` environment override, and signs in
17
- through the browser itself when a terminal has neither. GitHub CLI credentials
18
- do not grant Carrick access.
5
+ ### TypeScript codebase intelligence for AI agents & IDEs.
19
6
 
20
- An installed `carrick` does not move on its own, and a scan on an old build can
21
- fail on a defect that is already fixed. So every command reads a cached answer
22
- to "is there a newer one", refreshes it in the background, and prints a line
23
- naming the exact update command for the way this copy was installed. It never
24
- blocks on the network, and `CARRICK_NO_UPDATE_CHECK=1` turns it off for a
25
- reproducible run. The one thing it installs is an older **global** `carrick`
26
- when you run through `npx`: that install answers your agent's hooks and every
27
- new shell, so it is brought level with the version you just ran, using the
28
- package manager that owns it and nothing that overrides your own npm
29
- configuration. A machine with no global is never installed onto without a yes —
30
- `carrick init` asks, and `carrick init --install-global` is the answer for a
31
- script. In CI it warns
32
- and continues, so a workflow decides its own version — and
33
- `carrick-tools/carrick@v1` in a workflow already moves to each release.
7
+ Coding agents working across full-stack and multi-service codebases routinely rebuild existing helpers, trust stale type definitions, and modify API contracts without knowing who consumes them.
34
8
 
35
- `init` prints one line per thing it did — `◇` done, `▲` a warning with what to
36
- do about it, `■` something it could not do and why — and ends on the sentence
37
- to paste to your agent. What it installs, the hooks included, is in the
38
- [CLI reference](https://docs.carrick.tools/cli#workspace-initialisation). The CI
39
- check and a `carrick.json` written by hand are in
40
- [Building the index](https://docs.carrick.tools/building-the-index), and the
41
- editor extension is in [In your editor](https://docs.carrick.tools/editor). Without a terminal — CI, an
42
- agent's shell, a pipe — the same lines are written as plain text, with no colour
43
- and no spinner.
9
+ Carrick solves this by indexing your entire TypeScript ecosystem, from frontend apps to backend services, whether they live in a monorepo or across multiple repositories. By integrating deeply with the TypeScript compiler, Carrick traces every route, type, and cross-service call while recording function behaviour—so agents search by intent rather than name and stay grounded in your real architecture.
44
10
 
45
- `init` runs in this order, and nothing is written — on this machine or in
46
- Carrick — until you accept what it proposes:
11
+ Delivered via MCP for AI agents and LSP for IDEs, Carrick ensures models see existing endpoints and utilities before generating new code. The scanner is source-available, runs from your CLI or CI pipeline, and includes a Free plan so you can start building safer agent workflows immediately.
47
12
 
48
- 1. **The repos this install covers.** In a folder of sibling repos it asks
49
- which ones, with every repo chosen to begin with. A folder routinely holds a
50
- repo that should not be indexed, and a repo you leave out gets no proposal
51
- entry, no project assignment and no connection. Without a terminal, name
52
- them: `--repo owner/repo`, repeated or comma-separated. A folder of repos
53
- with neither a terminal nor `--repo` stops there, having written nothing;
54
- add `--yes` to cover all of them. A single repository is not a choice and is
55
- never asked about.
56
- 2. **The project.** Which project the selected repos belong in.
57
- 3. **The proposal**, which names the packages found, the repos covered, any
58
- project to create, and any repo that would move out of the project it is in
59
- now. Answering no, or ending any question with Ctrl-C, ends the run with
60
- nothing written.
13
+ ## Get started
61
14
 
62
- Existing users can name the project on the command line:
63
-
64
- ```
65
- carrick init --project payments --allow-move
15
+ ```bash
16
+ npm install -g carrick
17
+ carrick init
66
18
  ```
67
19
 
68
- `--project` puts the selected repos in that project, creating it from the
69
- terminal where the API allows that and printing the project link where it does
70
- not. A repo that is already in another project is **moved** out of it, which
71
- changes what every agent querying either project can see, so the move is named
72
- in the proposal with the project it comes out of and asked about separately.
73
- `--yes` does not grant it: `--allow-move` does, and without either the run
74
- stops before anything is moved.
75
-
76
- Connected repos are placed from the terminal, so the GitHub App grant is the
77
- only browser step; where the API has no assignment action, the command prints
78
- the repo-assignment link and, in an interactive terminal, opens the page.
79
- Either way the claim comes from a read. The CLI reads `resolve-repos` until
80
- every covered repo reports `project_slug: "payments"`, and a repo connected to
81
- another project remains pending. A target it cannot meet does not stop the run.
82
- The hooks, the MCP connection and the proposal are written, and the command
83
- says which browser steps are left.
84
-
85
- Without `--project` the project step still runs: the command takes the project
86
- the repos are already in, and otherwise lists the workspace's projects for you
87
- to name one. An empty answer leaves the step to the browser. Every project is
88
- printed as the dashboard shows it, display name and slug both — `Payments
89
- (payments)`.
90
-
91
- Each repository is identified by its `origin` remote. A remote written through
92
- a per-account SSH host alias (`git@github.com-work:owner/repo.git`) is resolved
93
- with `ssh -G`, so an alias whose `HostName` is `github.com` is an ordinary
94
- GitHub repository here. When a repository still names none, `init` says which
95
- one it was and what it read, and leaves that repository out of the project and
96
- connection steps rather than dropping it quietly. `carrick init --repo
97
- owner/repo` names the repository in that case: a `--repo` value that matches no
98
- repo in the folder attaches to the one repo there that has no identity.
99
-
100
- Credentials live in `$XDG_CONFIG_HOME/carrick/credentials.json`, falling back
101
- to `~/.config/carrick/` on macOS and Linux or `%APPDATA%\carrick\` on Windows.
102
- The file is written with mode 0600. `carrick logout` revokes that file's key
103
- on the server, then removes the file; other machines and editor connections
104
- stay signed in. If Carrick cannot be reached, the file is still removed and
105
- the command says the key is still live. Unset `CARRICK_TOKEN` separately if
106
- you set that override. Every issued key is listed, and can be revoked, at
107
- [your account](https://app.carrick.tools/account).
108
-
109
- Rust derives the same services for CI, local indexing and `init`. An existing
110
- `carrick.json` is authoritative. When it is missing, `init` presents workspace
111
- packages and their compiler configuration and writes that proposal to
112
- `.carrick/proposal.json`, which is ignored. Each member in it also carries what
113
- its own manifest says about it. That is `private`, `bin`, `main`, `exports`,
114
- any deployment descriptor in its directory, and the members that depend on it,
115
- so the application-versus-library decision is read rather than re-derived. It
116
- writes no `carrick.json`: your agent turns the proposal into one, so the config
117
- you commit is one somebody has read, and the first scan runs against it.
118
- `carrick index` is the scan that asks Carrick to classify what the
119
- deterministic passes could not, and it refuses to run until a `carrick.json`
120
- exists. It is the only scan a first run makes.
121
-
122
- Workspace detection handles a repo root or immediate sibling repositories.
123
- An optional `carrick-workspace.json` adds paths through `repos` and removes
124
- directory names through `exclude`. Where you leave a repo out of the selection,
125
- init writes that name into `exclude` and records it under a `carrick` key
126
- beside it: every later command reads the same answer, so the scans, the editor
127
- hooks and the next `init` all leave that repo alone, and `carrick remove` takes
128
- back the names init added and nothing you wrote yourself. `--repo` naming an
129
- excluded repo is refused and says which file excludes it. `carrick derive
130
- --workspace . --json` previews the Rust proposal without writing files or
131
- scanning.
132
-
133
- Deno projects use their existing `deno.json` or `deno.jsonc` and require Deno
134
- 2.9.4 or newer on PATH. Before local indexing, prepare their dependencies with
135
- `deno install --frozen --node-modules-dir=none` from the Deno workspace root;
136
- this prevents npm lifecycle scripts from running even when `allowScripts`
137
- authorizes them. Generate any application-owned declarations through the
138
- project's normal build before indexing.
139
-
140
- Deno services normally omit `tsconfig`. An explicit ordinary TypeScript config
141
- selects the TypeScript path; an explicit Deno config must be the nearest Deno
142
- manifest, with `deno.json` taking precedence over `deno.jsonc`. Import maps must
143
- be local files.
20
+ `carrick init` signs you in, asks which repositories to index and connects your agent. Your agent then writes each repository's `carrick.json` and runs the first scan. The [quick start](https://docs.carrick.tools/quickstart) has the details (Node 24 or newer).
144
21
 
145
- ## What it installs
22
+ ## One index, three surfaces
146
23
 
147
- The scanner is a Rust binary that arrives as
148
- `@carrick-tools/cli-<platform>-<arch>`, an optional dependency npm resolves by
149
- `os` and `cpu`; the type sidecar, the language server and the hook scripts come
150
- with this package. Installing Carrick requires no postinstall script, so
151
- `--ignore-scripts` works. Dependency preparation and type checking during indexing
152
- can download registry packages; `index` and `refresh` can also download
153
- authenticated hosted indexes.
24
+ Search existing code through your agent, inspect live contracts in your editor, and catch breaking changes in your pull requests.
154
25
 
155
- Node 24 or newer is required because the sidecar resolves request and response
156
- types in a Node process.
26
+ ### In your agent
157
27
 
158
- ## The commands
28
+ Give your AI assistants complete context on what already exists, how endpoints are shaped, and who breaks if something changes. Carrick maps every function by what it actually does, allowing agents to find existing implementations and build on them—even in repositories you haven't checked out locally. Endpoint types are pulled straight from the TypeScript compiler in the service that exposes them.
159
29
 
160
- | Command | What it does |
161
- |---|---|
162
- | `carrick login` | Authorise a Carrick workspace in the browser, or verify `CARRICK_TOKEN` |
163
- | `carrick logout` | Remove the saved local credential |
164
- | `carrick init [--repo OWNER/REPO]... [--project SLUG] [--allow-move]` | The repos this install covers, the project, the service proposal in `.carrick/`, the agent hooks, the MCP connection, and the prompt that writes `carrick.json` |
165
- | `carrick doctor` | Re-check that setup: the declared paths, the CI workflow against the current template, the hooks, the MCP connection and how far the index is behind |
166
- | `carrick remove [--keep-login]` | Undo all of that on this machine, and list the files the scaffold added to the repository |
167
- | `carrick index` | Derive the workspace, apply optional repo overrides and write `.carrick/`, with Carrick classifying what the deterministic passes could not |
168
- | `carrick refresh [--service X]` | Re-scan one repo, or all of them, and re-join the index. What the session-start hook runs |
169
- | `carrick check <file>` | What the index knows about that file, verdicts included |
170
- | `carrick touch <file>` | The same, without the verdicts |
171
- | `carrick status` | What the index holds, and how far each repo has moved since |
172
- | `carrick lsp --stdio` | The language server, for an editor or any LSP client |
173
- | `carrick hook post-edit` | Claude Code PostToolUse hook, reading the tool payload on stdin |
174
- | `carrick hook session-start` | Claude Code SessionStart hook |
175
- | `carrick templates workflow` | Print the CI workflow to add to a repo |
176
- | `carrick <path>` | The full scan, which is what the GitHub Action runs |
30
+ Works with any MCP-compatible agent, including Claude Code, Cursor, Windsurf, and Codex.
177
31
 
178
- `check`, `touch` and `status` read `.carrick/` and write nothing. Add `--json`
179
- for the machine-readable shape, pinned in
180
- [`docs/local-mode-output.md`](https://github.com/carrick-tools/carrick/blob/main/docs/local-mode-output.md).
32
+ ### In your editor
181
33
 
182
- ## Where the answers land
34
+ Inspect cross-service contracts and jump between connected files without leaving your IDE. "Go to Definition" jumps directly from a service call to its handler when the code is on disk, while Code Lens displays every caller across your local index inline. If a frontend call and backend handler fall out of sync, Carrick surfaces type mismatches as native editor diagnostics.
183
35
 
184
- - **Claude Code**: the hooks `carrick init` writes deliver on the edit itself.
185
- `claude plugin marketplace add carrick-tools/carrick` then
186
- `claude plugin install carrick@carrick` adds the language server too.
187
- - **VS Code, Cursor, Windsurf**: the `carrick-tools.carrick` extension is a
188
- client on `carrick lsp --stdio` and publishes diagnostics in the Problems
189
- panel. Whether an editor-hosted agent reads those diagnostics depends on its
190
- integration and configuration.
191
- - **Neovim, Helix, Zed, JetBrains**: any LSP client, on the same command.
192
- - **Anything else**: `carrick check <file>` on demand, and the pull request
193
- check in CI.
36
+ Available on the Visual Studio Marketplace and Open VSX, or runnable as a standard LSP server.
194
37
 
195
- ## In your editor
38
+ ### In your pull request
196
39
 
197
- Go to definition on a call to another service jumps to the handler that serves
198
- it, in the other repo. On a route it lists the call sites that reach it, and
199
- the editor shows the picker. Carrick answers only inside a row the index holds,
200
- and only when the file on the other side is on this disk, so every other jump
201
- falls through to TypeScript exactly as it did before.
40
+ Bring the exact same index into CI to catch contract risks, duplicate work, and silent version drift. When a producer and consumer fall out of sync—regardless of protocol—Carrick flags the exact mismatch directly on your PR before it merges. It also checks dependency versions across services to catch conflicting package updates early.
202
41
 
203
- ## Settings
42
+ ## Skills
204
43
 
205
- One switch per surface. In VS Code they are settings; any other LSP client
206
- sends the same keys, with the `carrick.` prefix stripped, as
207
- `initializationOptions`.
44
+ Carrick ships with four skills for the most common agent failures — breaking a caller in another service, rebuilding existing code, trusting a stale copy of another service's type, and missing places in a codebase-wide change. Each skill gets its answer from the Carrick index. `carrick init` installs them into `.claude/skills/` and `.agents/skills/`.
208
45
 
209
- | Setting | Default | What it turns off |
210
- |---|---|---|
211
- | `carrick.binary` | the `carrick` on PATH | — the path to the CLI, not a surface |
212
- | `carrick.diagnostics` | on | The verdicts in the Problems panel |
213
- | `carrick.definition` | on | Cross-repo go to definition. Off means Carrick answers nothing and your other definition providers are untouched |
214
- | `carrick.boundary` | on | The boundary: the status bar item, or the file-level row in a client without one |
46
+ | Skill | Use it | What it returns |
47
+ | :--- | :--- | :--- |
48
+ | [`carrick-impact`](https://docs.carrick.tools/carrick-impact) | Before changing or deleting a route, handler, response shape, event or shared function, or to ask "who calls this?" | Everything that depends on the code you are about to change, with a file and line for each, and a type verdict for each consumer |
49
+ | [`carrick-reuse`](https://docs.carrick.tools/carrick-reuse) | At the end of a task that added or changed functions, or to ask "does this already exist?" | The new functions compared against the whole function index, and the places the project has built the same thing twice |
50
+ | [`carrick-drift`](https://docs.carrick.tools/carrick-drift) | Before changing a request or response type, or when a compatibility verdict names a problem you cannot place | The producer's type, each consumer call site's expected type and the stored verdict, side by side, one operation at a time |
51
+ | [`carrick-census`](https://docs.carrick.tools/carrick-census) | For "find every place that does X" questions | Every match for two wordings of one concept, paged to the end and joined into one list with a receipt |
215
52
 
216
- `CARRICK_CHANNEL=off` in the environment turns off delivery altogether.
53
+ ## Ask your agent
217
54
 
218
- ## What a local index holds
219
-
220
- A local index holds deterministic routes, calls, protocol operations and their
221
- types, together with eligible hosted model answers. `index` and `refresh` read
222
- authenticated hosted indexes and replay answers for unchanged files when the
223
- hosted commit is available locally and cache versions match. Changed files
224
- keep their local facts while their hosted model answers are withheld. Boundary
225
- rows report enrichment status and remaining unclassified candidates; no model
226
- runs on the local machine.
227
-
228
- Hosted queries cover connected, indexed repositories in the selected Carrick
229
- project, including repositories absent from this disk, using their most recent
230
- default-branch indexes. They are available over MCP, and `carrick init`
231
- connects Claude Code through `claude mcp add`. Cursor, Windsurf and VS Code
232
- keep their configuration outside the workspace, so each is asked about by the
233
- path of its file: the terminal offers the ones whose configuration directory
234
- exists, ticked where the editor itself is detected, and a run with no terminal
235
- writes one only when `--mcp EDITOR` names it. `--yes` does not cover them. A
236
- `carrick` server is added to the file and every other entry in it is left
237
- alone.
238
- An entry init writes carries an `X-Carrick-Install-Id` header: a UUID generated
239
- once, kept in `~/.carrick/install-id`, and sent with every MCP call so a slow
240
- session can be told apart from a busy one. It says nothing about the machine or
241
- the person — `carrick remove` deletes it, and the next `carrick init` mints
242
- another. A `carrick` entry that is already there is left exactly as it is, with
243
- or without the header: the header is part of what a client keys its sign-in on,
244
- and nothing a user sees depends on it, so neither `init` nor `doctor` mentions
245
- an entry that has none.
246
- A machine with no client on it is given the line to run, with the
247
- id already in it:
248
-
249
- ```
250
- claude mcp add --scope user --transport http carrick https://api.carrick.tools/mcp --header "X-Carrick-Install-Id: <id>"
251
- ```
252
-
253
- The first scan on a repository's default branch writes its hosted index. A
254
- Claude Code session opened in a workspace still waiting for one starts
255
- `carrick refresh` in the background, at most once an hour
256
- (`CARRICK_REFRESH_COOLDOWN_MS` states another gap), so the hosted rows arrive
257
- without a command to remember.
258
-
259
- ## Checking the setup
260
-
261
- ```
262
- carrick doctor
263
- ```
264
-
265
- What Carrick answers depends on decisions made once, at setup: which
266
- directories are services, which shared roots they include, which tsconfig
267
- resolves their types. The index itself is rebuilt by CI on every push to the
268
- default branch; the configuration is not rebuilt by anything. `carrick doctor`
269
- re-reads it and exits non-zero when it finds something:
270
-
271
- - every `directory`, `include` and `tsconfig` a `carrick.json` declares exists,
272
- - `.github/workflows/carrick.yml` still holds the current template, printed as
273
- a diff of the lines it is missing (comments are not compared, and steps of
274
- your own are shown but are not a finding),
275
- - the agent hook entries are the ones this version installs, and the command
276
- they run still resolves to this package,
277
- - each agent client on this machine has the Carrick MCP server,
278
- - the hosted index answers for every service, with the local index's distance
279
- from the working tree and from the default branch as notes.
280
-
281
- It writes nothing, runs no scan and costs nothing.
282
-
283
- ## Removing Carrick
284
-
285
- ```
286
- carrick remove
287
- npm uninstall -g carrick
288
- ```
55
+ - "Which functions handle webhook signing across our services?"
56
+ - "Where do we deduplicate users by email?"
57
+ - "What calls `/api/users`, and what response shape does each caller expect?"
58
+ - "Show me every function that retries on rate-limit errors."
289
59
 
290
- `carrick remove` reverses `carrick init` on this machine, one line per thing it
291
- removed: the Carrick hook entries in this folder's `.claude` settings, the
292
- hooks and skills it copied into each repo here with their `.git/info/exclude`
293
- lines, the `carrick` MCP server in each agent client's configuration, the `.carrick`
294
- directory, and the saved credential. Other hooks, other MCP servers and the
295
- settings files themselves stay; an MCP server called `carrick` that points at
296
- anything other than `api.carrick.tools` is left alone and reported. Pass
297
- `--keep-login` to keep the credential, and `--workspace DIR` to name a folder
298
- other than this one. Running it twice is safe: the second run says there is
299
- nothing left to remove.
60
+ ## Docs
300
61
 
301
- Files the onboarding pull request added to the repository are version
302
- controlled, so the command lists them with the `git rm` line that removes them
303
- rather than deleting them itself, and names the sections — the `## Carrick`
304
- section of an `AGENTS.md`, the hook-pack entries in a committed
305
- `.claude/settings.json`, the `.claude` negations in `.gitignore` — that only
306
- their owner can unpick. Revoking the key itself is a separate action, at
307
- [app.carrick.tools/account](https://app.carrick.tools/account).
62
+ - [CLI reference](https://docs.carrick.tools/cli)
63
+ - [Building the index](https://docs.carrick.tools/building-the-index)
64
+ - [carrick.json](https://docs.carrick.tools/carrick-json)
65
+ - [MCP tools](https://docs.carrick.tools/mcp-tools)
66
+ - [Task skills](https://docs.carrick.tools/task-skills)
67
+ - [In your editor](https://docs.carrick.tools/editor)
308
68
 
309
69
  ## Licence
310
70
 
311
- Elastic License 2.0. See
71
+ Carrick has a free tier, and paid plans are on the [pricing page](https://carrick.tools/pricing). Elastic License 2.0. See
312
72
  [LICENSE.md](https://github.com/carrick-tools/carrick/blob/main/LICENSE.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "carrick",
3
- "version": "0.3.96",
4
- "description": "The API contract index for a TypeScript workspace: what the other services do with the routes and calls in the file you are editing, in your editor and in your agent's context",
3
+ "version": "0.3.97",
4
+ "description": "Maps your entire TypeScript codebase across services and repositories, giving AI agents full context on existing types, routes, and function behaviours over MCP before they write duplicate or breaking code.",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "monorepo",
@@ -58,11 +58,11 @@
58
58
  "zod": "^3.23.0"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@carrick-tools/cli-darwin-arm64": "0.3.96",
62
- "@carrick-tools/cli-darwin-x64": "0.3.96",
63
- "@carrick-tools/cli-linux-arm64": "0.3.96",
64
- "@carrick-tools/cli-linux-x64": "0.3.96",
65
- "@carrick-tools/cli-win32-x64": "0.3.96"
61
+ "@carrick-tools/cli-darwin-arm64": "0.3.97",
62
+ "@carrick-tools/cli-darwin-x64": "0.3.97",
63
+ "@carrick-tools/cli-linux-arm64": "0.3.97",
64
+ "@carrick-tools/cli-linux-x64": "0.3.97",
65
+ "@carrick-tools/cli-win32-x64": "0.3.97"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^24.13.3",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "carrick",
3
3
  "description": "Claude Code plugin for Carrick, which indexes TypeScript codebases across service and repository boundaries. After each edit it adds the file's routes, calls, and cross-service type mismatches to the session, and it registers Carrick's language server. It pairs with the Carrick MCP server, which lets agents search functions by intent rather than name.",
4
- "version": "0.3.96",
4
+ "version": "0.3.97",
5
5
  "author": {
6
6
  "name": "Carrick",
7
7
  "email": "hello@carrick.tools"