#config-file #save #default #file-manager #gim

gim-config

Configuration file manager library for GIM applications

6 releases (1 stable)

Uses new Rust 2024

1.0.0 Aug 1, 2025
0.5.0 Jun 29, 2025
0.4.0 Jun 25, 2025
0.3.0 May 21, 2025
0.1.0 May 19, 2025

#537 in Configuration

Download history 126/week @ 2025-05-22 3/week @ 2025-05-29 1/week @ 2025-06-05 1/week @ 2025-06-12 85/week @ 2025-06-19 199/week @ 2025-06-26 17/week @ 2025-07-03 5/week @ 2025-07-10 126/week @ 2025-07-31 1/week @ 2025-08-07

503 downloads per month
Used in git-intelligence-message

MIT license

11KB
164 lines

gim-config

A configuration management library for GIM applications

Features

  • Load and save configuration in TOML format
  • Automatic creation of default configuration file
  • Configuration file located in ~/.config/gim/config.toml

Usage

Add this to your Cargo.toml:

[dependencies]
gim-config = "0.1.0"

Example code:

use gim_config;

fn main() {
    // Load config
    let config = gim_config::get_config_into().unwrap();
    
    // Modify config
    let mut config = config.clone();
    config["ai"]["model"] = toml::Value::String("gpt-4".to_string());
    
    // Save config
    gim_config::save_config(&config);
}

License

MIT

Dependencies

~0.5–3MB
~58K SLoC