---
title: "overlane guard rules list"
description: "List the guardrail rules in force and the versions of the rule files"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# overlane guard rules list

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Lists the platform rules (always in force), then the team and project rule files and their rules. A rule change is an audit event; every file version is listed with its digest and author.

## Usage

```sh
overlane guard rules list
```

## Examples

```sh
overlane guard rules list
overlane guard rules list --json
```

## Behavior

- Effect: `read` (changes nothing).
- Needs credentials: yes. Uses the network: yes.
- Supports `--dry-run`: no. Accepts `--force`: no.
- Machine-readable description: `overlane schema guard rules list`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
      "description": "tenant identifier"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "tenant identifier"
          },
          "layer": {
            "type": "string",
            "enum": [
              "platform",
              "team",
              "project"
            ]
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "project identifier"
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "digest": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$"
          },
          "ruleCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "author": {
            "type": "string",
            "minLength": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "tenantId",
          "layer",
          "version",
          "digest",
          "ruleCount",
          "author",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9._-]{1,63}$"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400
          },
          "effect": {
            "type": "string",
            "enum": [
              "allow",
              "deny",
              "require_approval"
            ]
          },
          "match": {
            "type": "object",
            "properties": {
              "principals": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "roles": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "admin",
                    "member",
                    "viewer",
                    "agent"
                  ]
                }
              },
              "tools": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "paths": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "branches": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "repositories": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "environments": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "hosts": {
                "minItems": 1,
                "maxItems": 64,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "time": {
                "type": "object",
                "properties": {
                  "days": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6
                    }
                  },
                  "fromHour": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 23
                  },
                  "toHour": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 24
                  }
                },
                "additionalProperties": false
              },
              "usage": {
                "type": "object",
                "properties": {
                  "metric": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "atLeast": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "metric",
                  "atLeast"
                ],
                "additionalProperties": false
              },
              "taskHeld": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "dryRun": {
            "default": false,
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "enum": [
              "policy_denied",
              "approval_required",
              "protected_branch",
              "path_protected",
              "spend_cap_reached",
              "plan_limit_reached",
              "egress_blocked",
              "deploy_blocked",
              "secret_detected",
              "task_required"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400
          },
          "nextCommand": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "tenantId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "tenant identifier"
          },
          "layer": {
            "type": "string",
            "enum": [
              "platform",
              "team",
              "project"
            ]
          },
          "projectId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
            "description": "project identifier"
          },
          "fileVersion": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "description",
          "effect",
          "match",
          "dryRun",
          "tenantId",
          "layer",
          "fileVersion"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "tenantId",
    "files",
    "rules"
  ],
  "additionalProperties": false
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/guard-rules-list/index.mdx
