32 releases (15 breaking)
Uses new Rust 2024
| new 0.18.0 | Apr 1, 2026 |
|---|---|
| 0.17.0 | Mar 28, 2026 |
| 0.16.3 | Mar 18, 2026 |
#901 in Parser implementations
410 downloads per month
Used in 3 crates
3MB
76K
SLoC
agnix-core
Core validation engine for agnix - the agent configuration linter.
This crate provides the parsing, schema validation, and diagnostic generation for agent configurations including Skills, Hooks, MCP servers, Memory files, and Plugins.
Features
- YAML/JSON/TOML/Markdown frontmatter parsing
- Schema validation against documented specifications
- Diagnostic generation with line/column locations
- Support for multiple agent configuration formats
Feature Flags
agnix-core requires std and is not no_std compatible.
| Feature | Default | Description |
|---|---|---|
filesystem |
yes | Adds rayon, ignore, and dirs for parallel validation and directory walking. |
Setting default-features = false removes the file I/O dependencies but still requires std - useful for WASM targets where you supply content directly rather than reading from disk.
Usage
This is a library crate used by agnix-cli. For most users, install the CLI:
cargo install agnix-cli
For programmatic usage:
use agnix_core::{validate_project, LintConfig};
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = LintConfig::default();
let result = validate_project(Path::new("."), &config)?;
println!("checked {} files", result.files_checked);
for diag in result.diagnostics {
println!("{}:{} {} {}", diag.file.display(), diag.line, diag.rule, diag.message);
}
Ok(())
}
For project-level validation across multiple files:
use agnix_core::{validate_project_rules, LintConfig};
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = LintConfig::default();
let result = validate_project_rules(Path::new("."), &config)?;
for diag in result.diagnostics {
println!("{}:{} {} {} {}", diag.file.display(), diag.line, diag.rule, diag.level, diag.message);
}
Ok(())
}
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Dependencies
~7–12MB
~217K SLoC