![]() |
decpkg — python script allows you to manage packages declarative images following the. declarative programming paradigm. |
~> Example
~> Dependencies
~> Install
python — to start the interpreter
pyinstaller— to create a binary file for better speed
output.mp4
I opened the terminal and then ran
decpkg -gto generate the configuration file.
After that, a prompt appeared asking for confirmation with ay/nchoice. This prompt
appears if a configuration file already exists, and it asks whether to overwrite the
existing configuration. I pressednto avoid overwriting the config.
Next, I opened the file manager yazi and navigated to the path
~/.config/declarative_package/.
There, I openedconfig.jsonc, and now I can edit the configuration file.
You can see an example in the video.
output.mp4
Note: Absolute mode is enabled, which means absolute synchronization.
During synchronization, all currently installed packages from the official
repositories (pacman) and the AUR are recorded into a.history.jsonfile
located in the configuration directory. This list is stored as the current state base.
If during the next synchronization a package is missing from the configuration file
but present in the base, it will be removed from the system.
This enforces strict alignment between the system and the declared configuration.
Note: Relative synchronization mode is also available.
In this mode, packages defined in the configuration will be installed,
but removal of packages must be done manually using standard tools,
such aspacman -Rns <package>.
This mode offers a more flexible and familiar workflow for users who prefer
to handle uninstalls themselves.
The
-aflag allows you to select which AUR helper to use for installing packages.
You can choose betweenparuoryay, depending on your preference or system setup.
This makes it easy to manage AUR packages with your preferred tool.
You can set your favorite AUR helper directly in the configuration file.
Once defined, all AUR-related installations will use the following pattern:
<aur helper> -Sa <package>— ensuring that packages are installed strictly from the AUR.
This gives you full control over which tool handles your AUR operations.
In the configuration file, you can specify which tool should be used to gain superuser access —
eithersudoordoas.
This setting ensures compatibility with your system’s preferred privilege escalation method.
More detailed configuration options are defined directly in the config file itself.
You can explore all available fields and examples by opening the configuration file:
config.jsonc
<helper> -S decpkggit clone https://maarutan/decpkg.git ~/decpkg.git
cd ~/decpkg.git
makepkg -si
This project is licensed under the MIT License You are free to use, modify, and distribute this software with proper attribution.
