{
  "id": "diffnav",
  "name": "diffnav",
  "homepage": "https://github.com/dlvhdr/diffnav",
  "description": "A git diff pager based on delta with a file tree.",
  "executables": [
    "diffnav"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/diffnav/config.yml",
      "[appData]/diffnav/config.yml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Diff viewer",
    "description": "Open diffnav with a view mode or watch mode. Piped diffs (git diff | diffnav) are not covered; this form uses watch mode.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://github.com/dlvhdr/diffnav/blob/main/README.md",
        "evidence": "| `--side-by-side, -s` | Force side-by-side diff view                                          |\n| `--unified, -u`      | Force unified diff view                                               |\n| `--watch, -w`        | Watch mode: periodically re-run a command and refresh                 |\n| `--watch-cmd`        | Command to run in watch mode (implies `--watch`, default: `git diff`) |\n| `--watch-interval`   | Interval between watch refreshes (default: `2s`)                      |\ndiffnav --watch-cmd \"git diff --cached\" --watch-interval 5s\n"
      }
    ],
    "field": [
      {
        "id": "side_by_side",
        "label": "Side-by-side view",
        "type": "boolean",
        "option": [
          "--side-by-side",
          "-s"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "unified",
        "label": "Unified view",
        "type": "boolean",
        "option": [
          "--unified",
          "-u"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "watch",
        "label": "Watch mode",
        "description": "Periodically re-run a command (default: git diff) and refresh.",
        "type": "boolean",
        "option": [
          "--watch",
          "-w"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "watch_cmd",
        "label": "Watch command",
        "description": "Implies watch mode.",
        "type": "string",
        "option": [
          "--watch-cmd"
        ],
        "suggestions": [
          {
            "value": "git diff --cached",
            "label": "Staged changes"
          },
          {
            "value": "git diff",
            "label": "Unstaged changes"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "watch_interval",
        "label": "Refresh interval",
        "description": "For example 2s or 5s.",
        "type": "string",
        "option": [
          "--watch-interval"
        ],
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "watch",
        "label": "Watch changes",
        "fields": [
          "watch",
          "watch_cmd",
          "watch_interval",
          "unified"
        ],
        "required": [],
        "set": {
          "watch": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "side_by_side",
          "unified",
          "watch",
          "watch_cmd",
          "watch_interval"
        ]
      }
    ]
  }
}
