🦑 hy-fancy-repl
A Hy enhanced REPL.
Compatible with Hy 1.2.0 and later.
Install
$ pip install -U hy-fancy-repl
The REPL
The REPL implements multi-line editing, completion, live input validation, live syntax highlighting, bracket matching, enhanced tracebacks, and interactive matplotlib plots.
$ hy-repl
or
$ hy-fancy-repl
Features
- Multi-line editing with smart indentation
- Syntax highlighting via Pygments
- Bracket matching that ignores brackets inside strings and comments
- Tab completion with Hy's native completer
- Live validation - shows a red 'x' when parentheses are unbalanced
- Enhanced tracebacks - shows syntax-highlighted source snippets
- Interactive matplotlib - async plot updates when available
- History persistence - saved to
~/.hy-historyby default
Environment Variables
The REPL's behaviour may be modified with the following environment variables:
| Variable | Description | Default |
|---|---|---|
HY_HISTORY |
Path to command history file | ~/.hy-history |
HY_LIVE_COMPLETION |
Enable live autocompletion dropdown | unset (off) |
HY_PYGMENTS_STYLE |
Pygments style for highlighting | lightbulb |
HY_VI_MODE |
Enable vi line-editing mode | unset (emacs) |
HY_TRACEBACK_IGNORE |
Comma-separated list of files to hide in tracebacks | sensible defaults |
Traceback Filtering
By default, the REPL hides infrastructure files in tracebacks to show your code. The default ignore list includes Hy internals, funcparserlib, and multimethod.
Override with HY_TRACEBACK_IGNORE:
$ HY_TRACEBACK_IGNORE="hy/repl.py,code.py" hy-fancy-repl
Or modify at runtime:
from hy_fancy_repl.repl import TRACEBACK_IGNORE
# TRACEBACK_IGNORE is a tuple of file path suffixes to ignore
Acknowledgements
The REPL uses pygments, prompt-toolkit, colorist, and Hy.
Contributing
See CONTRIBUTING.md for development setup and contribution guidelines.
Docs
Try clicking below.
Metadata
Release files for hy-fancy-repl 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hy_fancy_repl-1.2.1.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hy_fancy_repl-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / hy_fancy_repl-1.2.1.tar.gz
| Download URL | hy_fancy_repl-1.2.1.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e1d4ad25e66a0300244f47e7d1dddab8a0b1710df7ebb95c7ccf3682d904a39
|
|
BLAKE2b-256 checksum How to use checksums |
b73278e3142ccc7e92506dbf0fb0d5c0581ef815de2df20f5bf5239226eed51b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / hy_fancy_repl-1.2.1-py3-none-any.whl
| Download URL | hy_fancy_repl-1.2.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef015431478187e13d9d8ef1b206ac18c513f6253b151132a426e49192acfa96
|
|
BLAKE2b-256 checksum How to use checksums |
de526037427839ae8f9389b75992d0815f40d81d43dedcfc54e25c89f41a6155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|