---
title: "Commands"
diataxis: reference
applies_to:
  product: "nctl"
audience: ["developer","platform-engineer"]
url: https://docs.nirmata.io/docs/nctl/commands/nctl/
---

## nctl

nctl is the command line interface for Nirmata

```bash
nctl [flags]
```

### Examples

```bash

  # Scan a Kubernetes cluster and analyze and publish the scan results
  nctl scan kubernetes --cluster --analyze --publish

  # Scan Kubernetes manifests, Dockerfiles, and Terraform code in a repository
  nctl scan repository https://github.com/nirmata/demo-resources

  # Scan the current directory
  nctl scan repository 

```bash

### Options

```text
  -h, --help      help for nctl
  -v, --v Level   number for the log level verbosity
```

### SEE ALSO

* [nctl add](/docs/nctl/commands/nctl_add/)	 - Add resources to Nirmata Control Hub  
* [nctl ai](/docs/nctl/commands/nctl_ai/)	 - Agentic AI powered workflows
* [nctl create](/docs/nctl/commands/nctl_create/)	 - Create policyexceptionrequests
* [nctl edit](/docs/nctl/commands/nctl_edit/)	 - Edit nctl resources
* [nctl get](/docs/nctl/commands/nctl_get/)	 - Get Nirmata Control Hub resources
* [nctl info](/docs/nctl/commands/nctl_info/)	 - Account and User Information
* [nctl login](/docs/nctl/commands/nctl_login/)	 - Provide authentication details to login
* [nctl raw](/docs/nctl/commands/nctl_raw/)	 - Direct access to the Nirmata REST API
* [nctl remediate](/docs/nctl/commands/nctl_remediate/)	 - Remediate a resource file or directory for policy violations
* [nctl remove](/docs/nctl/commands/nctl_remove/)	 - Remove Nirmata Control Hub resources
* [nctl scan](/docs/nctl/commands/nctl_scan/)	 - Scan resources
* [nctl signup](/docs/nctl/commands/nctl_signup/)	 - Create a new Nirmata Control Hub account
* [nctl transform](/docs/nctl/commands/nctl_transform/)	 - Transform resource manifests to json
* [nctl update](/docs/nctl/commands/nctl_update/)	 - Update Nirmata Control Hub resources
* [nctl version](/docs/nctl/commands/nctl_version/)	 - Show version and build information



---

## nctl

## nctl

nctl is the command line interface for Nirmata

```bash
nctl [flags]
```

### Examples

```bash

  # Scan a Kubernetes cluster and analyze and publish the scan results
  nctl scan kubernetes --cluster --analyze --publish

  # Scan Kubernetes manifests, Dockerfiles, and Terraform code in a repository
  nctl scan repository https://github.com/nirmata/demo-resources

  # Scan the current directory
  nctl scan repository 

```bash

### Options

```text
  -h, --help      help for nctl
  -v, --v Level   number for the log level verbosity
```

### SEE ALSO

* [nctl add](nctl_add.md)	 - Add resources to Nirmata Control Hub  
* [nctl ai](nctl_ai.md)	 - Agentic AI powered workflows
* [nctl compliance](nctl_compliance.md)	 - Compliance management commands
* [nctl create](nctl_create.md)	 - Create policyexceptionrequests
* [nctl edit](nctl_edit.md)	 - Edit nctl resources
* [nctl exceptions](nctl_exceptions.md)	 - Manage Kyverno PolicyExceptions
* [nctl get](nctl_get.md)	 - Get Nirmata Control Hub resources
* [nctl info](nctl_info.md)	 - Account and User Information
* [nctl login](nctl_login.md)	 - Provide authentication details to login
* [nctl mappings](nctl_mappings.md)	 - Work with compliance policy mappings
* [nctl raw](nctl_raw.md)	 - Direct access to the Nirmata REST API
* [nctl remediate](nctl_remediate.md)	 - Remediate a resource file or directory for policy violations
* [nctl remove](nctl_remove.md)	 - Remove Nirmata Control Hub resources
* [nctl scan](nctl_scan.md)	 - Scan resources
* [nctl signup](nctl_signup.md)	 - Create a new Nirmata Control Hub account
* [nctl transform](nctl_transform.md)	 - Transform resource manifests to json
* [nctl update](nctl_update.md)	 - Update Nirmata Control Hub resources
* [nctl version](nctl_version.md)	 - Show version and build information



---

## nctl add

## nctl add

Add resources to Nirmata Control Hub  

### Options

```text
  -h, --help   help for add
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl add cluster](nctl_add_cluster.md)	 - Add cluster



---

## nctl add cluster

## nctl add cluster

Add cluster

```bash
nctl add cluster [flags]
```

### Examples

```bash

  # Add a cluster with a specified name and onboarding token
  nctl add cluster --cluster-name my-cluster --onboarding-token abc123xyz

  # Add a cluster using a values file for onboarding parameters
  nctl add cluster -f /path/to/values.yaml

  # Specify a custom Helm repository and release name
  nctl add cluster --helm-repo https://custom.repo.com/helm-charts -r custom-release

  # Use a private Helm repository with authentication
  nctl add cluster --helm-repo https://private.repo.com/helm-charts -t my-private-repo-token

  # Register a cluster without installing the operator
  nctl add cluster --cluster-name my-cluster --register-only

  # Deploy Kyverno with a specific version in a custom namespace
  nctl add cluster --kyverno-version 1.12 -n custom-namespace

  # Use a custom Kubeconfig file and context for the cluster
  nctl add cluster --kubeconfig /path/to/kubeconfig --kube-context my-context

  # Specify a private container registry
  nctl add cluster --registry-name my-private-registry --registry-username myuser --registry-password mypassword

  # Allow connections to an address with a self-signed or unverified certificate (not recommended)
  nctl add cluster --insecure

