Skip to main content

pyesh

Python Expanded Shell: a cross-platform, Python-oriented interactive and scripting shell with direct process execution, typed Python pipelines, configurable user files, and command plugins.

pyesh is its own shell language rather than a Bash interpreter. Explicit .sh and .ps1 files continue to run through installed Bash and PowerShell runtimes.

Highlights

  • Job tracking with jobs, wait, fg, bg, kill, and disown; POSIX terminal job control.
  • Environment, aliases, history, directory stacks, portable output, and input built-ins.
  • Pipelines, conditions, per-stage redirection, heredocs, and pipefail.
  • Session variables, special parameters, command substitution, home expansion, and globs.
  • Stateful native Python at the prompt.
  • Typed @variable:datatype pipeline input and capture.
  • Explicit Python, Bash, and PowerShell script dispatch.
  • source/deactivate support for Python virtual environments.
  • Colorful live syntax highlighting, arrow-key history, and Tab completion.
  • Custom prompt, environment, PATH, startup, history, and plugin files.
  • Named JSON profiles for complete terminal and session customization.
  • Persistent Rich-powered customizable welcome splash.
  • Active-venv Python selection and optional venv-local pyesh startup files.
  • Stateful Python automation API.

Install and run

Requires Python 3.9 or newer:

python -m pip install -e .
pyesh --init
pyesh
pyesh -c 'echo "hello $(printf world)"'
pyesh automation.pyesh one two
printf 'echo from-stdin\n' | pyesh -

pyesh and python -m pyesh are equivalent.

user@machine project (main) % echo "hello"
hello
user@machine project (main) % numbers = [1, 2, 3]
user@machine project (main) % @numbers:lines | @copy:lines
user@machine project (main) % copy
['1', '2', '3']

Run help or man inside the shell. Use pyesh --help for command-line options and pyesh --version for package and interpreter locations. Run welcome for a customizable splash summarizing the current runtime and session. Configure its template and automatic startup in ~/.pyesh_welcome.

Documentation

The documentation links the complete project guides. See the Changelog and development guide for project history and development workflow.

Quick examples

Operators and scripts:

./examples/hello.py
./examples/hello.sh | grep Bash
failing-command || echo fallback
echo first > output.txt ; echo second >> output.txt

Virtual environment:

python -m venv .venv
source .venv/bin/activate
deactivate

Python automation:

from pyesh import PyeshSession

session = PyeshSession(verbose=True)
status = session.run_argv(["python", "./examples/hello.py"])

Language boundary

Python syntax supplies control flow and reusable functions. Bash functions, Bash parameter-expansion extensions, process substitution, and arbitrary file descriptor manipulation are not implemented. POSIX interactive job control is supported; Windows cannot suspend/resume jobs. Plugin capabilities beyond commands remain planned.

License

Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for pyesh 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyesh 1.0.0
File Size Uploaded
pyesh-1.0.0.tar.gz 58.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyesh 1.0.0
File Interpreter ABI Platform
pyesh-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 124.6 kB

Release files / pyesh-1.0.0.tar.gz

Download URL pyesh-1.0.0.tar.gz
Size 58.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4abd7b6b05f4fdf469060d5b2c7a54c1e0bc62fe17625cef61ce2c17ebe48c7e
BLAKE2b-256 checksum
How to use checksums
982b5cf377cd956d71feb45dd9e65c3f427cb5c63f4eedd9f889699bf8c8507f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / pyesh-1.0.0-py3-none-any.whl

Download URL pyesh-1.0.0-py3-none-any.whl
Size 66.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3395e688849b339d576f7175bb43df49e3f52b1cf3ca2d9530aabbe64a3ae871
BLAKE2b-256 checksum
How to use checksums
135bf853140025399f1053ae7b97cc49a9ab0eae0fde47fc3ad227502305bc55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page