Skip to main content

🦑 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 via multimethod
  • Result type — ok/err with result->, let-result, match-result, try-result
  • defstruct — frozen dict-like records
  • Static API inspection — api-surface parses Hy/Python source without importing
  • Hy-aware inspect — getsource, getsourcefile that 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)

Source distribution for hyjinx 1.3.1
File Size Uploaded
hyjinx-1.3.1.tar.gz 72.6 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.13

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.29.6

2 release files

0.29.3

2 release files

0.29.1

2 release files

0.29.0

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