__ __ ______ __ ____ _ __ __
| \/ |/ ___\ \/ / | _ \ __ _ ___| | ____ _ __ _ ___ | \/ | __ _ _ __ __ _ __ _ ___ _ __
| |\/| | | \ / | |_) / _` |/ __| |/ / _` |/ _` |/ _ \ | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
| | | | |___ / \ | __/ (_| | (__| < (_| | (_| | __/ | | | | (_| | | | | (_| | (_| | __/ |
|_| |_|\____/_/\_\ |_| \__,_|\___|_|\_\__,_|\__, |\___| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|___/ |___/
MCX is a Rust-based package manager engine for Cudane Linux. It manages package installation, removal, dependency resolution, system profile reconciliation, and repository metadata using a lightweight JSON-backed state layer and async networking, provides a neutral package lifecycle runtime for Cudane Linux by:
- resolving package dependencies with a topological solver
- downloading package archives over HTTP
- verifying archive integrity before installation
- staging and extracting payloads safely
- persisting package state and history in JSON
- reconciling a declared system profile with the installed package set
src/main.rs— CLI entrypoint and subcommand routingsrc/commands/— implementation of install, remove, search, update, upgrade, query, clean, verify, fix, config, history, and build commandssrc/core/— package database, dependency solver, transaction history, changelog, and declarative profile handlingsrc/archive/— archive extraction and collision detectionsrc/network/— HTTP downloader with sequential and ranged chunked downloadssrc/utils/ui.rs— terminal output helpers and progress renderingCargo.toml— build metadata, runtime dependencies, and release optimizations
MCX stores registry and package state under the configured root path:
var/lib/mcx/local.json— installed and available package metadatavar/lib/mcx/history.jsonl— transaction history journalvar/cache/mcx— downloaded package archivesvar/tmp/mcx/stage— extraction staging area
Package metadata includes package name, version, license, source URL, checksum data, dependency list, file manifest, provides, and conflicts.
The dependency solver:
- loads package manifests from the local database
- resolves recursive package dependencies
- supports virtual providers via
provides - detects cyclic dependency loops
- verifies conflict constraints before install planning
- produces a topologically ordered install plan
Install and remove actions are wrapped in transactions that:
- back up files before overwriting them
- record staged file paths
- track affected packages
- commit JSON state only after successful completion
- rollback automatically if a transaction is dropped without committing
This design reduces the risk of partial or inconsistent package installations.
This is a complete user guide for the MCX modular and standalone package manager for the Cudane distribution, covering all aspects of system administration, from handling local packages generated by the rLine build tool to repository maintenance and core system performance management.
Note
MCX does not require typing sudo, it's prompts for the password automatically.
Since the packaging system relies on the Zstd-compressed, high-performance, standalone package format, you can manage and install manually built packages as follows:
When you build a package using rline and produce a file with the .xcs extension, you can install it directly into the system using the following command:
mcx -a /path/to/package.xcsHow it works: MCX decompresses the archive using the Zstd engine, reads
metadata.json, and then dynamically checks and lists the package files to register them in the system database before integrating them into the system root.
MCX allows you to interact with official Cudane distribution repositories or external repositories to fetch, update, and clean the system.
To update the list of available packages and link dependencies to the latest updates from the servers:
mcx -uTo install one or more programmatically processed packages from the catalog:
mcx -i <package_name>Or install multiple packages at once:
mcx -i <package1> <package2> <package3>To check for changes and update all installed packages to the latest build environment output:
mcx -UTo cleanly uninstall packages; MCX relies on a dynamically generated file array during installation to completely delete files without leaving any residual files:
mcx -r <package_name>To view details of a specific package, check if it is installed, and review its logs:
mcx -q <package_name>To search local and external repositories for a specific package:
mcx -s <query>To compare current system files with the digital fingerprint and checksum stored in the database (to ensure no corruption or unauthorized modification has occurred):
mcx -vTo open a fast, built-in text editor (similar to GNU Nano) To modify the main MCX configuration file without an external editor:
mcx -CCtrl+O: To save changes and write the file to disk. Ctrl+X: To exit and return to the terminal.
To clean up the system and free up space by clearing the cache and old installation logs:
mcx -cHow it works: Emptys the Binary Footprint cache folders in
var/cache/mcxand rebuilds clean logs for future transactions.
If hyperlinks for libraries or workspaces become corrupted, this command automatically repairs them:
mcx -fMCX has a hierarchical tracking system that protects the Cudane distribution from crashing in case of an interrupted or failed installation.
To view the history of previous operations to see when and how packages were installed:
mcx -hTo roll back the entire system to a specific point in time or generation and restore the system to its previous state:
mcx -h --rollback <generation_id>You can build a minimal distributions based on your own configuration(s)
To completely rebuild the system based on a central configuration file (such as Cudane's core settings):
mcx -b --config /path/to/config.jsonNote
Default path if not specified: /etc/cudane/system.json
- MCX automatically creates a lock in the path
/var/lib/mcx/lockwhen any process starts to prevent database conflicts. If the program is interrupted using Ctrl+C, the engine automatically removes the lock to prevent subsequent operations from freezing. - All package extraction and metadata.json file checks are performed within a temporary, isolated environment in
var/tmp/mcx/stage/to ensure that live system files are not affected until the check is successful and the correct checksum is met.
MCX can reconcile the installed package set against a declarative JSON profile.
Example:
{
"version": "1.0",
"architecture": "x86_64",
"packages": ["foo", "bar", "baz"]
}The build command installs missing packages and removes packages not declared in the profile.
Build the project with cargo:
cargo build --releaseRun the compiled binary:
./target/release/mcx install fooUse a custom root path:
./target/release/mcx --root /tmp/mcx-root install foo- The implementation is written in Rust and uses
tokiofor async operations. - Package state is managed in JSON and persisted under the configured root.
- The downloader supports both sequential downloads and ranged chunked downloads for larger files.
- The configuration editor module provides a TUI editor implementation, though
mcx configcurrently reports configuration state. - Some CLI commands currently act as workflow scaffolding or simulated progress UI while the core install/remove logic is fully implemented.
To extend MCX or add new features, start with these files:
src/main.rssrc/commands/*.rssrc/core/database.rssrc/core/solver.rssrc/network/download.rssrc/archive/extract.rssrc/utils/ui.rs
For bug reports or feature requests, open an issue in the repository.
Myden - Cudane & MCX Founder. | Made with 🤍 and Rust.