Quick Start
Under ConstructionLaunch PySH and run your first Python automation commands.
Launch PySH
$ pysh
PySH 0.8.2 | Python 3.13.5 | GPL-2.0-only
System: Debian GNU/Linux 13 | Kernel 6.12.90
Type 'exit' or press Ctrl+D to quit.
Interactive shell commands
In the PySH shell, standard system commands work as expected. You can run ls, cd, cat, and any program on your PATH directly.
$ ls -la
total 48 drwxr-xr-x ...
$ cd /tmp && pwd
/tmp
Python mode — #py
Type #py to enter the Python Command Execution Layer. You get a full Python 3 REPL with access to the file system, environment, and any installed packages.
$ #py
PySH Python Command Execution Layer
Python 3.13.5
$ from pathlib import Path
$ list(Path(".").iterdir())
[PosixPath('scripts'), PosixPath('.env'), ...]
Exit Python mode
Press Ctrl+D or type exit() to return to the PySH shell from Python mode.
File operations with pathlib
$ from pathlib import Path
$ p = Path("/var/log")
$ [f.name for f in p.iterdir() if f.suffix == ".log"]
['syslog', 'auth.log', 'kern.log']
Exiting PySH
Type exit at the PySH prompt or press Ctrl+D.