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
**kwargspresent) - Missing required parameters
- Basic
_target_format validation
- Unknown parameters (unless
- ✅ 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 found1: One or more errors found2: 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 frominitializationOptions.settings.supportedRules— codes accepted indisabledRules.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
References
Release files for hydrust 0.5.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 | |
|---|---|---|---|
| hydrust-0.5.1.tar.gz | 158.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| hydrust-0.5.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| hydrust-0.5.1-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| hydrust-0.5.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| hydrust-0.5.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details |
| hydrust-0.5.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| hydrust-0.5.1-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 40.4 MB
Release files / hydrust-0.5.1.tar.gz
| Download URL | hydrust-0.5.1.tar.gz |
|---|---|
| Size | 158.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a6e993bb4105284e8ec53c96c457878781203802e22bd6912cf26e3f273f29f
|
|
BLAKE2b-256 checksum How to use checksums |
3f2fa7e901906e0fe952edf2712d91523d27d2bdc9a167f68d12ce6132dc2142
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-win_amd64.whl
| Download URL | hydrust-0.5.1-py3-none-win_amd64.whl |
|---|---|
| Size | 7.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f1cd8997dfa2fd6a0cb6c43c2e56706132d8b73534b7834ede8b76ad865946f
|
|
BLAKE2b-256 checksum How to use checksums |
6f54af2a924289dbded83b98e9a8376199a971e52d5f42448445327ab587556f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-musllinux_1_2_x86_64.whl
| Download URL | hydrust-0.5.1-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 |
5670f156ab92de16d15e8696460f510b65d913dd8d4bea52359649019902bb0f
|
|
BLAKE2b-256 checksum How to use checksums |
0aa3fcb6fdefe7ad97b54893d92d140865a72bf69190f23028fe465084c83577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | hydrust-0.5.1-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 |
e8ba2029b88d5c2ee303537057a6ad80ec9b2137af20e22422de074c6eab9ca8
|
|
BLAKE2b-256 checksum How to use checksums |
ef9a5024d37cc4f12ca74c53e6134bda026391e986910968a332a290e53c581f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | hydrust-0.5.1-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 |
ea1be4e41b11f01a32dcc74c40095a48d00c937f4129b92803a06dc9472798de
|
|
BLAKE2b-256 checksum How to use checksums |
4f4655c100bb965db76f72a9efb07a8b97247476c65f202446f3cb8dfdbf7512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-macosx_11_0_arm64.whl
| Download URL | hydrust-0.5.1-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 |
7fff53e933213ab58bcd1fa38983a23f5f43977610f352b8c61b4e0dc9b57340
|
|
BLAKE2b-256 checksum How to use checksums |
12fef6643ed2edc0133137cc020efe229bad43f700fa0aea59ea9e3f459022cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.1-py3-none-macosx_10_12_x86_64.whl
| Download URL | hydrust-0.5.1-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 |
c3234999733c96dbe73723eeed6d24976141d231bacfda8585c1b3d211222c50
|
|
BLAKE2b-256 checksum How to use checksums |
a9156b07763c0578a85906378d9e51c08b7569c5793cb0f569edb8ff9d29e62b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|