```bash

### Options

```text
      --cluster-name string        name of the cluster to onboard is required (not needed if onboarding token is provided)
  -t, --git-token string           token for the operator helm chart in private helm repo
      --helm-repo string           operator helm repository name (default "https://nirmata.github.io/kyverno-charts")
  -h, --help                       help for cluster
      --insecure                   allow connection to a Nirmata server with a insecure certificate (not recommended)
      --kube-context string        the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string          kubeconfig path (defaults to $HOME/.kube/kubeconfig)
      --kyverno-version string     Kyverno version 1.11 (default "1.11")
  -n, --namespace string           operator namespace (default "nirmata-system")
      --npm-only                   npm only mode for the operator
      --onboarding-token string    the cluster onboarding token
      --register-only              only register cluster, don't install operator
      --registry-name string       name of the private registry (no need if images are not pushed to private registry)
      --registry-password string   password of the private registry (no need if images are not pushed to private registry)
      --registry-username string   user name of the private registry (no need if images are not pushed to private registry)
  -r, --release string             operator helm chart release name (default "kyverno-operator")
      --token string               the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                 the Nirmata server base URL (env NIRMATA_URL)
  -f, --values-file string         the cluster onboarding parameter YAML file
      --yes                        bypass manual validation
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl add](nctl_add.md)	 - Add resources to Nirmata Control Hub  



---

## nctl ai

## nctl ai

Agentic AI powered workflows

```bash
nctl ai [flags]
```

### Examples

```bash

  # 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

```bash

### Options

```text
      --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) (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 (Model Context Protocol) server on when using http transport (default 8080)
      --mcp-server-transport string   transport to use for the MCP (Model Context Protocol) server (stdio or http) (default "stdio")
      --new-session                   create a new session
      --plan                          force plan mode for all tasks (even simple ones)
      --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
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl compliance

## nctl compliance

Compliance management commands

```bash
nctl compliance [flags]
```

### Options

```text
  -h, --help   help for compliance
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl compliance audit](nctl_compliance_audit.md)	 - Collect compliance evidence from a Kubernetes cluster
* [nctl compliance checklist](nctl_compliance_checklist.md)	 - Show compliance checklist with pass/fail status for a standard



---

## nctl compliance audit

## nctl compliance audit

Collect compliance evidence from a Kubernetes cluster

```bash
nctl compliance audit [flags]
```

### Examples

```bash
  # Collect SOC2 evidence package
  nctl compliance audit --standard soc2

  # Collect NIST 800-53 evidence for specific namespaces
  nctl compliance audit --standard nist-800-53 --namespace production,staging

  # Write evidence to a custom directory
  nctl compliance audit --standard soc2 --output-dir /tmp/evidence
```bash

### Options

```text
  -h, --help                   help for audit
      --kube-context string    the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string      kubeconfig path (defaults to $HOME/.kube/kubeconfig)
      --mappings-file string   Override path to mappings YAML file
  -o, --output string          Output format for the collection summary (text, json, yaml) (default "text")
      --output-dir string      Directory for evidence output (default: ~/.nirmata/nctl/compliance/evidence/)
      --standard string        Compliance standard (soc2, nist-800-53, nsa-cisa, iso27001, pci-dss, etc.)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl compliance](nctl_compliance.md)	 - Compliance management commands



---

## nctl compliance checklist

## nctl compliance checklist

Show compliance checklist with pass/fail status for a standard

```bash
nctl compliance checklist [flags]
```

### Examples

```bash
  # Show SOC2 compliance checklist
  nctl compliance checklist --standard soc2

  # Show NIST 800-53 checklist in JSON format
  nctl compliance checklist --standard nist-800-53 -o json

  # Show checklist with custom mappings
  nctl compliance checklist --standard soc2 --mappings-file /path/to/mappings.yaml
```

### Options

```text
  -h, --help                   help for checklist
      --mappings-file string   Override path to mappings YAML file
  -o, --output string          Output format (text, json, yaml, openreport) (default "text")
      --standard string        Compliance standard (soc2, nist-800-53, nsa-cisa, iso27001, pci-dss, etc.)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl compliance](nctl_compliance.md)	 - Compliance management commands



---

## nctl create

## nctl create

Create policyexceptionrequests

### Options

```text
  -h, --help   help for create
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl create pull-request](nctl_create_pull-request.md)	 - Create policyexceptionrequests made in Nirmata Control Hub



---

## nctl create pull-request

## nctl create pull-request

Create policyexceptionrequests made in Nirmata Control Hub

```bash
nctl create pull-request [flags]
```

### Examples

```bash

  # Basic pull-request command  
  nctl create pull-request  

  # Specify PER name  
  nctl create pull-request --per-name your-per-name  

  # Specify VCS provider  
  nctl create pull-request --provider github  

  # Specify both PER name and VCS provider  
  nctl create pull-request --per-name your-per-name --provider github  

```

### Options

```text
  -h, --help              help for pull-request
      --insecure          allow connection to a Nirmata server with a insecure certificate (not recommended)
      --per-name string   Name of PER to be considered
  -p, --provider string   Name of VCS provider to create PER (default "github")
      --token string      the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string        the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl create](nctl_create.md)	 - Create policyexceptionrequests



---

## nctl edit

## nctl edit

Edit nctl resources

### Options

```text
  -h, --help   help for edit
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl edit config](nctl_edit_config.md)	 - Edit nctl configuration file



---

## nctl edit config

## nctl edit config

Edit nctl configuration file

### Synopsis

Edit nctl configuration file by opening editor or entering values of repository to add

```bash
nctl edit config [flags]
```

### Examples

```bash

  # Add a repository with a name, type, and authentication details  
  nctl edit config --name my-repo --type helm --username example-user --gitToken example-token --file=false  

  # Add a repository with a specific chart repository URL and branch  
  nctl edit config --name nirmata/kyverno-charts --chartRepo https://nirmata.github.io/kyverno-charts --branch main --file=false  

  # Add a Helm chart with a name, version, and authentication token  
  nctl edit config --chartName my-chart --version 1.2.3 --gitToken example-token --file=false  

  # Add a repository with a branch and authentication token  
  nctl edit config --name my-repo --branch dev --gitToken example-token --file=false  

  # Add multiple repository details including username, type, and branch  
  nctl edit config --name my-repo --type helm --username example-user --branch main --gitToken example-token --file=false  

  # Add a repository from a specific branch, chart repository, and authentication  
  nctl edit config --name my-repo --branch dev --chartRepo https://charts.example.com --username example-user --gitToken example-token --file=false  

```

### Options

```text
      --branch string      Branch of the repository to add
      --chartName string   Name of the chart to add
      --chartRepo string   URL of the chart repository to add
      --file               enable to open config file in editor to edit config file (default true)
      --gitToken string    Git token for authentication to add
  -h, --help               help for config
      --name string        Name of the repository to add
      --type string        Type of the repository to add
      --username string    Username for authentication to add
      --version string     Version of the chart to add
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl edit](nctl_edit.md)	 - Edit nctl resources



