{
  "id": "grace",
  "name": "Grace",
  "homepage": "https://plasma-gate.weizmann.ac.il/Grace/",
  "description": "WYSIWYG 2D plotting tool for X11",
  "executables": [
    "xmgrace",
    "gracebat",
    "grconvert"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.grace/gracerc.user"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Plot data with Grace",
    "description": "Load a data file into Grace and either open the GUI (xmgrace) or print straight to a file without a session (gracebat, or xmgrace with Hardcopy). Only common plotting options are offered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/testing/grace/xmgrace.1.en.html",
        "revision": "testing 2026-10-27",
        "evidence": "grace [ option | filename ]...\nxmgrace [ option | filename ]...\ngracebat [ option | filename ]...\n-hardcopy   No interactive session, just print and quit\n-hdevice device_name   Set default hardcopy device. See xmgrace -version for a list of supported devices.\n-log x|y|xy   Set the axis scaling of the current graph to logarithmic\n-noask   Assume the answer is yes to all requests, if the operation would overwrite a file, grace will do so without prompting\n-nxy file   Assume data file is in X Y1 Y2 Y3 ... format\n-printfile file   Save print output to file\n-param file   Load parameters from file to the current graph\n-graphtype xy|chart|fixed|polar|pie   Set the type of the current graph\n"
      }
    ],
    "field": [
      {
        "id": "nxy",
        "label": "Data file (X Y1 Y2 ... columns)",
        "type": "path",
        "option": [
          "-nxy"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "param",
        "label": "Parameter file",
        "type": "path",
        "option": [
          "-param"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "graphtype",
        "label": "Graph type",
        "type": "enum",
        "option": [
          "-graphtype"
        ],
        "choices": [
          {
            "value": "xy",
            "label": "XY"
          },
          {
            "value": "chart",
            "label": "Chart"
          },
          {
            "value": "fixed",
            "label": "Fixed"
          },
          {
            "value": "polar",
            "label": "Polar"
          },
          {
            "value": "pie",
            "label": "Pie"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "log",
        "label": "Logarithmic axes",
        "type": "enum",
        "option": [
          "-log"
        ],
        "choices": [
          {
            "value": "x",
            "label": "X"
          },
          {
            "value": "y",
            "label": "Y"
          },
          {
            "value": "xy",
            "label": "X and Y"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "hardcopy",
        "label": "Print and quit (no GUI)",
        "type": "boolean",
        "option": [
          "-hardcopy"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "hdevice",
        "label": "Hardcopy device",
        "description": "Device name such as PNG, EPS or PostScript; run xmgrace -version for the list.",
        "type": "string",
        "option": [
          "-hdevice"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "printfile",
        "label": "Save print output to",
        "type": "path",
        "option": [
          "-printfile"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "noask",
        "label": "Overwrite without asking",
        "type": "boolean",
        "option": [
          "-noask"
        ],
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "plot-gui",
        "label": "Open data in the GUI",
        "fields": [
          "nxy",
          "param",
          "graphtype",
          "log"
        ],
        "required": [
          "nxy"
        ]
      },
      {
        "id": "render",
        "label": "Render data to an image",
        "set": {
          "hardcopy": [
            true
          ]
        },
        "lock": [
          "hardcopy"
        ],
        "fields": [
          "nxy",
          "param",
          "graphtype",
          "log",
          "hdevice",
          "printfile",
          "noask"
        ],
        "required": [
          "nxy",
          "printfile"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "nxy",
          "param",
          "graphtype",
          "log"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "hardcopy",
          "hdevice",
          "printfile",
          "noask"
        ]
      }
    ]
  }
}
