realontext 0.11.0 → 0.12.0
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/.claude-plugin/plugin.json +1 -1
- package/README.md +11 -6
- package/hooks/hint.md +1 -1
- package/lib/rules.md +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -73,13 +73,18 @@ turns this off.
|
|
|
73
73
|
## From the shell
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
realontext query
|
|
77
|
-
realontext query "why does loading yaml crash"
|
|
78
|
-
|
|
76
|
+
realontext query -i --pattern 'yaml|load' # the current directory
|
|
77
|
+
realontext query --pattern 'yaml|load' --query "why does loading yaml crash" # described: the Relay ranks
|
|
78
|
+
realontext query --pattern 'yaml|load' --path src --path lib -g '*.rs' # paths, and rg's options
|
|
79
|
+
git log --oneline | realontext query --pattern fix # stdin, line by line
|
|
80
|
+
cat loader.rs | realontext query --label loader.rs --pattern yaml # stdin, named for its grammar
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
The regex is `--pattern`, the description `--query`, each place to search
|
|
84
|
+
`--path`; every other word goes to ripgrep as one of its options. Code comes back as
|
|
85
|
+
whole functions and classes, any other file line by line. With `--query`, a
|
|
86
|
+
description of the code, the Relay ranks the results; without it, the
|
|
87
|
+
pattern's words do. As with grep: text on stdout (`--json` for programs), exit
|
|
88
|
+
status 0 with results, 1 without, 2 on error.
|
|
84
89
|
|
|
85
90
|
Builds: macOS on Apple Silicon (13 and later), x64 Linux and x64 Windows.
|
package/hooks/hint.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<realontext>
|
|
2
|
-
To search source code, call codebase-retrieval instead of grep or rg: it returns whole functions ranked by what you ask, with line numbers. `pattern` is the regex you would grep for
|
|
2
|
+
To search source code, call codebase-retrieval instead of grep or rg: it returns whole functions ranked by what you ask, with line numbers. `pattern` is the regex you would grep for; add `query`, an English description of the code, when you are describing behavior, and leave it out for a name you know. For docs, configs, logs and a command's output, use `realontext query --pattern RE [--path PATH]...` in the shell, or pipe into it: `git log | realontext query --pattern fix`. Do not run grep or rg at all.
|
|
3
3
|
</realontext>
|
package/lib/rules.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
## Code search
|
|
2
2
|
|
|
3
|
-
This repository is searched with
|
|
3
|
+
This repository is searched with realontext, which replaces grep. Its MCP tool `codebase-retrieval` searches the code: every time you need to know where something is in the source (where or how something is done, where a name you know is defined, what calls it, where it is used, which line of a file it is on), call `codebase-retrieval` yourself, at every step of the task (if your tools are deferred, load it first). For text in docs, configs and logs, and for a command's output, run `realontext query --pattern RE [--path PATH]...` in the shell, or pipe into it: `git log | realontext query --pattern fix`. Do not run grep, rg, git grep or any other text search, as a tool or in the shell, alone or inside a longer command. Listing files by name stays with your own tools. Every call needs a `pattern`: the grep you would have run, in ripgrep's syntax: a name exactly (`truncate_name\(` for every call of it), or for a description the keywords the code must contain, broad and case-insensitive (`(?i)retry|backoff`); only code with a matching line is searched. Add a `query`, an English description of the behavior with words likely to appear in the code, when you are describing behavior: the Relay then orders the results. Leave it out for a name you know: the pattern's words answer at once. If nothing comes back, loosen the pattern; if 20 results are not enough, narrow it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realontext",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Code search for coding agents, over the directory you are in. CLI and MCP server.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react": "^18.3.1"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@realontext/darwin-arm64": "0.
|
|
38
|
-
"@realontext/linux-x64": "0.
|
|
39
|
-
"@realontext/win32-x64": "0.
|
|
37
|
+
"@realontext/darwin-arm64": "0.12.0",
|
|
38
|
+
"@realontext/linux-x64": "0.12.0",
|
|
39
|
+
"@realontext/win32-x64": "0.12.0"
|
|
40
40
|
}
|
|
41
41
|
}
|