omp packages

realontext0.20.0

Code search for coding agents, over the directory you are in. CLI and MCP server.

GitHub Actions Published 1 day ago SEE LICENSE IN LICENSE ~3.6K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

realontext

Code search for coding agents, over the directory you are in: whole functions and classes, ranked on the machine and, when you are logged in, by a model through the realontext Relay.

Installing

npm install -g realontext

The menu

Run realontext with no command, in the repository's root: connect agents, log in, and see your plan, credits left and last queries.

Connecting an agent

Claude Code: install the plugin, once for every repository. In Claude Code:

/plugin marketplace add https://context.revlm.com/marketplace.json
/plugin install realontext@realontext

Other agents: in the repository's root,

realontext setup                 # pick the agents in the menu
realontext setup codex gemini    # or name them: codex, gemini, cursor, vscode, opencode

It runs the agent's own mcp add (Codex, Gemini CLI) or writes the entry into the repository's config (.cursor/mcp.json, .vscode/mcp.json, opencode.json), replacing any earlier realontext entry. For any other MCP client:

{ "realontext": { "command": "realontext", "args": ["mcp"] } }

Logging in

Log in once; the Token is kept in ~/.config/realontext/config.toml (%USERPROFILE%\.config\realontext\config.toml on Windows) and every repository uses it:

realontext login          # in the browser
realontext login --paste  # when the browser is on another machine

With a Token, a described query is ranked at the Relay, which is sent the query, file paths and function names, and the code of the candidate functions. Without a Token nothing leaves the machine: the results are ranked locally, with a notice saying so. REALONTEXT_TOKEN overrides the saved Token; set to an empty string, it keeps that process local.

Updates

The binary keeps itself at the version the Relay names. In the background, at most once an hour, realontext asks the Relay for it; a newer one is downloaded from the npm registry (npm_config_registry if set), checked against the registry's integrity, and kept in ~/.local/share/realontext (%LOCALAPPDATA%\realontext on Windows). The next start runs it. An agent's realontext mcp asks before every query and, when there is a newer binary, runs the query on it, without the agent seeing the switch. A newer npm install -g realontext runs in its place. REALONTEXT_NO_AUTO_UPDATE=1 turns this off.

From the shell

realontext query -i --pattern 'yaml|load'                                       # the current directory
realontext query --pattern 'yaml|load' --query "why does loading yaml crash"     # described: the Relay ranks
realontext query --pattern 'yaml|load' --path src --path lib -g '*.rs'          # paths, and rg's options
git log --oneline | realontext query --pattern fix                              # stdin, line by line
cat loader.rs | realontext query --label loader.rs --pattern yaml               # stdin, named for its grammar

The regex is --pattern, the description --query, each place to search --path; every other word goes to ripgrep as one of its options. Code comes back as whole functions and classes, any other file line by line. With --query, a description of the code, the Relay ranks the results; without it, the pattern's words do. As with grep: text on stdout (--json for programs), exit status 0 with results, 1 without, 2 on error.

Builds: macOS on Apple Silicon (13 and later), x64 Linux and x64 Windows.