Skip to content

escape json example in CLI docs to fit docs site#712

Merged
laverya merged 1 commit intomainfrom
laverya/escape-json-segment-for-docs
May 4, 2026
Merged

escape json example in CLI docs to fit docs site#712
laverya merged 1 commit intomainfrom
laverya/escape-json-segment-for-docs

Conversation

@laverya
Copy link
Copy Markdown
Member

@laverya laverya commented May 4, 2026

New content (ignore the \ before the triple backticks)

% go run ./cli/main.go policy create --help
Create a new RBAC policy from a JSON definition file.

The definition file must be valid JSON in the following format:
  \```json
  {
    "v1": {
      "name": "My Policy",
      "resources": {
        "allowed": ["**/*"],
        "denied": []
      }
    }
  }
  \```

Vendors not on an enterprise plan cannot create policies.


Usage:
  replicated policy create [flags]

Example:
    # Create a policy from a definition file
    replicated policy create --name "My Policy" --definition policy.json

    # Create a policy with a description
    replicated policy create --name "My Policy" --description "Custom access policy" --definition policy.json

Flags:
      --definition string    Path to the JSON file containing the policy definition
      --description string   Description of the policy
  -h, --help                 help for create
      --name string          Name of the policy
  -o, --output string        The output format to use. One of: json|table (default "table")

Global Flags:
      --app string       The app slug or app id to use in all calls
      --debug            Enable debug output
      --profile string   The authentication profile to use for this command
      --token string     The API token to use to access your app in the Vendor API

@laverya laverya merged commit 9e96064 into main May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants