nctl ai

nctl ai

Agentic AI powered workflows

nctl ai [flags]

Examples


  # Run an interactive AI workflow.
  nctl ai

  # Run an interactive AI workflow with a specific prompt.
  nctl ai --prompt "generate a Kyverno policy that enforces all pods have a 'team' label"

  # Use a different LLM provider (e.g., Gemini, Anthropic, or Bedrock).
  nctl ai --provider gemini --model gemini-2.5-pro
  nctl ai --provider anthropic --model claude-sonnet-4-20250514
  nctl ai --provider bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0

  # Allow AI to access additional directories.
  nctl ai --allowed-dirs "/path/to/policies,/tmp" --prompt "create pod security policies in /path/to/policies"

  # Load custom skills from local path
  nctl ai --skills "/path/to/custom-skill" --prompt "use custom skill"

  # Resume a previous session.
  nctl ai --resume-session latest
  nctl ai --resume-session 20251125-0120

  # List all available sessions.
  nctl ai --list-sessions

  # Use a custom MCP configuration file.
  nctl ai --mcp-config "/path/to/custom/mcp.yaml"

  # Start nctl as an MCP server for external AI clients.
  nctl ai --mcp-server

  # Start MCP server with verbose logging.
  nctl ai --mcp-server -v 1

Options

      --allowed-dirs strings          additional directories the AI can access (comma-separated, env: NIRMATA_AI_ALLOWED_DIRS)
      --delete-session string         delete a session by ID
      --force                         allow destructive operations in non-interactive mode (requires both --prompt and --skip-permission-checks)
  -h, --help                          help for ai
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --list-sessions                 list all available sessions
      --max-background-workers int    maximum number of background workers that can be spawned in a single tool call (default: 3)
      --max-tool-calls int            maximum number of tool calls to make (default 200)
      --mcp-config string             path to MCP configuration file (default: ~/.nirmata/nctl/mcp.yaml)
      --mcp-server                    run a MCP (Model Context Protocol) server for Nirmata AI tools
      --mcp-server-port int           port to run the MCP server on when using http transport (default 8080)
      --mcp-server-transport string   transport to use for the MCP server (stdio or http) (default "stdio")
      --new-session                   create a new session
      --prompt string                 prompt for the AI workflow
      --resume-session string         ID of session to resume (use 'latest' for the most recent session)
      --skills strings                load custom skills from local paths (comma-separated, env: NIRMATA_AI_SKILLS)
      --skip-permission-checks        skip permission checks for tools (not recommended)
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
      --usage-details                 show AI usage details and exit

Note: For provider-specific options such as --provider and --model, see AI Platform Assistant under AI Provider Configuration.

Options inherited from parent commands

  -v, --v Level   number for the log level verbosity

SEE ALSO

  • nctl - nctl is the command line interface for Nirmata