context
The context commands run semantic searches against the Ingrain Context Platform,
your organization’s ingested documents and recorded security rules. Each query is
matched on meaning, not keywords. There are
two subcommands, one per source of context:
documents— your organization’s ingested security documents.security_rules— prior security rules your security team has recorded.
ingrain context documents <query> [--limit N] [--json]ingrain context security_rules <query> [--limit N] [--json]documents
Section titled “documents”Semantic search across ingested security documents.
ingrain context documents "data retention policy for customer PII"security_rules
Section titled “security_rules”Semantic search across recorded security rules.
ingrain context security_rules "why did we choose mTLS between services"Both subcommands accept the same flags:
| Flag | Description |
|---|---|
--limit <N> | Maximum results to return, 1–50. Defaults to 5 for documents, 10 for security rules. |
--json | Emit raw JSON results to stdout, in place of the human-readable list. |
If nothing matches your query, the command prints a short hint — including whether your organization has any documents or security rules ingested yet.
Configuration
Section titled “Configuration”context talks to the Ingrain Context Platform over a sync URL and an API token.
Provide them via either:
- the
INGRAIN_SYNC_URLandINGRAIN_API_TOKENenvironment variables, or - a
[context]section in your user-levelconf.tomlwithsyncUrlandingrainApiTokenfields.
Run config to find your conf.toml. Set both values before
running a search. See the
[context] configuration page for the full key
reference and validation rules.