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 }
[[commands.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 or --no-spiceinit
-b or --batch
Run in batch mode.
-i or --interactive
-r rawfile or --rawfile=file
-o outfile or --output=outfile
All logs generated during a batch run (-b) will be saved in outfile.
"""
[[commands.field]]
id = "batch"
label = "Batch mode"
type = "boolean"
option = ["--batch", "-b"]
sources = ["help"]
[[commands.field]]
id = "interactive"
label = "Interactive mode"
type = "boolean"
option = ["--interactive", "-i"]
sources = ["help"]
[[commands.field]]
id = "no_spiceinit"
label = "Skip .spiceinit"
type = "boolean"
option = ["--no-spiceinit", "-n"]
sources = ["help"]
[[commands.field]]
id = "rawfile"
label = "Raw output file"
type = "path"
option = ["--rawfile", "-r"]
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["help"]
[[commands.field]]
id = "output"
label = "Log file (batch)"
type = "path"
option = ["--output", "-o"]
path = { kind = "file", role = "output", must_exist = false }
effect = "overwrite"
sources = ["help"]
[[commands.field]]
id = "files"
label = "Input decks"
type = "path"
position = 0
multiple = true
path = { kind = "file", role = "input" }
sources = ["help"]
[[commands.task]]
id = "batch_run"
label = "Batch simulation"
fields = ["files", "batch", "rawfile", "output"]
required = ["files"]
set = { batch = [true] }
[[commands.task]]
id = "interactive_run"
label = "Interactive session"
fields = ["files"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["files", "batch", "interactive", "rawfile", "output"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["no_spiceinit"]