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
    • Positional-only parameters passed by name instead of through _args_
    • 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

Metadata

Release files for hydrust 0.6.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.6.0
File Size Uploaded Provenance Actions
hydrust-0.6.0.tar.gz 175.6 kB Without provenance Details for hydrust-0.6.0.tar.gz

Built distributions (wheels)

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

Total release size: 47.5 MB

Release files / hydrust-0.6.0.tar.gz

Download URL hydrust-0.6.0.tar.gz
Size 175.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0011c4bc7643380345061314fd674739fb2b47d8ee0c5c867a571111c10a68c3
BLAKE2b-256 checksum
How to use checksums
0301f9f69cf7cf5cb1d787fe33f5120c190ce504f5fac9203976a5374ff1648f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-win_amd64.whl

Download URL hydrust-0.6.0-py3-none-win_amd64.whl
Size 8.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
83e956fa7039cd7ceeb31769879dd558385df10e912bbf4f9a902aa5c65d0056
BLAKE2b-256 checksum
How to use checksums
58effb8a1e94474fa53f33edfc66f1ffc9c44b494158d9c8fc2dcd0ea6caa5b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-musllinux_1_2_x86_64.whl

Download URL hydrust-0.6.0-py3-none-musllinux_1_2_x86_64.whl
Size 8.1 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e478072fac9d10318dbe06a6612770e8d0b06ecff94950c9513923d88a3104f7
BLAKE2b-256 checksum
How to use checksums
bc93b173002fd00c558419710a1a29bb2b1580f1261936f84bc7376086198332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hydrust-0.6.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 8.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c79126e891a838e6a8746f3e343b514325efac2301a11d7d489166fa4ad45745
BLAKE2b-256 checksum
How to use checksums
8ff84e6adec3a27fd267d176e40ba15319aa9017f0233dd9f1f22b1829d2b111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hydrust-0.6.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
757b3231de5adf91166e4210bd12bebccf33019d82792a006637518956db80e8
BLAKE2b-256 checksum
How to use checksums
204c6d116b0440ab32b35b3e14b6bb4ec65e84b3d1f95218aa34aacce2ec6090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-macosx_11_0_arm64.whl

Download URL hydrust-0.6.0-py3-none-macosx_11_0_arm64.whl
Size 7.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c71b38c9b83d9bbedd4e437e5a5f7d7913e499717477a04d7aacdb92f5d1c0f2
BLAKE2b-256 checksum
How to use checksums
d55d23f6a35aa002eb0ee1b1509aafec3c94356292861b1f4439b761c1f8c5b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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.6.0-py3-none-macosx_10_12_x86_64.whl

Download URL hydrust-0.6.0-py3-none-macosx_10_12_x86_64.whl
Size 7.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
056c287ba27cc1c1608be7f371d40621b6a85a41616b80f19f7eaed219bf7ea4
BLAKE2b-256 checksum
How to use checksums
7c78042c48f5aff8cc9594b4377d428bcde17df5b419b223991aa44688f56c33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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}

Security for hydrust 0.6.0

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.

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