Skip to main content

Crate jkconfig

Crate jkconfig 

Source
Expand description

§jkconfig

A Ratatui-based TUI component library for JSON Schema configuration.

JKConfig automatically generates interactive terminal forms from JSON Schema definitions, making configuration management intuitive and error-free.

§Features

  • Beautiful TUI interface built with Ratatui
  • JSON Schema driven UI generation (Draft 2020-12)
  • Support for multiple data types: String, Integer, Number, Boolean, Enum, Array, Object, OneOf
  • Multi-format support: TOML and JSON configuration files
  • Keyboard shortcuts with Vim-like keybindings
  • Real-time type validation based on schema constraints
  • Automatic backup before saving changes

§Quick Start

use jkconfig::data::{AppState, ConfigDocument};

// Load configuration with schema
let document = ConfigDocument::new(
    Some("config.toml"),
    Some("config-schema.json")
).unwrap();
let app_state = AppState::new(document);

// Access the configuration tree
let json_value = app_state.document.as_json();

§Modules

  • data - Configuration data structures and schema parsing
  • [run] - TUI application runner
  • ui - UI components and editors
  • web - Web server module (requires web feature)

Re-exports§

pub use run::*;

Modules§

data
Configuration data structures and schema parsing.
run
TUI application runner and main entry points.
ui
UI components and editors for different data types.
web
Web server module for remote configuration editing.

Enums§

Value
Represents any valid JSON value.