---

## nctl exceptions

## nctl exceptions

Manage Kyverno PolicyExceptions

```bash
nctl exceptions [flags]
```

### Options

```text
  -h, --help   help for exceptions
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl exceptions audit](nctl_exceptions_audit.md)	 - Audit Kyverno PolicyException resources



---

## nctl exceptions audit

## nctl exceptions audit

Audit Kyverno PolicyException resources

```bash
nctl exceptions audit [flags]
```

### Examples

```bash
  # Audit all policy exceptions
  nctl exceptions audit

  # Show only exceptions older than 90 days
  nctl exceptions audit --older-than 90

  # Show only expired exceptions
  nctl exceptions audit --expired

  # Filter by namespace
  nctl exceptions audit --namespace default

  # Output as JSON
  nctl exceptions audit -o json
```

### Options

```text
      --expired               Only show exceptions past their expiry date
  -h, --help                  help for audit
      --kube-context string   the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string     kubeconfig path (defaults to $HOME/.kube/kubeconfig)
      --namespace string      Filter by namespace (default: all namespaces)
      --older-than int        Only show exceptions older than N days
  -o, --output string         Output format (text, json, yaml, openreport) (default "text")
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl exceptions](nctl_exceptions.md)	 - Manage Kyverno PolicyExceptions



---

## nctl get

## nctl get

Get Nirmata Control Hub resources

### Options

```text
  -h, --help   help for get
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl get clusters](nctl_get_clusters.md)	 - Get cluster information
* [nctl get operator](nctl_get_operator.md)	 - Get Nirmata Kyverno Operator info
* [nctl get policy-sets](nctl_get_policy-sets.md)	 - Get policy-sets
* [nctl get policyexceptionrequests](nctl_get_policyexceptionrequests.md)	 - Get PolicyExceptionRequest resources



---

## nctl get clusters

## nctl get clusters

Get cluster information

```bash
nctl get clusters [flags]
```text

### Examples

```text

  # List all clusters that are onboarded to Nirmata Control Hub  
  nctl get clusters  

  # Get detailed information about a specific cluster  
  nctl get clusters <cluster-name>  

  # Show additional details about all clusters  
  nctl get clusters --wide  

  # Allow connections to an address with a self-signed or unverified certificate (not recommended)  
  nctl get clusters --insecure

```

### Options

```text
  -h, --help           help for clusters
      --insecure       allow connection to a Nirmata server with a insecure certificate (not recommended)
      --token string   the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string     the Nirmata server base URL (env NIRMATA_URL)
      --wide           to show extra cluster details
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl get](nctl_get.md)	 - Get Nirmata Control Hub resources



---

## nctl get operator

## nctl get operator

Get Nirmata Kyverno Operator info

### Options

```text
  -h, --help   help for operator
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl get](nctl_get.md)	 - Get Nirmata Control Hub resources
* [nctl get operator helm-values](nctl_get_operator_helm-values.md)	 - Get Nirmata Kyverno Operator Helm Values for further customization



---

## nctl get operator helm-values

## nctl get operator helm-values

Get Nirmata Kyverno Operator Helm Values for further customization

```bash
nctl get operator helm-values [flags]
```

### Options

```text
  -h, --help                  help for helm-values
      --kube-context string   the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string     kubeconfig path (defaults to $HOME/.kube/kubeconfig)
  -n, --namespace string      namespace in which the operator is deployed (default "nirmata-system")
      --no-cluster            prevent all calls to cluster
  -o, --outputfile string     output file to store Helm values
  -r, --release string        release name for the helm chart (default "kyverno-operator")
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl get operator](nctl_get_operator.md)	 - Get Nirmata Kyverno Operator info



---

## nctl get policy-sets

## nctl get policy-sets

Get policy-sets

```bash
nctl get policy-sets [flags]
```

### Examples

```bash

  # Get list of Policy Sets available.
  nctl get policy-sets

```

### Options

```text
  -h, --help   help for policy-sets
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl get](nctl_get.md)	 - Get Nirmata Control Hub resources



---

## nctl get policyexceptionrequests

## nctl get policyexceptionrequests

Get PolicyExceptionRequest resources

```bash
nctl get policyexceptionrequests [flags]
```

### Examples

```bash

  # Get all policy exception requests
  nctl get policyexceptionrequests

  # Get policy exception requests with a specific name
  nctl get policyexceptionrequests --name example-policy

  # Get policy exception requests by requester
  nctl get policyexceptionrequests --requested-by npm-automation-devops

  # Get policy exception requests filtered by state (approved, rejected, pendingApproval)
  nctl get policyexceptionrequests --state approved

  # Get policy exception requests from an insecure server (not recommended)
  nctl get policyexceptionrequests --insecure

```

### Options

```text
  -h, --help                  help for policyexceptionrequests
      --insecure              allow connection to a Nirmata server with a insecure certificate (not recommended)
      --name string           Name of policy exception to filter by
      --requested-by string   State of policy exception to filter by Requester
      --state string          State of policy exception to filter by (approved, rejected, pendingApproval)
      --token string          the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string            the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl get](nctl_get.md)	 - Get Nirmata Control Hub resources



---

## nctl info

## nctl info

Account and User Information

```bash
nctl info [flags]
```

### Options

```text
  -h, --help            help for info
      --insecure        allow connection to a Nirmata server with a insecure certificate (not recommended)
      --token string    the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string      the Nirmata server base URL (env NIRMATA_URL)
      --userid string   user id (email)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl login

## nctl login

Provide authentication details to login

```bash
nctl login [flags]
```

### Options

```text
  -f, --file string     the configuration file (defaults to $HOME/.nirmata/config)
  -h, --help            help for login
      --insecure        allow connection to a Nirmata server with a insecure certificate (not recommended)
      --token string    the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string      the Nirmata server base URL (env NIRMATA_URL)
      --userid string   user id (email)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl login git](nctl_login_git.md)	 - Sign in to your git provider
* [nctl login nch](nctl_login_nch.md)	 - Sign in to Nirmata Control Hub



---

## nctl login git

## nctl login git

Sign in to your git provider

