{
  "id": "1password-cli",
  "name": "1Password CLI",
  "homepage": "https://developer.1password.com/docs/cli/",
  "description": "1Password from the command line: read secrets and sign commits without leaving the shell.",
  "icon": "SimpleIcons:1password",
  "executables": [
    "op"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/op/config",
      "%LOCALAPPDATA%/1Password/config/op/config"
    ],
    "exclude": [
      "~/.config/op/data/",
      "~/.config/op/cache/"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": [
          "~/.config/op/config",
          "%LOCALAPPDATA%/1Password/config/op/config"
        ],
        "format": "json",
        "match": {
          "key_path": [
            "device",
            "latest_signin"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "1Password CLI",
    "description": "Read items and secrets from 1Password. Creating, editing and deleting items, users and groups are left out.",
    "quality": "ai-draft",
    "base": "fig:op",
    "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/op.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "account",
        "label": "Account",
        "description": "Shorthand, sign-in address, account ID or user ID.",
        "type": "string",
        "option": [
          "--account"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "format",
        "label": "Output format",
        "type": "string",
        "option": [
          "--format"
        ],
        "suggestions": [
          {
            "value": "human-readable",
            "label": "human-readable"
          },
          {
            "value": "json",
            "label": "json"
          }
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "account",
          "format"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "whoami"
        ],
        "label": "Show signed-in account",
        "description": "Show information about the signed-in account.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ]
      },
      {
        "path": [
          "signin"
        ],
        "label": "Sign in",
        "description": "Sign in to a 1Password account.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "force",
            "label": "Ignore warnings, raw output",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "signin",
            "label": "Sign in",
            "fields": [],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "read"
        ],
        "label": "Read a secret",
        "description": "Read a secret by secret reference (op://vault/item/field). Output goes to the terminal unless redirected.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "reference",
            "label": "Secret reference",
            "description": "Example: op://Personal/GitHub/token. Not covered by the completion data.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_newline",
            "label": "No trailing newline",
            "type": "boolean",
            "option": [
              "--no-newline",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Do not prompt",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "read",
            "label": "Read a secret",
            "fields": [
              "reference",
              "no_newline"
            ],
            "required": [
              "reference"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "reference",
              "no_newline",
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "item",
          "get"
        ],
        "label": "Get an item",
        "description": "Show an item's details, a single field, its one-time password or share link.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "item",
            "label": "Item name, ID or share link",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fields",
            "label": "Only these fields",
            "description": "Comma-separated, for example label=password.",
            "type": "string",
            "option": [
              "--fields"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "otp",
            "label": "One-time password",
            "type": "boolean",
            "option": [
              "--otp"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "share_link",
            "label": "Share link",
            "type": "boolean",
            "option": [
              "--share-link"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "include_archive",
            "label": "Include archived items",
            "type": "boolean",
            "option": [
              "--include-archive"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "get",
            "label": "Get an item",
            "fields": [
              "item",
              "fields"
            ],
            "required": [
              "item"
            ]
          },
          {
            "id": "otp",
            "label": "Get a one-time password",
            "set": {
              "otp": [
                true
              ]
            },
            "lock": [
              "otp"
            ],
            "fields": [
              "item",
              "otp"
            ],
            "required": [
              "item"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "item",
              "fields",
              "otp",
              "share_link"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "include_archive"
            ]
          }
        ]
      },
      {
        "path": [
          "item",
          "list"
        ],
        "label": "List items",
        "description": "List items in your vaults.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "categories",
            "label": "Categories",
            "description": "Comma-separated.",
            "type": "string",
            "option": [
              "--categories"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tags",
            "label": "Tags",
            "description": "Comma-separated.",
            "type": "string",
            "option": [
              "--tags"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "long",
            "label": "Detailed list",
            "type": "boolean",
            "option": [
              "--long"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "include_archive",
            "label": "Include archived items",
            "type": "boolean",
            "option": [
              "--include-archive"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List items",
            "fields": [
              "categories",
              "tags",
              "long"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "categories",
              "tags",
              "long"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "include_archive"
            ]
          }
        ]
      },
      {
        "path": [
          "vault",
          "list"
        ],
        "label": "List vaults",
        "description": "List vaults in the account.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "group",
            "label": "Vaults a group can access",
            "type": "string",
            "option": [
              "--group"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List vaults",
            "fields": [
              "group"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "group"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run with secrets",
        "description": "Run a command with secret references in its environment resolved. Append the command after --.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/op.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "env_file",
            "label": "Env file",
            "type": "path",
            "option": [
              "--env-file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_masking",
            "label": "Do not mask secrets in output",
            "type": "boolean",
            "option": [
              "--no-masking"
            ],
            "effect": "exec",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run with env file",
            "fields": [
              "env_file",
              "no_masking"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "env_file",
              "no_masking"
            ]
          }
        ]
      }
    ]
  }
}
