{
  "id": "ptpython",
  "name": "ptpython",
  "homepage": "https://github.com/prompt-toolkit/ptpython",
  "description": "A better Python REPL.",
  "executables": [
    "ptpython"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/ptpython/config.py",
      "[appData]/ptpython/config.py",
      "%LOCALAPPDATA%/prompt_toolkit/ptpython/config.py"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "ptpython",
    "description": "Start the ptpython REPL, or run a Python script. Script arguments are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/prompt-toolkit/ptpython/blob/main/src/ptpython/entry_points/run_ptpython.py",
        "revision": "2026-10-27",
        "evidence": "  --vi                  Enable Vi key bindings\n  -i, --interactive     Start interactive shell after executing this file.\n  --asyncio             Run an asyncio event loop to support top-level \"await\".\n  --light-bg            Run on a light background (use dark colors for text).\n  --dark-bg             Run on a dark background (use light colors for text).\n  --config-file CONFIG_FILE\n                        Location of configuration file.\n  --history-file HISTORY_FILE\n                        Location of history file.\n"
      }
    ],
    "field": [
      {
        "id": "script",
        "label": "Script to run",
        "description": "Optional. Leave empty for a plain REPL.",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "interactive",
        "label": "Stay interactive after the script",
        "type": "boolean",
        "option": [
          "--interactive",
          "-i"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "vi",
        "label": "Vi key bindings",
        "type": "boolean",
        "option": [
          "--vi"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "asyncio",
        "label": "Top-level await (asyncio loop)",
        "type": "boolean",
        "option": [
          "--asyncio"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "light_bg",
        "label": "Light background colors",
        "type": "boolean",
        "option": [
          "--light-bg"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "dark_bg",
        "label": "Dark background colors",
        "type": "boolean",
        "option": [
          "--dark-bg"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "config_file",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config-file"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "history_file",
        "label": "History file",
        "type": "path",
        "option": [
          "--history-file"
        ],
        "path": {
          "kind": "file",
          "role": "output"
        },
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "repl_vi",
        "label": "REPL with Vi bindings",
        "fields": [
          "vi"
        ],
        "required": [
          "vi"
        ],
        "set": {
          "vi": [
            true
          ]
        }
      },
      {
        "id": "run_script",
        "label": "Run a script, then stay in the REPL",
        "fields": [
          "script",
          "interactive"
        ],
        "required": [
          "script"
        ],
        "set": {
          "interactive": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "interactive",
          "vi",
          "asyncio"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "light_bg",
          "dark_bg",
          "config_file",
          "history_file"
        ]
      }
    ]
  }
}
