Skip to content

nyx_brain

Fetch the deploy cookbook for a repository.

The cookbook is markdown guidance your AI agent (Claude Code, Cursor, Windsurf, …) executes via nyx_* primitives — no in-pod planner, no streaming. nyxory provides the recipes plus the tools; the agent does the thinking.

For an agent caller, the response shape is: { “data”: { “cookbook”: "", “scan”: { “repo_url”, “host”, “owner”, “repo” }, “project_state”: “unknown” | { quota_used, quota_hard, … }, “received_briefing”: "" } }

In human mode the cookbook prints to stdout (markdown — pipe to glow or less for pretty-rendering); a one-line scan summary lands on stderr. In --json mode the full envelope lands on stdout.

--project defaults to the project = "…" field of a .nyxrc walked up from cwd; pass —project explicitly to override. The flag is required schema-side but soft on the server: the cookbook returns even when the project is unknown, with project_state=“unknown”.

Standard flow:

nyx project add widget nyx deploy https://github.com/me/widget —project widget

→ cookbook prints; your agent reads it and drives nyx_shell, …

Section titled “→ cookbook prints; your agent reads it and drives nyx_shell, …”

Inside a repo with .nyxrc { project = “widget” }:

Section titled “Inside a repo with .nyxrc { project = “widget” }:”

nyx deploy https://github.com/me/widget

Brief the cookbook ahead of time so we (and future deploys) sharpen:

Section titled “Brief the cookbook ahead of time so we (and future deploys) sharpen:”

nyx deploy https://github.com/me/widget
—agent-briefing “Next.js 14, postgres backend, custom Dockerfile, port 3000”

ArgumentRequired
repo-urlyes
FlagTypeDefaultDescription
--agent-briefingstringFree-form briefing about the repo: stack, components, deployment intent, env vars. Pass - to read from stdin. Richer briefings → better cookbooks for everyone.
--contextstringOverride the active context for this invocation (also: NYX_CONTEXT env var)
--jsonboolfalseEmit one JSON envelope per invocation (stdout for success, stderr for errors)
--projectstringProject to fetch the cookbook for. Use the namespace form from nyx_project_list[*].namespace (typically nyx-<label>), NOT the human-readable label. Required-soft: the server returns the generic cookbook with project_state=“unknown” if empty or unmatched. Falls back to .nyxrc when omitted.

Generated from tree.json @ fallbac.