```bash
nctl login git [flags]
```

### Examples

```bash

  # Login to Git provider (GitHub, GitLab, Bitbucket) using a token
  nctl login git --provider github --username myuser --token ghp_xxx

  # Login to GitLab with a custom domain and authentication token
  nctl login git --provider gitlab --domain gitlab.example.com --username myuser --token glpat_xxx

  # Login to Bitbucket using a username and token
  nctl login git --provider bitbucket --username myuser --token bitbucket_xxx

  # Login to a self-hosted GitLab instance with a domain
  nctl login git --provider gitlab --domain gitlab.mycompany.com

  # Login interactively to Git (prompt for username and token)
  nctl login git --provider github

```

### Options

```text
      --domain string     custom domain for the VCS
  -h, --help              help for git
      --provider string   git provider (defaults to github) (default "github")
      --token string      git authentication token
      --username string   user id (email)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl login](nctl_login.md)	 - Provide authentication details to login



---

## nctl login nch

## nctl login nch

Sign in to Nirmata Control Hub

```bash
nctl login nch [flags]
```

### Examples

```bash

  # Login to Nirmata Control Hub using an email and API key
  nctl login nch --userid user@example.com --token my-api-key

  # Login to Nirmata using a specific server URL
  nctl login nch --userid user@example.com --token my-api-key --url https://nirmata.example.com

  # Login using a configuration file
  nctl login nch --file /path/to/config.yaml

  # Login interactively (prompt for email and API key)
  nctl login nch

```

### Options

```text
  -f, --file string     the configuration file (defaults to $HOME/.nirmata/config)
  -h, --help            help for nch
      --insecure        allow connection to a Nirmata server with a insecure certificate (not recommended)
      --token string    the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string      the Nirmata server base URL (env NIRMATA_URL)
      --userid string   user id (email)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl login](nctl_login.md)	 - Provide authentication details to login



---

## nctl mappings

## nctl mappings

Work with compliance policy mappings

```bash
nctl mappings [flags]
```

### Options

```text
  -h, --help   help for mappings
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl mappings get](nctl_mappings_get.md)	 - Get control mappings for a compliance standard or policy
* [nctl mappings list](nctl_mappings_list.md)	 - List available compliance standards
* [nctl mappings path](nctl_mappings_path.md)	 - Print the path to the mappings file, or the policy directory path within kyverno-policies



---

## nctl mappings get

## nctl mappings get

Get control mappings for a compliance standard or policy

```bash
nctl mappings get [standard] [flags]
```text

### Examples

```text
  # Get all policy→control mappings for SOC2
  nctl mappings get soc2

  # Look up which standards and controls a specific policy covers
  nctl mappings get --policy restrict-cluster-admin-binding

  # JSON output
  nctl mappings get soc2 -o json
  nctl mappings get --policy restrict-cluster-admin-binding -o json
```

### Options

```text
  -h, --help                   help for get
      --mappings-file string   Override path to mappings YAML file
  -o, --output string          Output format (text, json, yaml) (default "text")
      --policy string          Look up a specific policy by name across all standards
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl mappings](nctl_mappings.md)	 - Work with compliance policy mappings



---

## nctl mappings list

## nctl mappings list

List available compliance standards

```bash
nctl mappings list [flags]
```

### Examples

```bash
  # List all available compliance standards
  nctl mappings list

  # Filter to a single standard
  nctl mappings list --standard soc2

  # List in JSON format
  nctl mappings list -o json
```

### Options

```text
  -h, --help                   help for list
      --mappings-file string   Override path to mappings YAML file
  -o, --output string          Output format (text, json, yaml) (default "text")
      --standard string        Filter to a single compliance standard
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl mappings](nctl_mappings.md)	 - Work with compliance policy mappings



---

## nctl mappings path

## nctl mappings path

Print the path to the mappings file, or the policy directory path within kyverno-policies

```bash
nctl mappings path [flags]
```

### Examples

```bash
  # Print the path to the embedded (cached) mappings file
  nctl mappings path

  # Show the directory path for a specific policy within kyverno-policies
  nctl mappings path --policy restrict-cluster-admin-binding
```

### Options

```text
  -h, --help                   help for path
      --mappings-file string   Path to a custom mappings YAML file
      --policy string          Show the directory path for a specific policy within kyverno-policies
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl mappings](nctl_mappings.md)	 - Work with compliance policy mappings



---

## nctl raw

## nctl raw

Direct access to the Nirmata REST API

### Synopsis

The raw command allows querying Nirmata REST API endpoints.

```bash
nctl raw <path> [flags]
```

### Examples

```bash

  # Basic GET request  
  nctl raw /path --url https://example.com  

  # GET request with authentication  
  nctl raw /path --url https://example.com --token your-api-token  

  # GET request allowing insecure connection  
  nctl raw /path --url https://example.com --insecure  

  # GET request with json data in a file  
  nctl raw /path --url https://example.com --file data.json  

```

### Options

```text
  -d, --data string     JSON data string
  -f, --file string     JSON data file
  -h, --help            help for raw
      --insecure        allow connection to an address with a self-signed or non-verifiable certificate (not recommended)
  -m, --method string   the HTTP method (default "GET")
      --token string    Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string      Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl remediate

## nctl remediate

Remediate a resource file or directory for policy violations

```bash
nctl remediate <resource file or directory> [flags]
```

### Options

```text
      --cluster-policies              Use policies from a cluster (default false)
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
  -h, --help                          help for remediate
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
      --patch                         Update the source file with the remediated resource (default true)
  -p, --policies strings              Path to policy files
      --policy-sets strings           Policy set names (comma separated e.g., "pss-baseline, pss-restricted, rbac-best-practices")
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl remove

## nctl remove

Remove Nirmata Control Hub resources

### Options

