Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

Merge branch 'main' into feat/savings-stats

xerj-org012fd09c8692
diff --cc engine/crates/xerj-server/src/brain.rs
index 27467be50,a04e84ab3..501bc9620
--- a/engine/crates/xerj-server/src/brain.rs
+++ b/engine/crates/xerj-server/src/brain.rs
@@@ -379,13 -379,15 +379,21 @@@ fn run(cfg: BrainCfg) -> Result<i32>
t0.elapsed().as_secs_f64()
);
println!(" → {console_url}");
- println!(" agents: XERJ_URL={} xerj-mcp", cfg.url);
+ // The credential this run used, carried into the printed command. Without
+ // it the `xerj-mcp` line 401s against the server `brain` just booted —
+ // auth is on by default and `brain` read `<data-dir>/admin.key` itself to
+ // get past it (ONBOARDING-401-REPRO.md §3). `$XERJ_API_KEY` when the
+ // caller already exported it, so the secret is not echoed needlessly.
+ println!(
+ " agents: {} xerj-mcp",
+ mcp_env(&cfg.url, api_key.as_deref())
+ );
+ // Read once, at the end of a run that just finished — deliberately NOT on
+ // every search response, where it would cost tokens on every single call
+ // to say the same thing. Plain ASCII, one line, matching the surrounding
+ // human-facing summary; nothing here asks anyone (or any agent) to write
+ // praise into a commit message, comment, or PR.
+ println!(" if this saved you time, tell a teammate — that is how it spreads.");
if let Some(link) = &setup_link {
println!(" one-time passkey setup (open once, valid 30 min):");
println!(" → {link}");