{
  "id": "bws",
  "name": "Bitwarden Secrets Manager CLI",
  "homepage": "https://bitwarden.com/help/secrets-manager-cli/",
  "description": "A Rust CLI for interacting with the Bitwarden Secrets Manager.",
  "icon": "SimpleIcons:bitwarden",
  "executables": [
    "bws"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/bws/config"
    ],
    "exclude": [
      "~/.config/bws/state/"
    ],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": "~/.config/bws/config",
        "format": "toml",
        "match": {
          "key_path": [
            "profiles.*.state_dir"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Bitwarden Secrets Manager",
    "description": "Read secrets and projects. Creating, editing and deleting secrets, config and access tokens are left out; pass the token through BWS_ACCESS_TOKEN rather than a flag.",
    "quality": "ai-draft",
    "base": "fig:bws",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/bws.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "secret",
          "list"
        ],
        "label": "List secrets",
        "description": "List the secrets this service account can access, optionally for one project.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bws.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "project",
            "label": "Project ID",
            "description": "Limit to this project identifier.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "description": "Output format (default json).",
            "type": "string",
            "option": [
              "--output",
              "-o"
            ],
            "suggestions": [
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "yaml",
                "label": "yaml"
              },
              {
                "value": "env",
                "label": "env"
              },
              {
                "value": "table",
                "label": "table"
              },
              {
                "value": "tsv",
                "label": "tsv"
              },
              {
                "value": "none",
                "label": "none"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "all",
            "label": "All secrets as a table",
            "set": {
              "output": [
                "table"
              ]
            },
            "fields": [
              "output"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "project",
              "output"
            ]
          }
        ]
      },
      {
        "path": [
          "secret",
          "get"
        ],
        "label": "Get a secret",
        "description": "Retrieve one secret by its ID.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bws.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "secret_id",
            "label": "Secret ID",
            "description": "ID of the secret to retrieve.",
            "type": "string",
            "position": 0,
            "min": 1,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output",
            "label": "Output format",
            "description": "Output format (default json).",
            "type": "string",
            "option": [
              "--output",
              "-o"
            ],
            "suggestions": [
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "yaml",
                "label": "yaml"
              },
              {
                "value": "env",
                "label": "env"
              },
              {
                "value": "table",
                "label": "table"
              },
              {
                "value": "tsv",
                "label": "tsv"
              },
              {
                "value": "none",
                "label": "none"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "get",
            "label": "Get as env line",
            "set": {
              "output": [
                "env"
              ]
            },
            "fields": [
              "secret_id",
              "output"
            ],
            "required": [
              "secret_id"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "secret_id",
              "output"
            ]
          }
        ]
      },
      {
        "path": [
          "project",
          "list"
        ],
        "label": "List projects",
        "description": "List the projects this service account can access.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/bws.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "output",
            "label": "Output format",
            "description": "Output format (default json).",
            "type": "string",
            "option": [
              "--output",
              "-o"
            ],
            "suggestions": [
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "yaml",
                "label": "yaml"
              },
              {
                "value": "env",
                "label": "env"
              },
              {
                "value": "table",
                "label": "table"
              },
              {
                "value": "tsv",
                "label": "tsv"
              },
              {
                "value": "none",
                "label": "none"
              }
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "table",
            "label": "As a table",
            "set": {
              "output": [
                "table"
              ]
            },
            "fields": [
              "output"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "output"
            ]
          }
        ]
      }
    ]
  }
}