```text
  -h, --help   help for remove
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl remove cluster](nctl_remove_cluster.md)	 - Remove cluster



---

## nctl remove cluster

## nctl remove cluster

Remove cluster

```bash
nctl remove cluster [flags]
```

### Examples

```bash

  # Remove a cluster using its name
  nctl remove cluster --cluster-name my-cluster

  # Remove a cluster using its unique cluster ID (Overrides name if provided)
  nctl remove cluster --cluster-id my-cluster-id

  # Deregister a cluster from Nirmata Control Hub without uninstalling components
  nctl remove cluster --cluster-name my-cluster --deregister-only

  # Remove only the operator from the cluster without removing other components
  nctl remove cluster --cluster-name my-cluster --remove-operator-only

  # Forcefully remove a cluster, ignoring the kube-system namespace UID check
  nctl remove cluster --cluster-name my-cluster --force

  # Remove a cluster by specifying a custom kubeconfig file and context
  nctl remove cluster --cluster-name my-cluster --kubeconfig /path/to/kubeconfig --kube-context my-context

  # Remove a cluster while allowing connection to an address with a self-signed or unverified certificate (not recommended)
  nctl remove cluster --cluster-name my-cluster --insecure

  # Remove a cluster using Nirmata credentials
  nctl remove cluster --cluster-name my-cluster --token my-nirmata-token --url https://nirmata.example.com

```bash

### Options

```text
      --cluster-id string      the Nirmata Control Hub cluster Id of cluster to be removed (Overrides name. Needed if cluster name is not unique)
      --cluster-name string    the Nirmata Control Hub cluster name of cluster to be removed
      --crd-release string     release name for the operator CRD helm chart (default "kyverno-operator-crd")
      --deregister-only        only deresgisters cluster from nch
      --force                  force remove cluster ignoring empty kube-system namespace uid check
  -h, --help                   help for cluster
      --insecure               allow connection to a Nirmata server with a insecure certificate (not recommended)
      --kube-context string    the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string      kubeconfig path (defaults to $HOME/.kube/kubeconfig)
  -n, --namespace string       namespace in which the operator is deployed (default "nirmata-system")
      --release string         release name for the operator helm chart (default "kyverno-operator")
      --remove-operator-only   remove only operator from cluster, removes all components by default
      --timeout duration       time to wait until the operation terminates (default 10m0s)
      --token string           the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string             the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl remove](nctl_remove.md)	 - Remove Nirmata Control Hub resources



---

## nctl scan

## nctl scan

Scan resources

### Examples

```bash

  # Scan a Kubernetes cluster and analyze and publish the scan results
  nctl scan kubernetes --cluster --analyze --publish

  # Scan Kubernetes manifests, Dockerfiles, and Terraform code in a repository
  nctl scan repository https://github.com/nirmata/demo-resources

  # Scan the current directory
  nctl scan repository 

```

### Options

```text
  -h, --help   help for scan
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl scan compliance](nctl_scan_compliance.md)	 - Run a compliance scan against a Kubernetes cluster
* [nctl scan dockerfile](nctl_scan_dockerfile.md)	 - scan dockerfile resources
* [nctl scan github-actions](nctl_scan_github-actions.md)	 - Scan GitHub Actions workflow files for security vulnerabilities
* [nctl scan helm](nctl_scan_helm.md)	 - scan helm-charts
* [nctl scan json](nctl_scan_json.md)	 - scan json resources
* [nctl scan kubernetes](nctl_scan_kubernetes.md)	 - scan kubernetes resources
* [nctl scan prompt](nctl_scan_prompt.md)	 - [Experimental] scan LLM prompts
* [nctl scan repository](nctl_scan_repository.md)	 - scan files in a git repository
* [nctl scan skills](nctl_scan_skills.md)	 - [Experimental] scan agent skills
* [nctl scan terraform](nctl_scan_terraform.md)	 - scan terraform resources



---

## nctl scan compliance

## nctl scan compliance

Run a compliance scan against a Kubernetes cluster

```bash
nctl scan compliance [flags]
```

### Examples

```bash
  # Run a SOC2 compliance scan (fetches policies from github.com/nirmata/kyverno-policies by default)
  nctl scan compliance --standard soc2

  # Scan specific namespaces
  nctl scan compliance --standard nist-800-53 --namespace production,staging

  # Output results as JSON
  nctl scan compliance --standard soc2 -o json

  # Use a local kyverno-policies checkout instead of fetching from GitHub
  # (set once in ~/.nirmata/nctl/nctl_config.yaml: compliance.policies-root: /path/to/kyverno-policies)

  # Override with specific policy paths or GitHub URLs
  nctl scan compliance --standard soc2 \
    -p github.com/nirmata/kyverno-policies/best-practices-k8s \
    -p github.com/nirmata/kyverno-policies/compliance/cis/common
```

### Options

```text
  -h, --help                    help for compliance
      --kube-context string     the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string       kubeconfig path (defaults to $HOME/.kube/kubeconfig)
      --mappings-file string    Override path to mappings YAML file
      --namespace stringArray   Namespaces to scan (comma-separated or repeated flag)
  -o, --output string           Output format (text, json, yaml, openreport) (default "text")
  -p, --policies strings        Policy paths to scan (local path or github URL; comma-separated or repeated). Overrides the default mappings-derived policy set.
      --standard string         Compliance standard (soc2, nist-800-53, nsa-cisa, iso27001, pci-dss, etc.)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources
* [nctl scan compliance diff](nctl_scan_compliance_diff.md)	 - Diff two compliance snapshots



---

## nctl scan compliance diff

## nctl scan compliance diff

Diff two compliance snapshots

```bash
nctl scan compliance diff [flags]
```

### Examples

```bash
  # Diff latest vs previous scan
  nctl scan compliance diff --standard soc2

  # Diff latest vs 30 days ago
  nctl scan compliance diff --standard soc2 --days 30

  # Diff two specific snapshots
  nctl scan compliance diff --standard soc2 --from 20240101-100000 --to 20240115-100000

  # Output as JSON
  nctl scan compliance diff --standard soc2 -o json
```

### Options

```text
      --days int          Compare latest snapshot vs N days ago
      --from string       Snapshot ID to compare from (older)
  -h, --help              help for diff
  -o, --output string     Output format (text, json, yaml) (default "text")
      --standard string   Compliance standard to diff
      --to string         Snapshot ID to compare to (newer, defaults to latest)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan compliance](nctl_scan_compliance.md)	 - Run a compliance scan against a Kubernetes cluster



---

## nctl scan dockerfile

## nctl scan dockerfile

scan dockerfile resources

```bash
nctl scan dockerfile [flags]
```

### Examples

```bash

  # Scan a Dockerfile with a specific policy file and resource directory  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/  

  # Scan a Dockerfile with a policies from a GitHub repository  
  nctl scan dockerfile --policies https://github.com/nirmata/kyverno-policies/tree/main/dockerfile-best-practices -r /path/to/sample-resources/  

  # Scan and output a JSON report  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --scan-report /path/to/scan-report.json  

  # Scan and add a custom report source ID  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --report-sourceid sample-source-id  

  # Scan with violations in audit mode reported as warnings instead of failures  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --audit-as-warn  

  # Scan and display remediation suggestions  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --remediate display  

  # Scan and overwrite files with remediation  
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --remediate overwrite 

  # Scan a Dockerfile and output results to console in JSON format
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ -o json --file=user-defined-name.json

```bash

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for dockerfile
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --scan-report string            Output scan report file (in JSON format)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan github-actions

## nctl scan github-actions

Scan GitHub Actions workflow files for security vulnerabilities

```bash
nctl scan github-actions [path] [flags]
```text

### Examples

```text

  # Scan the current directory for GitHub Actions workflows
  nctl scan github-actions

  # Scan a specific local repository path
  nctl scan github-actions /path/to/repo

  # Scan with additional custom policies on top of the built-in set
  nctl scan github-actions --policies ./my-policies --severity high

  # Output SARIF for GitHub Code Scanning integration
  nctl scan github-actions --output sarif > results.sarif

  # Publish results to Nirmata Control Hub
  nctl scan github-actions --publish

  # Scan and save a JSON report
  nctl scan github-actions --scan-report ./report.json

```

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for github-actions
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (optional; bundled defaults used when omitted)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
      --scan-report string            Output scan report file (in JSON format)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan helm

## nctl scan helm

scan helm-charts

```bash
nctl scan helm [flags]
```text

### Examples

```text

  # Scan a Helm chart from a local path
  nctl scan helm -r /path/to/helm-chart

  # Scan a Helm chart with a specific policy set
  nctl scan helm -r /path/to/helm-chart --policy-sets pss-baseline,pss-restricted

  # Scan a Helm chart with local and remote policy files
  nctl scan helm -r /path/to/helm-chart -p /path/to/policy.yaml,https://github.com/example/policy.yaml

  # Scan a Helm chart and output results to console
  nctl scan helm -r /path/to/helm-chart -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan helm -r /path/to/helm-chart -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan helm -r /path/to/helm-chart -o json --file=user-defined-name.json

  # Enable detailed result view for violating resources
  nctl scan helm -r /path/to/helm-chart --details

  # Disable color in the scan report output
  nctl scan helm -r /path/to/helm-chart --no-color

```text

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for helm
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --policy-sets strings           Comma-separated policy set names (pss-baseline, pss-restricted, rbac-best-practices)
      --policy-view                   Use with --details to reverse the view from resource->policy to policy->resource
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
      --values string                 File containing values for policy variables
      --values-file strings           Path to values files
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan json

## nctl scan json

scan json resources

```bash
nctl scan json [flags]
```

### Examples

```bash

  # Basic scan with required resource and policy file
  nctl scan json -r path/to/file -p path/to/policy

  # Scan with audit mode enabled (violations reported as warnings)
  nctl scan json -r path/to/file -p path/to/policy --audit-as-warn

  # Scan with detailed results for violating resources
  nctl scan json -r path/to/file -p path/to/policy --details

  # Generate a scan report in JSON format
  nctl scan json -r path/to/file -p path/to/policy -o json --scan-report scan-report.json

   # Scan a JSON file and output results to console
  nctl scan json -r /path/to/file.json  -p /path/to/policy -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan json -r /path/to/file.json -p /path/to/policy -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan json -r /path/to/file.json -p /path/to/policy -o json --file=user-defined-name.json

  # Disable colored output in the terminal
  nctl scan json -r path/to/file -p path/to/policy --no-color

```bash

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for json
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --scan-report string            Output scan report file (in JSON format)
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan kubernetes

## nctl scan kubernetes

scan kubernetes resources

```bash
nctl scan kubernetes [flags]
```text

### Examples

```text

  # Scan a Kubernetes cluster and analyze the scan results
  nctl scan kubernetes --cluster --analyze

  # Scan a Kubernetes cluster and publish scan results
  nctl scan kubernetes --cluster --publish

  # Scan Kubernetes resources from a local file with a specific policy
  nctl scan kubernetes --resources ./resource.yaml --policies ./policy.yaml

  # Scan resources in a specific namespace using a policy set
  nctl scan kubernetes --namespace default --policy-sets pss-baseline

  # Scan a Kubernetes cluster using cluster policies and exceptions
  nctl scan kubernetes --cluster --cluster-policies --cluster-exceptions

  # Scan Kubernetes resources and output results to console in JSON format
  nctl scan kubernetes --cluster -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan kubernetes --cluster -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan kubernetes --cluster -o json --file=user-defined-name.json

  # Scan with a specific kubeconfig and context
  nctl scan kubernetes --kubeconfig /path/to/kubeconfig --kube-context my-context

  # Output the scan results in JSON format with detailed violations
  nctl scan kubernetes --resources ./resource.yaml --policies ./policy.yaml --details -o json

  # Scan resources while allowing insecure connections (not recommended)
  nctl scan kubernetes --resources ./resource.yaml --insecure

  # Scan and show remediation suggestions for violating resources
  nctl scan kubernetes --resources ./resource.yaml --remediate

```text

### Options

```text
      --analyze                       Analyze cluster using AI
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --cluster                       Scan resources in a cluster using cluster policies and exceptions (default value false)
      --cluster-exceptions            Use exceptions from a cluster (default value false)
      --cluster-name string           Override name of cluster while publishing report to Nirmata Control Hub
      --cluster-policies              Use policies from a cluster (default value false)
      --cluster-resources             Use resources from a cluster (default value false)
      --continue-on-fail              If set to true, will continue to apply policies on the next resource upon failure to apply to the current resource instead of exiting out
      --details                       Show result details for violating resources (default true)
  -e, --exceptions strings            Policy exceptions to be considered when evaluating policies against resources
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for kubernetes
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --kube-context string           the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string             kubeconfig path (defaults to $HOME/.kube/kubeconfig)
  -l, --label strings                 Label the cluster and Label selector in the format key=value for policy sets in Nirmata Control Hub
  -n, --namespace strings             Namespace of the resources to scan
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --policy-sets strings           Comma-separated policy set names (pss-baseline, pss-restricted, rbac-best-practices)
      --policy-view                   Use with --details to reverse the view from resource->policy to policy->resource
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan (is required for local scans; is the cluster id for cluster scan)
  -r, --resources strings             Path to resource files (local path, github URL)
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
      --values-file string            File containing values for policy variables
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan prompt

