{
  "id": "ngspice",
  "name": "ngspice",
  "homepage": "https://ngspice.sourceforge.io/",
  "description": "Ngspice, the open source Spice circuit simulator.",
  "executables": [
    "ngspice"
  ],
  "dotfiles": {
    "paths": [
      "~/.spiceinit",
      "~/spice.rc"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run a circuit simulation",
    "description": "Run ngspice on one or more input decks, interactively or in batch mode. Server, pipe and terminal options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/ngspice/ngspice.1.en.html",
        "revision": "47+ds-1",
        "evidence": "ngspice [options] [file ...]\n  -n or --no-spiceinit\n  -b or --batch\n  Run in batch mode.\n  -i or --interactive\n  -r rawfile or --rawfile=file\n  -o outfile or --output=outfile\n  All logs generated during a batch run (-b) will be saved in outfile.\n"
      }
    ],
    "field": [
      {
        "id": "batch",
        "label": "Batch mode",
        "type": "boolean",
        "option": [
          "--batch",
          "-b"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "interactive",
        "label": "Interactive mode",
        "type": "boolean",
        "option": [
          "--interactive",
          "-i"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_spiceinit",
        "label": "Skip .spiceinit",
        "type": "boolean",
        "option": [
          "--no-spiceinit",
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "rawfile",
        "label": "Raw output file",
        "type": "path",
        "option": [
          "--rawfile",
          "-r"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "output",
        "label": "Log file (batch)",
        "type": "path",
        "option": [
          "--output",
          "-o"
        ],
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "files",
        "label": "Input decks",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "batch_run",
        "label": "Batch simulation",
        "fields": [
          "files",
          "batch",
          "rawfile",
          "output"
        ],
        "required": [
          "files"
        ],
        "set": {
          "batch": [
            true
          ]
        }
      },
      {
        "id": "interactive_run",
        "label": "Interactive session",
        "fields": [
          "files"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "batch",
          "interactive",
          "rawfile",
          "output"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_spiceinit"
        ]
      }
    ]
  }
}
