bash_kernel
A bash kernel for Jupyter
What it is and what it does
bash_kernel is a Jupyter kernel that lets you run bash commands interactively in notebook cells and console environments. It wraps bash through pexpect to provide a REPL interface, allowing you to execute shell scripts, system commands, and pipelines directly within Jupyter's notebook interface. The kernel also supports rich output—you can pipe images, HTML, and JavaScript to display functions to render them inline in notebook cells.
The package depends on pexpect (for shell interaction), ipykernel (for Jupyter integration), and filetype (for content detection). Installation is straightforward but requires a manual registration step after pip install. The project is dormant, with the last update in January 2025 and no active development, so compatibility with very recent Jupyter or Python versions may not be guaranteed.
Use it for:
- Execute system administration or DevOps tasks directly in a notebook for documentation and reproducibility.
- Combine bash commands with Jupyter's notebook interface to create executable shell tutorials or runbooks.
- Generate and display plots or visualizations from command-line tools (gnuplot, graphviz) inline in notebooks.
- Prototype and test bash scripts interactively without leaving the notebook environment.
- Display HTML or JavaScript output from bash commands for interactive dashboards or reports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Enables running and interacting with bash commands directly inside Jupyter notebooks and consoles as a kernel, with support for displaying images, HTML, and JavaScript output.
Yes, if you need to run bash interactively in Jupyter and accept dormant maintenance. The package is stable for basic shell execution and has low install friction, but the lack of recent updates means you should verify compatibility with your specific Jupyter and Python versions before relying on it in production workflows.
Install
bash-kernel on PyPI
pip
pip install bash-kerneluv
uv add bash-kernelpoetry
poetry add bash-kernelInstalling bash_kernel
Before you install
Low install friction with a pure-Python wheel, but requires a post-install registration step (`python -m bash_kernel.install`) to function. Dormant maintenance status (last release 2025-01-05, no updates for 586 days) means bug fixes and compatibility updates are unlikely.
License in practice
BSD License (permissive) allows commercial and private use with minimal restrictions, typical for Jupyter ecosystem packages.
Quickstart
pip install bash_kernel
python -m bash_kernel.install
jupyter notebook
# Then select Bash from the 'New' menu in the notebook interface
Requires a functioning interactive bash installation with GNU readline support; some Linux distributions ship bash without these features and need a separate, more complete bash package installed.
Verify before relying
- Whether the package works with current Jupyter versions beyond IPython 3 (mentioned in description but Python/IPython support is unspecified).
- Compatibility with recent Python versions and whether dormant status affects stability with modern Jupyter releases.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — pexpect, ipykernel, filetype |
| Maintenance | dormant — 586 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 176,065/month — #10,253 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bash_kernel-0.10.0-py2.py3-none-any.whl
Tags
More Shells packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
ipythonIPython is an enhanced interactive Python shell…
permissive · top 1,000 on PyPI
argcompleteProvides bash and zsh tab completion for Python…
permissive · top 1,000 on PyPI
humanfriendlyFormats and parses numbers, file sizes,…
permissive · top 1,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
jupyter-kernel-gatewayJupyter Kernel Gateway is a web server that…
permissive · top 5,000 on PyPI
xonshXonsh is a Python-based shell that merges…
permissive · top 15,000 on PyPI
ipykernelProvides the IPython kernel backend that powers…
permissive · top 1,000 on PyPI
jupyter-nbmodel-clientProgrammatically interact with live Jupyter…
permissive · top 15,000 on PyPI
spyder-kernelsProvides Jupyter kernels that integrate Python…
permissive · top 15,000 on PyPI
jupyterJupyter is a metapackage that installs the core…
permissive · top 5,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
jupyter-kernel-clientConnects to live Jupyter Kernels over HTTP and…
permissive · top 15,000 on PyPI
ipywidgetsipywidgets provides interactive HTML widgets…
permissive · top 1,000 on PyPI