## nctl scan prompt

[Experimental] scan LLM prompts

```bash
nctl scan prompt [flags]
```

### Examples

```bash

  # Scan prompts in a config file
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policy.yaml

  # Scan a directory of prompt files
  nctl scan prompt -r path/to/prompts/ -p policies/prompts-baseline.yaml

  # Scan a prompt string directly
  nctl scan prompt --string "You are a helpful assistant..." -p path/to/policy.yaml

  # Read prompt from stdin
  echo "You are a helpful assistant..." | nctl scan prompt --stdin -p path/to/policy.yaml

  # Scan with minimum confidence threshold for file extraction
  nctl scan prompt -r path/to/config/ -p path/to/policy.yaml --min-confidence 0.6

  # Scan with audit mode enabled (violations reported as warnings)
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policy.yaml --audit-as-warn

  # Output results in JSON format
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policy.yaml -o json

  # Filter policies by severity
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policies/ --selector "severity=critical"

  # Enable AI-assisted classification (uses Nirmata by default)
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policy.yaml --ai-check

  # AI classification with a specific provider
  nctl scan prompt -r path/to/prompts.yaml -p path/to/policy.yaml --ai-check --ai-provider gemini --ai-model gemini-2.5-pro

```

### Options

```text
      --ai-check                      Enable AI-assisted prompt classification (requires Nirmata authentication)
      --ai-model string               AI model for --ai-check (defaults to provider's default model)
      --ai-provider string            AI provider for --ai-check (nirmata, gemini, anthropic, bedrock, azopenai) (default "nirmata")
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for prompt
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --min-confidence float          Minimum confidence threshold for file-based prompt extraction (0.0-1.0) (default 0.5)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (optional; bundled defaults used when omitted)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files/directories (YAML, JSON, TOML, txt, md)
      --risk-threshold int            Fail if aggregate risk score meets or exceeds this value (0 = disabled)
      --scan-report string            Output scan report file (in JSON format)
      --selector stringArray          Filter policies by annotation (key=value). Key is shorthand for policies.kyverno.io/{key}. Multiple selectors with the same key are OR'd; different keys are AND'd. Example: --selector severity=critical --selector severity=high
      --stdin                         Read prompt text from stdin
      --string string                 Provide prompt text directly as a string
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan repository

## nctl scan repository

scan files in a git repository

```bash
nctl scan repository [flags]
```

### Examples

```bash

  # Scan the Nirmata demo-resources repository
  nctl scan repository https://github.com/nirmata/demo-resources

  # Scan the repository with a specific policy set
  nctl scan repository https://github.com/nirmata/demo-resources --policy-sets pss-baseline,pss-restricted

  # Scan the repository using specific policies from local and remote sources
  nctl scan repository https://github.com/nirmata/demo-resources 

    # Scan a repository and output results to console in JSON format
  nctl scan repository https://github.com/nirmata/demo-resources -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan repository https://github.com/nirmata/demo-resources -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan repository https://github.com/nirmata/demo-resources -o json --file=user-defined-name.json

  # Scan a specific branch of the repository
  nctl scan repository https://github.com/nirmata/demo-resources --branch main

  # Enable audit mode to report violations as warnings instead of failures
  nctl scan repository https://github.com/nirmata/demo-resources --audit-as-warn

  # Display remediation suggestions for policy violations
  nctl scan repository https://github.com/nirmata/demo-resources --remediate display

  # Overwrite resource files with remediations
  nctl scan repository https://github.com/nirmata/demo-resources --remediate overwrite

  # Exclude a specific directory (use the full path as it appears in the repository), 
  # Avoid using single directory name like 'policies' for potential name collision on multi directory level.
  nctl scan repository https://github.com/nirmata/demo-resources --exclude='nirmata/demo-resources/policies'

  # Exclude a specific file by its exact name
  nctl scan repository https://github.com/nirmata/demo-resources --exclude='disallow-secrets-from-env-vars.yaml'

  # Exclude all YAML files (case-insensitive) using a regex pattern
  nctl scan repository https://github.com/nirmata/demo-resources --exclude-regex='(?i)\.ya?ml$'

```bash

### Options

```text
      --analyze                       Analyze cluster using AI
      --analyzers strings             Analyzers to enable (all,dockerfile,github-actions,json,kubernetes,terraform-plan,helm-charts,skills) (default [all])
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --branch string                 name of the branch
      --details                       Show result details for violating resources (default true)
      --exclude strings               List of filenames to exclude during the scan, separated by commas.
      --exclude-regex string          Regex pattern for excluding files during the scan.
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git repository URLs)
      --git-username string           Git username (for Git repository URLs)
  -h, --help                          help for repository
      --include strings               List of filenames to include during the scan, separated by commas.
      --include-regex string          Regex pattern for including files during the scan. If not provided, all files are included.
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --labels strings                Report label
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --policy-sets strings           policy set names (pss-baseline, pss-restricted, rbac-best-practices)
      --publish                       Publish reports (default true)
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan skills

## nctl scan skills

[Experimental] scan agent skills

```bash
nctl scan skills [flags]
```

### Examples

```bash

  # Basic scan with required resource and policy file
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml

  # Scan multiple skills
  nctl scan skills -r skills/skillA -r skills/skillB -p policies/skill-baseline.yaml

  # Scan with audit mode enabled (violations reported as warnings)
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml --audit-as-warn

  # Scan with detailed results for violating resources
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml --details

  # Generate a scan report in JSON format
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml -o json --scan-report scan-report.json

  # Output results to console in JSON
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml -o json

  # Save results to a file with default name (scan-report.json)
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml -o json --file

  # Disable colored output
  nctl scan skills -r path/to/skill-dir -p path/to/policy.yaml --no-color

  # Scan with only critical-severity policies
  nctl scan skills -r path/to/skill-dir -p path/to/policies/ --selector "severity=critical"

  # Scan with critical and high severity policies
  nctl scan skills -r path/to/skill-dir -p path/to/policies/ --selector "severity=critical" --selector "severity=high"

```

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --exclude-files stringArray     Glob patterns to exclude from indicator content scanning (e.g. 'docs/*', 'CHANGELOG.md')
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for skills
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (optional; bundled defaults used when omitted)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --risk-threshold int            Fail if aggregate risk score meets or exceeds this value (0 = disabled)
      --scan-report string            Output scan report file (in JSON format)
      --selector stringArray          Filter policies by annotation (key=value). Key is shorthand for policies.kyverno.io/{key}. Multiple selectors with the same key are OR'd; different keys are AND'd. Example: --selector severity=critical --selector severity=high
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl scan terraform

