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.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 hydrust 0.6.1
File Size Uploaded Provenance Actions
hydrust-0.6.1.tar.gz 177.0 kB Without provenance Details for hydrust-0.6.1.tar.gz

Built distributions (wheels)

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

Total release size: 47.5 MB

Release files / hydrust-0.6.1.tar.gz

Download URL hydrust-0.6.1.tar.gz
Size 177.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9675a55e23a75db63496c8d62e92bac4d0650bfcfe428556b5e25a842046d93c
BLAKE2b-256 checksum
How to use checksums
c369d37023574b652bd8cd15eed8cfb4b63f11e9e7af77936d7d7e4d5f99a2a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1-py3-none-win_amd64.whl

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

Download URL hydrust-0.6.1-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
ddb1badd50e2ee8db3a298325b9683ed3ecd36b064b548a3455944af671fa8be
BLAKE2b-256 checksum
How to use checksums
d1333398da5329eef11e6e0c9d58d0f5e669558f6c59bff0a40e8bcee93f943c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hydrust-0.6.1-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
f721c33c27bbbe073fc411dad870977374fad85a33b22fd06a8612e660dd8475
BLAKE2b-256 checksum
How to use checksums
48c610fb5e639e45a029a87367537c0ecb134408d82d43f8c7cc1d3494edd3d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hydrust-0.6.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c707a39ec926e75f3d3f3cd426a3e2be374d13000f2d58bc45515bc0a4e31f89
BLAKE2b-256 checksum
How to use checksums
1493e0871c9df96ba363c08c2dd6167016e11571c200c47c72802ea0be4c5ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1-py3-none-macosx_11_0_arm64.whl

Download URL hydrust-0.6.1-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
039a20ec5362ffeef577407a0fe9efceb783e3cb7585fb84aecc78ba0224bfca
BLAKE2b-256 checksum
How to use checksums
7619bb6afb8b86d51f6151ae262b3818b572c86c680f9b49e171828c16e7d07d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.1-py3-none-macosx_10_12_x86_64.whl

Download URL hydrust-0.6.1-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
56643069ad2cfff987de1e32977430420ce705fbe2c6c2bb769f72d0165b8b8f
BLAKE2b-256 checksum
How to use checksums
238b8a088ec8de00e0a0325f1837f3e143263306eacf8f0a1928fbb4293cf557
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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.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.

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