discover

A command-line search tool for finding relevant saved memories by keyword across project, personal, or global scopes.

In plain words
What is it for?
Use it to search for a topic, limit or format results, search selected scopes, include cross-scope results, or provide a project directory for context.
Why use it?
It reduces the time spent looking through stored information and can rank results from more relevant scopes first.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/proticom/gnosys/discover
Clone the repo
git clone --depth 1 https://github.com/proticom/gnosys
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00591
Opus 5 $0.00000 $0.00296
Sonnet 5 $0.00000 $0.00118
Haiku 4.5 $0.00000 $0.00059

Measured 2d ago against content hash 4500c5a35594, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

discover scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/discover.md · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gnosys discover

Discover relevant memories by keyword.

Usage

gnosys discover "auth tokens"
gnosys discover "auth tokens" --federated
gnosys discover "auth tokens" --scope project,user --directory /path/to/project
gnosys discover "auth tokens" --json --id-format raw

Options

Option Description
-n, --limit <number> Max results (default 20)
--json Output results as JSON
--federated Tier-boosted cross-scope discovery (project > user > global)
--scope <scope> Filter scopes: project, user, global (comma-separated)
-d, --directory <dir> Project directory for context detection
--id-format <format> ID display: short, long, or raw (default short)

Default path (FTS)

When neither --federated nor --scope is set:

  1. Opens the central DB (~/.gnosys/gnosys.db).
  2. Runs discoverFts against the query.
  3. Formats results with project name lookup and formatMemoryIdHyperlink.

If the central DB is unavailable:

Central DB not available. Run 'gnosys init' first.

No results:

No memories found for "<query>". Try gnosys search for full-text.

Federated / scope path

When --federated or --scope is set:

  1. Opens central DB; exits if unavailable (Central DB not available.).
  2. Detects current project via --directory when provided.
  3. Parses comma-separated --scope values.
  4. Calls federatedDiscover with limit, project ID, and scope filter.

Human output lists title, category, optional project name, scope, and score. Empty results:

No memories found for "<query>".

JSON output

With --json:

  • Federated: { query, projectId, count, results }
  • Default FTS: { query, count, results } or { query, results: [] } when empty

Platform notes

  • Default FTS requires a initialized central DB (gnosys init).
  • Federated discovery uses the same central DB; scope filtering respects project/user/global tiers.

Read the full file on GitHub · 83 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 83 lines · 0 tokens per session scan A 4500c5a35594

Subscribe to this mod's changes

discover is a command published in the GitHub repository proticom/gnosys (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 591 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.