/nuguard:nuguard-configfrom nuguard
Collects NuGuard LLM credentials, target URL, and authentication settings interactively, then writes them to .claude/nuguard.local.md and patches nuguard.yaml.
Ships in nuguard. Installing the plugin adds it to Claude Code.
Collect the user's NuGuard configuration and write it to .claude/nuguard.local.md.
This file is read by all NuGuard commands and agents to avoid repeating credentials on every call.
After saving the credentials file, this command also writes or patches nuguard.yaml in the
current directory so that subsequent CLI calls pick up the LLM model and target settings immediately.
Read .claude/nuguard.local.md if it exists so you can show current values as defaults.
Ask the user for each value. Show the current value in brackets when one already exists.
Mark optional fields clearly — only llm_api_key and target_url are required.
LLM settings (used for SBOM enrichment, analysis, and red-team payload generation):
LLM API Key (required) — API key for the LLM provider.
Accepts any LiteLLM-compatible key (Gemini, OpenAI, Anthropic, Azure, etc.).
Example: AIza..., sk-...
Model name (optional, default: gemini/gemini-3.6-flash) — LiteLLM model string.
Examples: gemini/gemini-3.6-flash, openai/gpt-4o, azure/gpt-4o, anthropic/claude-opus-4-7
API Base URL (optional) — Required for Azure OpenAI or self-hosted models.
Example: https://my-instance.openai.azure.com
API Version (optional) — Required for Azure OpenAI.
Example: 2024-05-01-preview
Target application (used for behavioral testing and red-team):
Target URL (required) — Base URL of the running AI application.
Example: http://localhost:8080
Chat endpoint (optional, default: /chat) — Path for sending messages.
Example: /api/v1/chat, /chat/completions
Authentication — ask which type applies:
none — no authentication requiredbearer_token — Authorization: Bearer <token>api_key — custom header with API keybasic — HTTP Basic (username + password)Then collect the relevant credential(s) for the chosen type:
X-API-Key) and key value.claude/nuguard.local.mdCreate or overwrite the file with this structure (omit empty optional fields):
---
llm_api_key: "<value>"
llm_model: "<value>"
llm_api_base: "<value>"
llm_api_version: "<value>"
target_url: "<value>"
chat_endpoint: "<value>"
auth_type: "<none|bearer_token|api_key|basic>"
auth_token: "<value>"
auth_api_key_header: "<value>"
auth_api_key_value: "<value>"
auth_username: "<value>"
auth_password: "<value>"
---
# NuGuard Project Config
Generated by /nuguard-config. Edit manually or re-run the command to update.
Do not commit this file — it contains credentials.
nuguard.yamlIf nuguard.yaml does not exist in the current directory, create it now via Bash:
nuguard init --target <target_url>
(If nuguard is not on PATH: use uv run nuguard if uv is present, otherwise run pip install nuguard first. Omit --target if no target URL was provided.)
Then — whether the file was just created or already existed — patch these values into nuguard.yaml
using the Read and Edit tools:
llm.model → set to the collected model name (default gemini/gemini-3.6-flash)target.url → set to the collected target URL (if provided)target.endpoint → set to the chat endpoint (if provided and not the default /chat)target.auth → write the auth block matching the chosen auth type:
none — leave auth block commented out or remove itbearer_token — type: bearer + header: "Authorization: Bearer <token>"api_key — type: api_key + header: "<header_name>: <key_value>"basic — type: basic + username/password fields using ${ENV_VAR} syntaxDo not write the llm_api_key value directly into nuguard.yaml. The YAML uses environment
variable interpolation: the CLI reads LITELLM_API_KEY from the environment. The actual key stays
only in .claude/nuguard.local.md.
Tell the user:
****).claude/nuguard.local.md is project-local and should not be committed
(*.local.md is in .gitignore)nuguard.yaml for model and target settings; the API key is
injected as LITELLM_API_KEY automatically by any NuGuard plugin command that reads the config/nuguard-config any time to update settingsWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub nuguardai/nuguard --plugin nuguard7 commands in this plugin
/nuguard-analyzeStatic risk analysis on an AI-SBOM — NGA rules, MITRE ATLAS, CVE scans/nuguard-behaviorIntent-aware behavioral testing against a running AI application/nuguard-initInitialise nuguard.yaml, canary.example.json and cognitive-policy.md in the current project/nuguard-redteamAdversarial red-team / pentest testing — prompt injection, data exfiltration, privilege escalation, MCP toxic-flow/nuguard-sbomGenerate an AI Bill of Materials (AI-SBOM) from source code or a git repository/nuguard-scanNuGuard unified scan — SBOM generation → static analysis, with optional policy/red-team validationOther plugins' commands for the same job