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"

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

  # 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)
      --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-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 on stdio for Nirmata AI tools
      --new-session              create a new session (default: true) (default true)
      --prompt string            prompt for the AI workflow
      --resume-session string    ID of session to resume (use 'latest' for the most recent session)
      --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

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