🦑 Hyjinx 🔬
Functions and macros for modern living in the Hy REPL.
Compatible with Hy ≥ 1.2.0 · Python ≥ 3.13
Hyjinx is a utility library for Hy. When a module stabilises, it gets spun out into its own package (e.g. beautifhy).
Modules
| Module | Description | Dependencies |
|---|---|---|
lib |
String/file/OS utilities, JSON I/O, hashing | toolz |
result |
Result type (ok/err) with threading macros |
— |
macros |
defmethod, defstruct, when-let, lmap, etc. |
toolz |
actors |
Async actor model with defactor macro |
— |
api |
Static API surface inspection (no imports, no side effects) | — |
source |
Code inspection, display, and editing | pygments, beautifhy |
hjx_inspect |
Hy-aware inspect module |
multimethod |
crypto |
ECDSA signing and password hashing | ecdsa |
mat |
NumPy pretty-printing for humans | numpy, colorist |
llm |
Discuss code with LLMs (OpenAI, Anthropic, TabbyAPI) | openai, anthropic |
wire |
ZMQ message framing | zmq, msgpack, zstandard |
zmq_client |
Lazy Pirate ZMQ client | zmq |
zmq_server |
Lazy Pirate ZMQ server | zmq |
screen |
ncurses wrapper | — |
docs |
Offline Hy/Hyrule/Toolz documentation | — |
hyrc |
REPL startup configuration | — |
mail |
Email sending | — |
cli |
Command-line interface | click, pygments |
CLI
$ hyjinx where hyjinx.macros.defmethod
/path/to/hyjinx/macros.hy:94
$ hyjinx where json.dumps --json
{"line": 184, "module": "json", "file": "...", "language": "python", "extension": "py"}
$ hyjinx dir hyjinx.result
hyjinx/result.hy [14 definitions]
defn ok(value)
defn err(error-type, message, context)
defn as-result(x)
mac result->(expr, forms)
mac result->>(expr, forms)
mac let-result(bindings, body)
mac match-result(result, ok-sym, ok-body, err-sym, err-body)
mac try-result(body)
defn raise-if-err(result)
defn unwrap(result)
defn unwrap-or(result, default)
defn map-ok(f, result)
defn map-err(f, result)
defn collect-results(results)
$ hyjinx dir hyjinx.lib --kind defn --no-params
hyjinx/lib.hy [60 definitions]
defn mreload
defn sync-await
defn compose
...
$ hyjinx source hyjinx.api.format-surface --no-highlight
(defn format-surface [defs * [show-params True] [show-line False]]
...)
$ hyjinx doc hyjinx.api.api-surface
Return a list of definition dicts for a source file.
Each dict has keys: kind, name, params, line.
No imports are performed — purely static analysis.
The dir command uses static analysis — it parses source files without importing them, so it never triggers side effects (DB connections, GPU init, etc.).
Install
pip install hyjinx
Optional dependencies:
pip install hyjinx[zmq] # ecdsa, pyzmq, zstandard, msgpack
pip install hyjinx[llm] # openai, anthropic
pip install hyjinx[dev] # pytest + all optional dependencies
For offline Hy/Hyrule/Toolz documentation:
hy -m hyjinx.docs
For in-terminal sixel rendering of LaTeX in LLM replies, install pdflatex, dvipng, and img2sixel, and use a sixel-capable terminal.
Hylights
defmethod— polymorphic type dispatch viamultimethod- Result type —
ok/errwithresult->,let-result,match-result,try-result defstruct— frozen dict-like records- Static API inspection —
api-surfaceparses Hy/Python source without importing - Hy-aware
inspect—getsource,getsourcefilethat handle macros and multimethods - LLM integration — discuss code with ChatGPT, Claude, or local models
- ZMQ lazy pirate — reliable RPC client/server with automatic retries
Metadata
Release files for hyjinx 1.3.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 | Provenance | Actions |
|---|---|---|---|---|
| hyjinx-1.3.1.tar.gz | 72.6 kB | Without provenance | Details for hyjinx-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hyjinx-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for hyjinx-1.3.1-py3-none-any.whl |
Total release size: 140.7 kB
Release files / hyjinx-1.3.1.tar.gz
| Download URL | hyjinx-1.3.1.tar.gz |
|---|---|
| Size | 72.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d4c9cad39fa7e262a657a47c9879a69cee96bb372c46aa9bbf92618c1e799d1
|
|
BLAKE2b-256 checksum How to use checksums |
aca34de09e695980d1b63b702448114d03ae3652dc611ff5833d8282e77d488d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / hyjinx-1.3.1-py3-none-any.whl
| Download URL | hyjinx-1.3.1-py3-none-any.whl |
|---|---|
| Size | 68.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10985a68c9448f1b1aa87d13e6eb54ac6a5c2f8fb3c71d82b1784c4f33c022c0
|
|
BLAKE2b-256 checksum How to use checksums |
dc56dff77d2ccb278d6b6d085bb358033e4b2971e2565fb4753ac2f814accac6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for hyjinx 1.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.