rename + final ui design
All checks were successful
Version Check / check-version (pull_request) Successful in 2s

This commit is contained in:
2026-03-16 17:41:22 +01:00
parent 253c69363d
commit a274938368
8 changed files with 131 additions and 90 deletions

View File

@@ -1,13 +1,16 @@
# cenv-rs
# mould
cenv-rs is a Rust-based Terminal User Interface (TUI) tool designed to help developers interactively generate `.env` files from `.env.example` templates. With a focus on speed and usability, it features Vim-like keybindings and out-of-the-box support for theming, defaulting to the Catppuccin Mocha palette.
mould is a modern Terminal User Interface (TUI) tool designed for interactively generating and editing configuration files from templates. Whether you are setting up a `.env` file from an example, creating a `docker-compose.override.yml`, or editing nested `JSON`, `YAML`, or `TOML` configurations, mould provides a fast, Vim-inspired workflow to get your environment ready.
## Features
- Parse `.env.example` files to extract keys, default values, and comments.
- Vim-like keybindings for quick navigation and editing.
- Built-in theming support with Catppuccin Mocha as the default.
- Configurable through a standard TOML file.
- **Universal Format Support**: Handle `.env`, `JSON`, `YAML`, and `TOML` seamlessly.
- **Hierarchical Flattening**: Edit nested data structures (JSON, YAML, TOML) in a flat, searchable list.
- **Docker Compose Integration**: Automatically generate `docker-compose.override.yml` from `docker-compose.yml`.
- **Vim-inspired Workflow**: Navigate with `j`/`k`, edit with `i`, and save with `:w`.
- **Modern UI**: A polished, rounded interface featuring the Catppuccin Mocha palette.
- **Highly Configurable**: Customize keybindings and themes via a simple TOML configuration.
- **Dynamic Alignment**: Automatically aligns keys and values for perfect vertical readability.
## Installation
@@ -21,41 +24,54 @@ Alternatively, you can build from source:
```sh
git clone <repository_url>
cd cenv-rs
cd mould
cargo build --release
```
The binary will be installed as `mould`.
## Usage
Navigate to a directory containing a `.env.example` file and run:
Provide an input template file to start editing:
```sh
cenv-rs
mould .env.example
mould docker-compose.yml
mould config.template.json -o config.json
```
### Keybindings
### Keybindings (Default)
- **Normal Mode**
- `j` / `Down`: Move selection down
- `k` / `Up`: Move selection up
- `i`: Edit the value of the currently selected key (Enter Insert Mode)
- `:w` or `Enter`: Save the current configuration to `.env`
- `q` or `:q`: Quit the application without saving
- `Esc`: Clear current prompt or return from actions
- `:w` or `Enter`: Save the current configuration to the output file
- `:q` or `q`: Quit the application
- `:wq`: Save and quit
- `Esc`: Clear current command prompt
- **Insert Mode**
- Type your value for the selected key.
- `Esc`: Return to Normal Mode
- Arrow keys: Navigate within the input field
- `Enter` / `Esc`: Commit the value and return to Normal Mode
## Configuration
cenv-rs can be configured using a `config.toml` file located in your user configuration directory (e.g., `~/.config/cenv-rs/config.toml` on Linux/macOS).
mould can be configured using a `config.toml` file located in your user configuration directory (e.g., `~/.config/mould/config.toml` on Linux/macOS).
Example configuration:
```toml
[keybinds]
down = "j"
up = "k"
edit = "i"
save = ":w"
quit = ":q"
normal_mode = "Esc"
[theme]
# Default theme is "catppuccin_mocha"
name = "catppuccin_mocha"
```