7 unstable releases (3 breaking)
Uses new Rust 2024
| new 0.4.0 | May 13, 2026 |
|---|---|
| 0.3.2 | Apr 28, 2026 |
| 0.2.0 | Apr 25, 2026 |
| 0.1.1 | Mar 24, 2026 |
#43 in Configuration
190KB
5K
SLoC
Uplare
A CLI to easily and accurately keep track of installed software.
Installation
cargo install
cargo install uplare
cargo install from Git
cargo install --git https://github.com/nihaals/uplare
cargo binstall
cargo binstall uplare
GitHub Releases
There are pre-compiled binaries available with GitHub Releases. For example:
wget -O uplare "https://github.com/nihaals/uplare/releases/latest/download/uplare-cli-aarch64-apple-darwin"
chmod +x uplare
./uplare --help
Getting started
macOS
- Install Pkl
- Create
mac.pkl:
// Replace with version from `uplare --version`
amends "package://github.com/nihaals/uplare/releases/download/v0.0.0/[email protected]#/MacOs.pkl"
// Optional, only needed if you use `files`
import "package://github.com/nihaals/uplare/releases/download/v0.0.0/[email protected]#/FileCheck.pkl"
mac {
homebrew = new Homebrew {
explicitlyInstalledFormulae {
"ffmpeg"
}
nonAppCasks {
"font-fira-code"
}
}
apps {
new ManualApp {
name = "Wolfram"
appPaths {
"/Applications/Wolfram.app"
}
}
new HomebrewCask {
caskName = "visual-studio-code"
appPaths {
"/Applications/Visual Studio Code.app"
}
}
new MacAppStoreApp {
appStoreId = 497799835
appPaths {
"/Applications/Xcode.app"
}
}
}
files {
new FileCheck.FileContainsStrings {
path = "/etc/hosts"
substrings = new {
"127.0.0.1"
"::1"
}
}
}
}
- Run
pkl eval mac.pkl | uplare diff macos /dev/stdin - Run
uplare --help
SteamOS
- Install Pkl
- Create
deck.pkl:
// Replace with version from `uplare --version`
amends "package://github.com/nihaals/uplare/releases/download/v0.0.0/[email protected]#/SteamOs.pkl"
// Optional, only needed if you use `files`
import "package://github.com/nihaals/uplare/releases/download/v0.0.0/[email protected]#/FileCheck.pkl"
steamOs {
hostname = "my-device"
steamOsSettings {
steamDeveloperMode = true
chargeLimit = 80
}
steamSettings {
twentyFourHourClock = true
signIntoFriends = false
}
installedFlatpaks {
"org.mozilla.firefox"
"com.github.Matoking.protontricks"
}
decky = new Decky {
settings {
updateChannel = "stable"
storeChannel = "default"
deckyUpdateNotification = true
pluginUpdateNotification = true
developerMode = true
}
plugins {
new { name = "Brightness Bar" }
new {
name = "HLTB for Deck"
disabled = true
}
}
}
enabledSystemdUnits {
"sshd.service"
"plugin_loader.service"
}
desktop = new Listing {
"Return.desktop"
"steam.desktop"
}
kdePlasmaDock = new Listing {
"applications:systemsettings.desktop"
"applications:org.kde.discover.desktop"
"preferred://filemanager"
"preferred://browser"
}
files {
new FileCheck.FileContainsStrings {
path = "/etc/hosts"
substrings = new {
"127.0.0.1"
"::1"
}
}
}
}
- Run
pkl eval deck.pkl | uplare diff steamos /dev/stdin - Run
uplare --help
Supported properties
While there's no official documentation site yet, you can refer to the Pkl module or the Rust serde types for the platform you are using. There are also Pkl examples.
Referencing Uplare in Pkl
You may prefer to create a PklProject so you can reference Uplare's Pkl modules more easily:
amends "pkl:Project"
dependencies {
["uplare"] {
// Replace with version from `uplare --version`
local version = "0.0.0"
uri = "package://github.com/nihaals/uplare/releases/download/v\(version)/uplare-pkl@\(version)"
}
}
Which can be referenced like so:
amends "@uplare/MacOs.pkl"
Note: You'll need to run pkl project resolve as suggested by Pkl before this works.
Running without Pkl
If you would like to run uplare on a system without pkl installed, you can:
- Run
pkl evalon another machine and copy the JSON or simply pipe it over SSH (e.g.pkl eval deck.pkl | ssh deck 'uplare diff steamos /dev/stdin') - Avoid Pkl entirely and create the system config JSON yourself by using the Pkl modules and
serdetypes as reference or runningpkl evalon examples- While Pkl is the only official way of generating a system config's JSON, validation is implemented for both the Pkl modules and in the CLI and there are tests to help avoid drift between the two
Dependencies
~9–12MB
~224K SLoC