Skip to content

eunos-1128/fish-kernel

Repository files navigation

Fish Kernel for Jupyter

fish-kernel is a Jupyter kernel implementation for the fish shell.

Requirements

  • Python >=3.10
  • fish command available on PATH
  • Jupyter frontend (jupyterlab or notebook)
  • Supported OS: Linux, macOS, and Windows (WSL)
  • Native Windows is not supported (fish shell dependency)

Install

PyPI

pip install fish-kernel

conda-forge

Install from the conda-forge channel with conda, mamba, or pixi:

conda install -c conda-forge fish-kernel
mamba install -c conda-forge fish-kernel
pixi add fish-kernel

Register kernel

After installation, register the kernelspec.

fish-kernel add requires one of --user, --sys-prefix, or --prefix. fish-kernel install is an alias of fish-kernel add.

Install for your user account:

fish-kernel add --user

Or install into the current Python environment:

fish-kernel add --sys-prefix

After installation, verify the kernel is registered:

jupyter kernelspec list

You should see a fish kernel entry.

Remove kernel

To unregister the kernelspec, run:

fish-kernel remove

fish-kernel uninstall is an alias of fish-kernel remove.

Unlike add, a target option is optional. With no options, remove deletes whichever installed copy it finds first. If you installed the kernel into more than one scope (for example both --user and --sys-prefix), pass the matching option to target a specific one:

fish-kernel remove --user
fish-kernel remove --sys-prefix
fish-kernel remove --prefix /path/to/prefix

Development

git clone https://github.com/eunos-1128/fish-kernel.git
cd fish-kernel
uv sync --dev
uv run pytest
uv run fish-kernel install --sys-prefix
uv run jupyter kernelspec list

Documentation

Build docs locally with Sphinx + Furo:

uv sync --dev
uv run sphinx-build -b html docs docs/_build/html

Usage examples

Simple calculation:

set a 7
set b 13
math $a + $b

Acknowledgements

This project was developed with inspiration from:

About

A fish kernel for Jupyter

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Contributors