{
  "id": "calc",
  "name": "calc",
  "homepage": "https://github.com/lcn2/calc",
  "description": "C-style arbitrary precision calculator.",
  "executables": [
    "calc"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.calcrc"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Evaluate expression",
    "description": "Evaluate calc expressions given on the command line, optionally dropping into interactive mode. Debug flags, modes and shell-script mode are left out.",
    "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://raw.githubusercontent.com/lcn2/calc/HEAD/calc.man",
        "revision": "HEAD 2026-10-27",
        "evidence": ".RB [ \\-c ]\n.RB [ \\-d ]\n.RB [ \\-e ]\n.RB [ \\-i ]\n.RB [ \\-p ]\n.RB [ \\-q ]\n.RB [ \\-s ]\n.RB [ \\-u ]\n.RB [ \\-v ]\n.B \\-d\nDisable the printing of the opening title.\n.B \\-e\nIgnore any environment variables on startup.\n.B \\-i\nBecome interactive if possible.\n.B \\-p\nPipe processing is enabled by use of\n.B \\-q\nDisable the reading of the startup scripts.\n.B \\-s\nBy default, all calc_cmd args are evaluated and executed. This flag will disable their evaluation and instead make them available as strings for the argv() builtin function.\n.B \\-v\nPrint the calc version number and exit.\n"
      }
    ],
    "field": [
      {
        "id": "interactive",
        "label": "Stay interactive",
        "description": "Drop into interactive mode after the expressions are evaluated.",
        "type": "boolean",
        "option": [
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_title",
        "label": "No opening title",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_startup",
        "label": "Skip startup scripts",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "pipe",
        "label": "Pipe mode",
        "description": "No prompt, no header; suited for piping the result onward.",
        "type": "boolean",
        "option": [
          "-p"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "as_strings",
        "label": "Treat arguments as strings",
        "description": "Do not evaluate the arguments; expose them to argv().",
        "type": "boolean",
        "option": [
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "version",
        "label": "Print version",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "expression",
        "label": "Expression",
        "description": "calc expression to evaluate, for example 2^100.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "evaluate",
        "label": "Evaluate expression",
        "fields": [
          "expression",
          "no_title",
          "no_startup"
        ],
        "required": [
          "expression"
        ]
      },
      {
        "id": "repl",
        "label": "Interactive session",
        "fields": [
          "interactive",
          "no_startup"
        ],
        "required": []
      },
      {
        "id": "version",
        "label": "Show version",
        "fields": [
          "version"
        ],
        "required": [
          "version"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "expression",
          "interactive",
          "version"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_title",
          "no_startup",
          "pipe",
          "as_strings"
        ]
      }
    ]
  }
}
