2025-12-24 12:56:51 +02:00
# curator - A Home-Manager Like Tool for Universal Blue builds
2025-11-19 22:42:28 +05:30
2025-12-24 12:56:51 +02:00
A lightweight CLI that provides repository and dotfile management and package installation functionality through a centralized TOML configuration. Ported and expanded from [forge ](https://github.com/ijadux2/forge ) and inspired by [home-manager ](https://github.com/nix-community/home-manager/ ).
2025-11-19 22:42:28 +05:30
## Overview
2025-12-24 08:54:24 +02:00
curator is a Python CLI that helps you manage your Fedora system configuration by:
2025-11-21 20:22:02 +05:30
- Managing COPR repositories (enable/disable automatically)
2025-12-24 12:56:51 +02:00
- Installing and managing system packages via `dnf` or `rpm-ostree`
- Installing and managing userspace packages via `brew` , `flatpak` , or `nix`
2025-11-21 19:45:32 +05:30
- Managing dotfiles through symlinks to actual files
2025-12-24 08:54:24 +02:00
- Centralized configuration via a single `inventory.toml` file
2025-12-24 12:56:51 +02:00
- Declarative user-level configuration similar to `home-manager` /`nixos`
2025-11-21 19:45:32 +05:30
- Automatic backup of existing files before replacement
2025-11-19 22:42:28 +05:30
## Installation
2025-12-24 12:56:51 +02:00
Install the CLI directly from GitHub with [uv ](https://github.com/astral-sh/uv ):
```bash
uv tool install --from git+https://codeberg.org/randogoth/curator/ curator
```
2025-11-19 22:42:28 +05:30
## Quick Start
```bash
# Initialize the configuration structure
2025-12-24 12:56:51 +02:00
curator init
2025-11-19 22:42:28 +05:30
2025-11-21 19:45:32 +05:30
# Edit the configuration file to add packages and dotfiles
2025-12-24 08:54:24 +02:00
nano ~/.config/curator/inventory.toml
2025-11-19 22:42:28 +05:30
# Apply configuration
2025-12-24 12:56:51 +02:00
curator switch
2025-11-21 19:45:32 +05:30
# Check status
2025-12-24 12:56:51 +02:00
curator status
2025-11-19 22:42:28 +05:30
```
## Commands
### `init`
2025-12-24 08:54:24 +02:00
Initialize the configuration structure and create `inventory.toml` .
2025-11-19 22:42:28 +05:30
```bash
2025-12-24 12:56:51 +02:00
curator init
2025-12-24 08:54:24 +02:00
# or ./curator init
2025-11-19 22:42:28 +05:30
```
Creates:
2025-12-24 08:54:24 +02:00
- `~/.config/curator/` - Main configuration directory
- `~/.config/curator/inventory.toml` - Central configuration file
2025-11-19 22:42:28 +05:30
### `switch`
2025-12-24 08:54:24 +02:00
Apply the current configuration (enable COPR, install packages, deploy dotfiles). Use `--rollback` to restore the previous `inventory.toml` snapshot before applying.
2025-11-19 22:42:28 +05:30
```bash
2025-12-24 12:56:51 +02:00
curator switch
2025-12-24 08:54:24 +02:00
# or ./curator switch
# rollback to the previous inventory.toml and apply it
2025-12-24 12:56:51 +02:00
curator switch --rollback
2025-11-19 22:42:28 +05:30
```
This command:
2025-12-24 08:54:24 +02:00
1. Enables all COPR repositories listed in `inventory.toml`
2025-11-21 20:22:02 +05:30
2. Disables COPR repositories that are no longer configured
2025-12-24 08:54:24 +02:00
3. Installs all packages listed in `inventory.toml`
2025-11-21 20:22:02 +05:30
4. Creates symlinks for all configured dotfiles
2026-01-01 20:21:38 +02:00
5. Applies environment variables to `~/.config/environment.d/20-curator.conf` and imports them into the user session
6. Creates backups of existing files before replacing them
7. Updates the last switch timestamp
2025-11-19 22:42:28 +05:30
### `status`
2025-11-21 19:45:32 +05:30
Show current configuration status and information.
2025-11-19 22:42:28 +05:30
```bash
2025-12-24 12:56:51 +02:00
curator status
2025-12-24 08:54:24 +02:00
# or ./curator status
2025-11-19 22:42:28 +05:30
```
Displays:
- Configuration directory paths
- Last switch timestamp
2025-11-21 20:22:02 +05:30
- List of configured COPR repositories, packages and dotfiles
2025-11-19 22:42:28 +05:30
### `help`
Show help message with all available commands.
```bash
2025-12-24 12:56:51 +02:00
curator help
2025-12-24 08:54:24 +02:00
# or ./curator help
2025-11-19 22:42:28 +05:30
```
2025-12-24 12:56:51 +02:00
### `from`
Import currently installed packages/repos for a manager into `inventory.toml` so curator can manage them.
```bash
curator from dnf
curator from brew
curator from flatpak
curator from rpm-ostree
curator from nix
curator from copr
```
### `add` / `remove`
Add or remove entries directly in `inventory.toml` using `section:value` pairs. Supports `dnf` , `brew` , `flatpak` , `rpm-ostree` , `nix` , and `copr` .
```bash
curator add dnf:uv nix:micro
curator remove dnf:curl flatpak:org.mozilla.firefox
```
### `reset`
Remove the rollback snapshot (`inventory.toml.rollback` ).
```bash
curator reset
```
2026-01-01 20:21:38 +02:00
### `env`
Apply environment variables defined in `[variables]` and propagate them to systemd/DBus. For your current shell, run:
```bash
curator env
# then, to update this shell:
eval "$(curator env --eval)"
```
2025-11-21 19:45:32 +05:30
## Configuration
2025-12-24 08:54:24 +02:00
### inventory.toml
The central configuration file located at `~/.config/curator/inventory.toml` :
2025-11-19 22:42:28 +05:30
2025-11-20 17:17:08 +05:30
```toml
2025-12-24 08:54:24 +02:00
# curator Configuration File
2025-11-21 19:45:32 +05:30
# User-level configuration similar to home-manager/nixos
2025-12-24 08:54:24 +02:00
[curator]
2025-11-21 19:45:32 +05:30
version = "1.0"
2025-12-24 07:56:11 +02:00
last_switch = ""
2025-11-21 19:45:32 +05:30
2025-12-24 08:54:24 +02:00
[copr]
# copr.fedorainfracloud.org/username/repository
# copr.fedorainfracloud.org/anotheruser/anotherrepo
[dnf]
# git
# vim
# curl
# wget
[brew]
# wget
# coreutils
[flatpak]
# org.mozilla.firefox
# com.spotify.Client
[rpm-ostree]
# podman
# htop
[nix]
# nixpkgs#git # or just "git" (curator will prefix nixpkgs#)
# nixpkgs#htop # or just "htop"
2026-01-01 20:21:38 +02:00
[variables]
# ENV_VAR = "value"
# ANOTHER = "another value"
2025-11-21 19:45:32 +05:30
[dotfiles]
# Dotfiles to manage with symlinks
# Format: "target_path" = "source_path"
# target_path: where the symlink should be created (relative to home directory)
2025-12-19 20:13:03 +05:30
# source_path: where the actual file is stored (relative to dotfiles directory)
".bashrc" = ".bashrc"
".config/vimrc" = "vimrc"
".config/alacritty/alacritty.yml" = "alacritty.yml"
2025-11-21 19:45:32 +05:30
[options]
# Additional options
backup = true
backup_dir = "backup"
```
### Configuration Sections
2025-12-24 08:54:24 +02:00
#### `[curator]`
2025-11-21 19:45:32 +05:30
- `version` : Configuration file version
- `last_switch` : Timestamp of last switch operation (auto-updated)
2025-12-24 08:54:24 +02:00
#### `[copr]`
List of COPR repositories to enable via `dnf copr enable` . **One repository per line** —presence means enable, absence means don't enable.
2025-11-21 20:22:02 +05:30
**Examples:**
```toml
2025-12-24 08:54:24 +02:00
[copr]
copr.fedorainfracloud.org/username/repository
copr.fedorainfracloud.org/anotheruser/anotherrepo
2025-11-21 20:22:02 +05:30
```
2025-12-24 08:54:24 +02:00
To remove a COPR repository, simply delete the line containing the repository name. curator will automatically disable it during the next switch.
2025-11-21 20:22:02 +05:30
2025-12-24 08:54:24 +02:00
#### `[dnf]`
List of packages to install via dnf. **One package per line** —presence means install, absence means don't install.
2025-11-21 20:01:07 +05:30
**Examples:**
```toml
2025-12-24 08:54:24 +02:00
[dnf]
git
vim
curl
wget
nodejs
npm
2025-11-21 20:01:07 +05:30
```
To remove a package, simply delete the line containing the package name.
2025-11-21 19:45:32 +05:30
2025-12-24 08:54:24 +02:00
#### `[brew]`
List of packages to install via Homebrew. **One package per line** —presence means install.
#### `[flatpak]`
List of Flatpak refs to install. **One ref per line** —presence means install.
2025-12-24 12:56:51 +02:00
#### `[rpm-ostree]`
List of rpm-ostree layered packages. **One package per line** —presence means install.
#### `[nix]`
List of nix packages. **One package per line** —presence means install. You can specify plain names (e.g., `neovim` ) or `nixpkgs#name` ; curator will prefix `nixpkgs#` for installs and use the base name for removals.
2026-01-01 20:21:38 +02:00
#### `[variables]`
User environment variables to set via systemd `environment.d` . curator writes them to `~/.config/environment.d/20-curator.conf` during `curator switch` ; new sessions will load them automatically.
**Examples:**
```toml
[variables]
EDITOR = "nvim"
PAGER = "less -R"
```
Notes:
- Values are imported into the user systemd and DBus environments during `curator switch` or `curator env` .
- To update a currently running shell, run `eval "$(curator env --eval)"` after applying.
- Later shell init files (e.g., `.bashrc` , `.zshrc` ) can still override these values.
2025-11-21 19:45:32 +05:30
#### `[dotfiles]`
Dotfile mappings using symlinks:
- **Key**: Target path where symlink should be created (relative to home directory)
2025-12-19 20:13:03 +05:30
- **Value**: Source path where actual file is stored (relative to dotfiles directory)
- Note: Source path automatically prefixed with "dotfiles/" if not present
2025-11-21 19:45:32 +05:30
#### `[options]`
Additional configuration options:
- `backup` : Enable/disable backup of existing files (default: true)
2025-12-24 08:54:24 +02:00
- `backup_dir` : Directory name for backups (relative to curator directory)
2025-11-19 22:42:28 +05:30
2025-11-21 19:45:32 +05:30
## File Structure
2025-11-19 22:42:28 +05:30
```
2025-12-24 08:54:24 +02:00
~/.config/curator/
├── inventory.toml # Main configuration file
2025-11-21 19:45:32 +05:30
├── dotfiles/ # Your actual dotfiles (source files)
│ ├── .bashrc
│ ├── vimrc
│ └── alacritty.yml
└── backup/ # Backups of replaced files
├── .bashrc.20231121_143022.bak
└── vimrc.20231121_143022.bak
2025-11-19 22:42:28 +05:30
```
2025-11-21 19:45:32 +05:30
## Environment Variables
2025-11-19 22:42:28 +05:30
2026-01-01 20:21:38 +02:00
- `CURATOR_DIR` : Override the default configuration directory (default: `~/.config/curator` )