| Crates.io | mon-tools |
| lib.rs | mon-tools |
| version | 0.0.1 |
| created_at | 2025-11-23 16:02:58.053947+00 |
| updated_at | 2025-11-23 16:02:58.053947+00 |
| description | Command-line interface for Mycel Object Notation - a type-safe configuration language |
| homepage | https://mycel-lang.org |
| repository | |
| max_upload_size | |
| id | 1946730 |
| size | 391,621 |
The official command line interface for Mycel Object Notation (MON).
Mycel Object Notation is a modern, type-safe configuration language designed for simplicity and correctness. The MON CLI provides a complete toolchain for working with MON files, including a high-performance parser, a configurable linter, an opinionated formatter, and a multi-format compiler.
For the full language specification and documentation, visit mycel-lang.org.
The MON CLI is a comprehensive toolkit for developers and operations teams managing configuration at scale.
Ensure configuration correctness before deployment. The mon check command performs deep static analysis to catch errors early.
Maintain a consistent code style across your entire project with mon fmt.
.moncfg.mon.Integrate MON into any ecosystem. The mon compile command converts MON files into standard formats consumed by existing applications.
Get started quickly with mon init.
.moncfg.mon file for both linter and formatter settings.Boost productivity with shell autocompletion.
Install from crates.io:
cargo install mon
Or build from source:
cargo install --path .
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3) with a special exception for open-source forks.
In short:
See LICENSE for details and CONTRIBUTING.md for our mission.
For more information, visit mycel-lang.org.
Validate a file and run the linter:
mon check config.mon --lint
Output results as JSON for CI integration:
mon check config.mon --lint --as-json
Format a file in place:
mon fmt config.mon --write
Check if a file is correctly formatted (useful for CI):
mon fmt config.mon --check
Watch a file and format on save:
mon fmt config.mon --watch
Compile MON to JSON:
mon compile config.mon --to json
Compile to YAML:
mon compile config.mon --to yaml
Compile to TOML (handling null values):
mon compile config.mon --to toml --toml-null-value "nil"
Generate comprehensive documentation and schemas:
mon compile config.mon --generate-docs --output-dir ./dist
Initialize a new configuration file:
mon init
Generate shell completions (example for Fish):
mon completions fish > ~/.config/fish/completions/mon.fish
The CLI is configured via a .moncfg.mon file in your project root. It supports detailed configuration for both the linter and formatter.
Example .moncfg.mon:
import { LintConfig } from "mon:types/linter"
import { FormatConfig } from "mon:types/formatter"
{
linter :: LintConfig = {
max_nesting_depth: 5,
warn_unused_anchors: true,
warn_magic_numbers: false,
suggest_type_validation: true
},
formatter :: FormatConfig = {
indent_size: 4,
line_width: 80,
quote_style: "double",
sort_keys: "alpha"
}
}
This project is licensed under the MIT License.
For more information, visit mycel-lang.org.