Enhancing the experience of editing YAML files, especially when dealing with large files or when using Linux editors, can be a challenging task. To address this, we present "config-tui", a minimalist and intuitive Text User Interface (TUI) tool designed specifically for effortless viewing and editing of YAML files. With its clean and user-friendly interface, config-tui simplifies the process, making YAML file manipulation a breeze.
config-tui: where YAML editing gets a friendly and quirky makeover! We make YAML editing an absolute delight :)
- version:
1.2.5
- [2023-06-13]
python >= 3.9
pip >= 20.0.0
- Copy the folder config-tui to desired folder
- Install pip dependencies:
pip install -r requirements.txt
python config-tui.py -i [yaml-file-to-be-edited]
- Run this command for more details:
python config-tui.py -h
- Tested on:
- Windows
- Linux
- Edit and Save YAML file
- Ability to search within tree
- Add / remove new items in the yaml
- Preserve comments in the yaml
- Add Word wrap to edit long values
- Maintain positions when keys are edited
- Add support for various configuration types.
- Currently supports yaml, json and works for toml, ini or any configuration which can be loaded as json
Cannot preserve comments or any decorators on saving a yaml file.Fixed in v1.2
- Prudhvi Ch
- By default, ConfigTUI has the ability to infer data types and do type conversions. It can be overridden by passing
--enable-strict-data-types
as a CLI option - By default, ConfigTUI does not allow to edit key of a nested value. It can be overridden by passing
--edit-dict-keys
as a CLI option - For inferring any value as string explicitly, encapsule the value in quotes while modifying
Warning As of v1.2, ConfigTUI can preserve comments but it is not 100% accurate.
Below are some other tools which I explored and their reason of rejection:
- pyfx: only view and is limited to linux
- config-suite: requires defining yaml schema which is not properly documented
- npyscreen: no proper documentation
- urwid: does not work with windows
- curses: requires very minute level coding even for a trivial task
- gum: wonderful tool but not suited for json/yaml trees
- tson: no longer maintained and requires golang installation
The choice is Textual which is a rapidly growing popular framework for building TUI apps. Textual adds interactivity to Rich with is an API inspired by modern web development.