Skip to main content

Hydrust

A Language Server for Hydra configuration files, written in Rust.

Features

Currently Implemented

  • ✅ YAML Parsing: Extracts _target_ references and their parameters
  • ✅ Hover Support: Shows rich information when hovering over _target_ values:
    • Function signatures with parameter details
    • Class information and docstrings
    • Type annotations
  • ✅ Go to Definition: Jump from YAML _target_ to Python source file
  • ✅ Diagnostics: Parameter validation including:
    • Unknown parameters (unless **kwargs present)
    • Missing required parameters
    • Basic _target_ format validation
  • ✅ Semantic Tokens: Rich syntax highlighting for Hydra configurations:
    • Module path components (namespace tokens)
    • Class and function names
    • Parameter keys (parameter tokens)
    • Values (string, number, and property tokens)
  • ✅ Signature Help: Shows parameter information while typing function arguments

Planned Features

For a list of planned features and enhancements, see the issues page.

Installation

You can install hydrust through PyPI:

uv tool install hydrust   # or: pixi global install hydrust, pip install hydrust
uvx hydrust check conf/   # run once without installing

Usage

hydrust provides the check subcommand for one-time CLI and CI invocations, as well as an LSP for hydra diagnostics over stdin/stdout:

hydrust check conf/   # diagnose configs on the command line
hydrust server        # LSP

hydrust check

# Check a single file
hydrust check config.yaml

# Check several files, or a whole directory tree
hydrust check config.yaml overrides.yaml
hydrust check conf/

# Specify workspace root for local module resolution
hydrust check config.yaml -w /path/to/project

# Specify Python interpreter for site-packages resolution
hydrust check config.yaml -p /path/to/venv/bin/python

# Enable detailed resolution tracing for debugging
hydrust check config.yaml --trace-resolution

# Change verbosity level (error, warn, info, debug, trace)
hydrust check config.yaml -v debug

# Output in different formats (pretty, json, compact, github)
hydrust check config.yaml -f json

Directories are searched recursively for .yaml and .yml files. The walk honours .gitignore and .ignore files within the directory being walked, and skips hidden files and directories such as .github/. Symlinks are followed.

Options

Option Description
-w, --workspace <PATH> Working directory for resolving Python modules
-p, --python <PATH> Path to Python interpreter for module resolution
-v, --verbosity <LEVEL> Logging verbosity: error, warn, info, debug, trace
-f, --output-format <FORMAT> Output format: pretty (default), json, compact, github
--trace-resolution Show detailed resolution steps for each target (written to stderr)
--disable-rule <RULE> Disable a diagnostic rule; may be repeated

When --workspace is omitted, hydrust resolves Python modules against the current directory.

Continuous integration

--output-format github emits GitHub Actions workflow commands, so diagnostics appear as inline annotations on the pull request. A complete workflow, run with uvx so nothing needs installing beyond uv itself:

name: Hydra configs

on: [push, pull_request]

jobs:
  hydrust:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: astral-sh/setup-uv@v10.2.0
      - run: uvx hydrust@0.5.0 check --output-format github .

_target_ resolution needs the Python packages your configs point at. If they are not in the checked-out tree, install the project first and point hydrust at that interpreter with --python:

      - run: uv sync
      - run: uvx hydrust@0.5.0 check --output-format github --python .venv/bin/python conf/

Exit Codes

  • 0: No errors found
  • 1: One or more errors found
  • 2: Fatal error (path not found, invalid arguments, etc.)

Finding nothing to check is not an error: whether no YAML files matched at all or none of the ones found are Hydra configs, hydrust check warns on stderr and exits 0.

hydrust server

Client Compatibility

A client can be pointed at any released server binary, and an old server quietly ignores settings it was never taught to read. So the server describes itself in capabilities.experimental.hydrust at initialize (HydrustCapabilities::new in src/backend.rs):

  • protocolVersion — the version of this block's shape.
  • supportedSettings — keys read from initializationOptions.settings.
  • supportedRules — codes accepted in disabledRules.
  • features — optional behaviours switched on for this session, after matching what the server can do against what the client asked for.

A client that sees the block uses it instead of any built-in table; servers before v0.4.0 send no block, so clients fall back to a version table keyed on serverInfo.version or --version. The reference client is the VS Code extension (hydra-lsp-vscode), in src/common/compatTable.ts.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with tower-lsp framework
  • Python analysis design based on ruff and ty

References

Release files for hydrust 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydrust 0.5.0
File Size Uploaded
hydrust-0.5.0.tar.gz 157.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for hydrust 0.5.0
File
hydrust-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
hydrust-0.5.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
hydrust-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
hydrust-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
hydrust-0.5.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
hydrust-0.5.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 40.5 MB

Release files / hydrust-0.5.0.tar.gz

Download URL hydrust-0.5.0.tar.gz
Size 157.0 kB
Tags Source
SHA-256 checksum
How to use checksums
70c925575edfe4b2ae94d170c3675886d19613015a9fe6cc0e3bfd8c81389673
BLAKE2b-256 checksum
How to use checksums
7ecb3e28b4add7b58c00099115731575d66ab2a88b2dfb14a395d1d0193b1ec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-win_amd64.whl

Download URL hydrust-0.5.0-py3-none-win_amd64.whl
Size 7.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c15967952c47af6cd64017f379994062b9193c1109687631101980ce17409454
BLAKE2b-256 checksum
How to use checksums
61cb0aa9036bf34efb772f9b38e603b5e0d0ffba6392cc07b58188dfbba8c653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-musllinux_1_2_x86_64.whl

Download URL hydrust-0.5.0-py3-none-musllinux_1_2_x86_64.whl
Size 6.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f93e9621a49e10fe7443b4440e515b8f650d15a3e68eee4154f6f61c3a9f8215
BLAKE2b-256 checksum
How to use checksums
32c840c0a90d37c1d0c0e205a64b6ae268a46a2dc6917b3f23ae2190bbc8ee21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hydrust-0.5.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e3ef25e20eac4aa95a92d40c31ed7071e3f716b6b9dd4860a9c244c5b6635477
BLAKE2b-256 checksum
How to use checksums
ff485b21f3c0be94b0c5e27d818c8f419a4108d19a0598ada25dfe21e02709c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hydrust-0.5.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.5 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
84cc3e12d226758f47061742e9f392874c1ef057a027e8459d5dd2f70483c65d
BLAKE2b-256 checksum
How to use checksums
28ef39d30b3d900b9a71b1c1b52a632e2fc0e3a9fbc9e63b8cf8cb636d4779b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-macosx_11_0_arm64.whl

Download URL hydrust-0.5.0-py3-none-macosx_11_0_arm64.whl
Size 6.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ef9f53bccf5c641fde6743e7932978d5e669b90cf78f44f552f6aed004304338
BLAKE2b-256 checksum
How to use checksums
d231edf1c0c72dc2e0b2879cd4cee21c1e14756cf9a34fff32271a2df4a45af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / hydrust-0.5.0-py3-none-macosx_10_12_x86_64.whl

Download URL hydrust-0.5.0-py3-none-macosx_10_12_x86_64.whl
Size 6.7 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8d926f73bf0de52bfc5f48affb5f9d8074e20c2ac97e6082129b038d63ced11a
BLAKE2b-256 checksum
How to use checksums
a2db42169e9daafba63e4af4c102bb80c2a6804c36aac75b0606b5d8727cdbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.5.1

7 release files

This release

0.5.0 This release

7 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