Skip to main content

flk/
lib.rs

1//! # flk - Core Library
2//!
3//! This crate provides the core functionality for the `flk` CLI tool, which manages
4//! Nix flake-based development environments.
5//!
6//! ## Modules
7//!
8//! - [`flake`] - Flake file generation, parsing, and manipulation
9//!   - [`flake::generator`] - Template-based flake generation
10//!   - [`flake::parsers`] - Nom-based parsers for Nix file sections
11//!   - [`flake::interfaces`] - Data structures representing flake components
12//!   - [`flake::nix_render`] - Safe Nix string/attribute rendering
13//!
14//! - [`utils`] - Shared utilities
15//!   - [`utils::backup`] - Lock file backup and restore functionality
16//!   - [`utils::visual`] - Terminal output formatting and progress indicators
17//!
18//! ## Example
19//!
20//! ```rust,ignore
21//! use flk::flake::parsers::flake::parse_flake;
22//! use flk::flake::generator::generate_flake;
23//!
24//! // Parse an existing flake configuration
25//! let config = parse_flake("flake.nix")?;
26//!
27//! // Generate a new profile template
28//! let rust_profile = generate_flake("rust")?;
29//! ```
30
31pub mod flake;
32pub mod utils;