## nctl scan terraform

scan terraform resources

```bash
nctl scan terraform [flags]
```

### Examples

```bash

  # Basic scan with required resource and policy file
  nctl scan terraform -r path/to/file -p path/to/policy

  # Scan with audit mode enabled (violations reported as warnings)
  nctl scan terraform -r path/to/file -p path/to/policy --audit-as-warn

  # Scan with remediation suggestions displayed
  nctl scan terraform -r path/to/file -p path/to/policy --remediate display

  # Overwrite resource files with remediations
  nctl scan terraform -r path/to/file -p path/to/policy --remediate overwrite

  # Generate a scan report in JSON format
  nctl scan terraform -r path/to/file -p path/to/policy -o json --scan-report scan-report.json

  # Save scan results to a file
  nctl scan terraform -r path/to/file -p path/to/policy --file output.txt

  # Disable colored output in the terminal
  nctl scan terraform -r path/to/file -p path/to/policy --no-color

  # Scan a Terraform file and output results to console in JSON format
  nctl scan terraform -r /path/to/terraform-file.tf -p /path/to/policy -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan terraform -r /path/to/terraform-file.tf -p /path/to/policy -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan terraform -r /path/to/terraform-file.tf -p /path/to/policy -o json --file=user-defined-name.json

```bash

### Options

```text
      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
      --git-token string              Git authentication token (for Git URLs in --policies)
      --git-username string           Git username (for Git URLs in --policies)
  -h, --help                          help for terraform
      --insecure                      allow connection to a Nirmata server with a insecure certificate (not recommended)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report, sarif) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --scan-report string            Output scan report file (in JSON format)
      --token string                  the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    the Nirmata server base URL (env NIRMATA_URL)
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl scan](nctl_scan.md)	 - Scan resources



---

## nctl signup

## nctl signup

Create a new Nirmata Control Hub account

### Synopsis

Create a new account on Nirmata Control Hub using your email address.

```bash
nctl signup [flags]
```

### Options

```text
      --email string        Email address for signup (format: name@company.com)
  -h, --help                help for signup
      --nirmataUrl string   Nirmata Url (default: https://nirmata.io) (default "https://nirmata.io/")
      --password string     Password for signup
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl transform

## nctl transform

Transform resource manifests to json

### Synopsis

Transform resource manifests (Dockerfile, Terraform plan, Terraform config, Terraform state, Kubernetes) to json. This helps write kyverno json policies for these resources

```bash
nctl transform [flags]
```

### Options

```text
  -h, --help                 help for transform
  -o, --output-file string   Output file
  -r, --resource strings     Path to resource file
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



---

## nctl update

## nctl update

Update Nirmata Control Hub resources

### Options

```text
  -h, --help   help for update
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata
* [nctl update cluster](nctl_update_cluster.md)	 - Update cluster



---

## nctl update cluster

## nctl update cluster

Update cluster

```bash
nctl update cluster [flags]
```

### Examples

```bash

  # Update a cluster using its name
  nctl update cluster --cluster-name my-cluster

  # Update a cluster using its unique cluster ID (Overrides name if provided)
  nctl update cluster --cluster-id my-cluster-id

  # Update a cluster using a values file with onboarding parameters
  nctl update cluster -f /path/to/values.yaml

  # Specify a private Helm repository and token for updating the operator
  nctl update cluster --helm-repo https://private.repo.com/helm-charts -t my-private-repo-token

  # Update a cluster while allowing connections to an address with a self-signed or unverified certificate (not recommended)
  nctl update cluster --cluster-name my-cluster --insecure

  # Update a cluster with a specific Kyverno version
  nctl update cluster --cluster-name my-cluster --kyverno-version 1.12

  # Specify a custom release name for the Kyverno operator Helm chart
  nctl update cluster --cluster-name my-cluster --release my-kyverno-release

  # Specify a custom namespace for the operator deployment
  nctl update cluster --cluster-name my-cluster --namespace custom-namespace

  # Update a cluster using a specific kubeconfig file and context
  nctl update cluster --cluster-name my-cluster --kubeconfig /path/to/kubeconfig --kube-context my-context

```bash

### Options

```text
  -i, --cluster-id string          the Nirmata Control Hub cluster Id of cluster to be updated (Needed if cluster name is not unique)
      --cluster-name string        the name of cluster to be updated. Needed only if Id is not provided
  -t, --git-token string           token for the operator helm chart in private helm repo
      --helm-repo string           operator helm repository name (default "https://nirmata.github.io/kyverno-charts")
  -h, --help                       help for cluster
      --insecure                   allow connection to a Nirmata server with a insecure certificate (not recommended)
      --kube-context string        the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string          kubeconfig path (defaults to $HOME/.kube/kubeconfig)
      --kyverno-version string     Kyverno version 1.11 (default "1.11")
  -n, --namespace string           operator namespace (default "nirmata-system")
      --registry-name string       name of the private registry (no need if images are not pushed to private registry)
      --registry-password string   password of the private registry (no need if images are not pushed to private registry)
      --registry-username string   user name of the private registry (no need if images are not pushed to private registry)
  -r, --release string             operator helm chart release name (default "kyverno-operator")
      --token string               the Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                 the Nirmata server base URL (env NIRMATA_URL)
  -f, --values-file string         the cluster onboarding parameter YAML file
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl update](nctl_update.md)	 - Update Nirmata Control Hub resources



---

## nctl version

## nctl version

Show version and build information

```bash
nctl version [flags]
```

### Options

```text
  -h, --help   help for version
```text

### Options inherited from parent commands

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

### SEE ALSO

* [nctl](nctl.md)	 - nctl is the command line interface for Nirmata



