Install
Install with PiG
pig install npm:@hopetherenojs/contextyaInstall with Pi
pi install npm:@hopetherenojs/contextyaPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./pi/realontext.js"
]
}README
Written by the package's publisher, shown as published in version 0.1.5 (README.md). PiG does not review it.
contextya
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 contextya Relay.
Installing
npm install -g @hopetherenojs/contextya
The menu
Run contextya with no command, in the repository's root: connect agents,
log in, and see your plan, credits left and last queries.
Connecting an agent
In the repository root (including Claude Code):
contextya setup # pick the agents in the menu
contextya 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 contextya entry. For any other MCP
client:
{ "contextya": { "command": "contextya", "args": ["mcp"] } }
Logging in
Log in once; the Token is kept in ~/.config/contextya/config.toml
(%USERPROFILE%\.config\contextya\config.toml on Windows) and every
repository uses it:
contextya login # in the browser
contextya 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. CONTEXTYA_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, contextya 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/contextya
(%LOCALAPPDATA%\contextya on Windows). The next start runs it. An agent's
contextya 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 @hopetherenojs/contextya runs in its place. CONTEXTYA_NO_AUTO_UPDATE=1
turns this off.
From the shell
contextya query -i --pattern 'yaml|load' # the current directory
contextya query --pattern 'yaml|load' --query "why does loading yaml crash" # described: the Relay ranks
contextya query --pattern 'yaml|load' --path src --path lib -g '*.rs' # paths, and rg's options
git log --oneline | contextya query --pattern fix # stdin, line by line
cat loader.rs | contextya 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.