id = "ptpython" name = "ptpython" homepage = "https://github.com/prompt-toolkit/ptpython" description = "A better Python REPL." executables = ["ptpython"] [dotfiles] # The project's official configuration example says to copy config.py to # $XDG_CONFIG_HOME/ptpython on Linux, ~/Library/Application Support/ptpython # on macOS, and ~\AppData\Local\prompt_toolkit\ptpython on Windows. # https://github.com/prompt-toolkit/ptpython/blob/main/examples/ptpython_config/config.py 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 } [[commands.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 -i, --interactive Start interactive shell after executing this file. --asyncio Run an asyncio event loop to support top-level "await". --light-bg Run on a light background (use dark colors for text). --dark-bg Run on a dark background (use light colors for text). --config-file CONFIG_FILE Location of configuration file. --history-file HISTORY_FILE Location of history file. """ [[commands.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"] [[commands.field]] id = "interactive" label = "Stay interactive after the script" type = "boolean" option = ["--interactive", "-i"] sources = ["help"] [[commands.field]] id = "vi" label = "Vi key bindings" type = "boolean" option = ["--vi"] sources = ["help"] [[commands.field]] id = "asyncio" label = "Top-level await (asyncio loop)" type = "boolean" option = ["--asyncio"] sources = ["help"] [[commands.field]] id = "light_bg" label = "Light background colors" type = "boolean" option = ["--light-bg"] sources = ["help"] [[commands.field]] id = "dark_bg" label = "Dark background colors" type = "boolean" option = ["--dark-bg"] sources = ["help"] [[commands.field]] id = "config_file" label = "Config file" type = "path" option = ["--config-file"] path = { kind = "file", role = "input" } sources = ["help"] [[commands.field]] id = "history_file" label = "History file" type = "path" option = ["--history-file"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["help"] [[commands.task]] id = "repl_vi" label = "REPL with Vi bindings" fields = ["vi"] required = ["vi"] set = { vi = [true] } [[commands.task]] id = "run_script" label = "Run a script, then stay in the REPL" fields = ["script", "interactive"] required = ["script"] set = { interactive = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["script", "interactive", "vi", "asyncio"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["light_bg", "dark_bg", "config_file", "history_file"]