nethermit

Crates.ionethermit
lib.rsnethermit
version0.1.4
created_at2025-07-08 20:30:40.208242+00
updated_at2025-07-09 16:59:31.809403+00
descriptionA CLI tool to convert Jsonnet to YAML
homepage
repositoryhttps://gitlab.com/ruivieira/nethermit
max_upload_size
id1743518
size109,165
Rui Vieira (ruivieira)

documentation

README

Nethermit

Rust CI

A simple CLI tool to convert Jsonnet files to YAML.

Installation

cargo install --path .

Usage

The tool accepts input either from a file or from standard input:

# Read from a file
nethermit config.jsonnet > output.yaml

# Read from stdin (pipe)
cat config.jsonnet | nethermit > output.yaml

# Read from stdin (explicit)
nethermit - < config.jsonnet > output.yaml

# Read from stdin (interactive)
nethermit
# Type or paste your Jsonnet code
# Press Ctrl+D (Unix) or Ctrl+Z (Windows) to finish

Features

  • Converts Jsonnet files to YAML format
  • Supports standard Jsonnet imports
  • Accepts input from files or stdin
  • Outputs to stdout for easy piping
  • Modular library design with separate lib.rs and main.rs
  • Utility functions for file handling
  • Clean and maintainable code structure with comprehensive test coverage
  • Kubernetes resource management:
    • Deploy resources to Kubernetes clusters
    • List and manage resource sets
    • Delete sets and associated resources
    • ConfigMap-based state tracking

Development

Pre-commit Hooks

This project uses Git pre-commit hooks to ensure code quality. The hooks run:

  • Code formatting checks (cargo fmt)
  • Linting (cargo clippy)
  • Build verification
  • Unit tests

The hooks are automatically installed when you clone the repository. If you need to install them manually:

git config core.hooksPath .githooks

Requirements

  • Rust 1.70 or later
Commit count: 0

cargo fmt