{
  "id": "rustic",
  "name": "rustic",
  "homepage": "https://rustic.cli.rs",
  "description": "rustic is a backup tool that provides fast, encrypted, deduplicated backups.",
  "executables": [
    "rustic"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/rustic/rustic.toml",
      "[appData]/rustic/rustic.toml",
      "%APPDATA%/rustic/rustic.toml"
    ],
    "exclude": [],
    "secret": [],
    "secret_paths": [
      {
        "file": [
          "[configHome]/rustic/rustic.toml",
          "[appData]/rustic/rustic.toml",
          "%APPDATA%/rustic/rustic.toml"
        ],
        "match": {
          "key_path": [
            "repository.password",
            "repository.key"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "rustic",
    "description": "Back up directories to a rustic repository. Repository, password and dry-run options go before the subcommand; other subcommands (restore, forget, prune, check) are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "config",
        "kind": "manual",
        "url": "https://github.com/rustic-rs/rustic/blob/main/config/README.md",
        "revision": "2026-10-27",
        "evidence": "| dry-run                | If true, performs a dry run without making any changes. | --dry-run, -n |\n| repository           | The path to the repository. Required.                       | -r |\n| password-file        | Path to a file containing the password for the repository.  | --password-file, -p |\n| password-command     | Command to retrieve the password for the repository.        | --password-command |\n"
      }
    ],
    "field": [
      {
        "id": "repository",
        "label": "Repository",
        "description": "Path to the repository.",
        "type": "string",
        "option": [
          "-r"
        ],
        "sources": [
          "config"
        ]
      },
      {
        "id": "password_file",
        "label": "Password file",
        "type": "path",
        "option": [
          "--password-file",
          "-p"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "config"
        ]
      },
      {
        "id": "password_command",
        "label": "Password command",
        "type": "string",
        "option": [
          "--password-command"
        ],
        "sources": [
          "config"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "type": "boolean",
        "option": [
          "--dry-run",
          "-n"
        ],
        "sources": [
          "config"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Repository",
        "fields": [
          "repository",
          "password_file",
          "password_command",
          "dry_run"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "backup"
        ],
        "label": "Create a snapshot",
        "description": "Back up files and directories. Pass the repository options at the top level.",
        "source": [
          {
            "id": "config",
            "kind": "manual",
            "url": "https://github.com/rustic-rs/rustic/blob/main/config/README.md",
            "revision": "2026-10-27",
            "evidence": "| description        | Description for the snapshot. | --description |\n| git-ignore         | If true, use .gitignore rules to exclude files from the backup in the source directory. | --git-ignore |\n| globs              | Array of globs specifying what to include/exclude in the backup. | --glob |\n| host               | Host name used in the snapshot. | --host |\n| init               | If true, initialize repository if it doesn't exist, yet. | --init |\n| label              | Set label for the snapshot. | --label |\n| one-file-system    | If true, only backs up files from the same filesystem as the source. | --one-file-system |\n| skip-if-unchanged  | Skip saving of the snapshot if it is identical to the parent. | --skip-identical-parent |\n"
          }
        ],
        "field": [
          {
            "id": "sources",
            "label": "Paths to back up",
            "type": "path",
            "position": 0,
            "multiple": true,
            "min": 0,
            "path": {
              "kind": "any",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "config"
            ]
          },
          {
            "id": "glob",
            "label": "Include/exclude glob",
            "description": "Prefix a glob with ! to exclude.",
            "type": "string",
            "option": [
              "--glob"
            ],
            "multiple": true,
            "sources": [
              "config"
            ]
          },
          {
            "id": "label",
            "label": "Label",
            "type": "string",
            "option": [
              "--label"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "description",
            "label": "Description",
            "type": "string",
            "option": [
              "--description"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "host",
            "label": "Host name",
            "type": "string",
            "option": [
              "--host"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "init",
            "label": "Initialize repository if missing",
            "type": "boolean",
            "option": [
              "--init"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "git_ignore",
            "label": "Respect .gitignore",
            "type": "boolean",
            "option": [
              "--git-ignore"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "one_file_system",
            "label": "Stay on one filesystem",
            "type": "boolean",
            "option": [
              "--one-file-system"
            ],
            "sources": [
              "config"
            ]
          },
          {
            "id": "skip_identical_parent",
            "label": "Skip if unchanged",
            "type": "boolean",
            "option": [
              "--skip-identical-parent"
            ],
            "sources": [
              "config"
            ]
          }
        ],
        "task": [
          {
            "id": "backup",
            "label": "Back up paths",
            "fields": [
              "sources",
              "glob",
              "label",
              "git_ignore",
              "one_file_system",
              "skip_identical_parent"
            ],
            "required": [
              "sources"
            ]
          },
          {
            "id": "first-backup",
            "label": "First backup (create repository)",
            "set": {
              "init": [
                true
              ]
            },
            "lock": [
              "init"
            ],
            "fields": [
              "sources",
              "init",
              "label",
              "glob"
            ],
            "required": [
              "sources"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "sources",
              "glob",
              "label",
              "init"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "description",
              "host",
              "git_ignore",
              "one_file_system",
              "skip_identical_parent"
            ]
          }
        ]
      }
    ]
  }
}
