Skip to content

razkar-studio/centipm

Repository files navigation

CentiPM

A compact, standalone package, no, binary, wait, now it's an executable artifact manager.


Disclaimer(s)

  • CentiPM is currently in very early development.

  • CentiPM (currently) is only tested on Linux, and may not work properly on other platforms.

  • If you encounter instructions that say they use Python 3.14, that's because it's my working Python version, but if it works with something below, please let me know, so I can update the documentation and lower the required Python version.

  • CentiPM only accepts standalone executable artifacts. You cannot put an archive and expect it works. That is not how binary/executable managers work, though I am working on adding archive support.

  • I am working on adding support for stuff on the To-do List, do keep in mind that I am a solo developer and I am doing this in my free time.

  • CentiPM is not affiliated with any other package manager or registry.

  • CentiPM is not intended to replace existing package managers (but you totally can).

Why You Should Use CentiPM

Honestly, you shouldn't, at least not yet. CentiPM is in very early development, and it is more of a learning project for me to practice and have fun coding. If this project turns out the way I hope it will, then it may be a good alternative. Stay tuned.

Installation

Supported Platforms

CENTIPM IS ONLY TESTED ON LINUX!

  • Linux (tested on CachyOS, aka my distro that I coded this on, but should work on any modern Linux distro)
  • macOS (untested, but should work as long as Python ~3.14 is installed, and because it's very similar to Linux (.sh scripts should work fine))

Unsupported Platforms (experimental)

  • Windows: untested, very experimental and may not work at all, but should work in theory with Python ~3.14, and because it's just downloading binaries, it should be able to download .exe files, but Paths are a bit messy. Though some binaries on the registry may not have Windows support, do not submit an issue to this repository, submit it to the registry repository instead.

1. Releases

Go to the Releases page (if it exists yet), and download the attached binary or the source code.

Attached Binary

Run this command:

chmod +x <path-to-centipm-binary>

From there, you can rename the binary to centipm for easier use, and move it to a directory in your PATH (e.g. /usr/local/bin on Linux). If you're a little weewee here's the command for that:

mv <path-to-centipm-binary> /usr/local/bin/centipm

Source Code

Unzip the source code, and run pip install . in the root directory. This will install the centipm command globally, and you can run it from anywhere.

BEWARE: Look the warning below in the Build from Source section, as the update-self command may not work properly if you install using this method.

2. Build from source

Clone this github repository,

git clone https://github.com/tyydev1/centipm.git
cd centipm

Then run pip install . in the root directory. This will install the centipm command globally, and you can run it from anywhere.

BEWARE: The update-self command may not work properly if you install using this method. I highly recommend using the attached binary from the releases page if you want to use the update-self command, as it is designed to update the binary itself, and the releases still show pre-release versions, so you can still get the latest features and updates without having to build from source.

Usage

Run centipm --help to see the available commands and options. The most basic usage is centipm install <package>, which will install a package from the registry. You can also run centipm update to upgrade all installed packages, or centipm update --package <package> to upgrade a specific package.

To put all your binaries to PATH (though I don't recommend this, you can just use the centipm run <package> command), you can add the following line to your shell configuration file (e.g. ~/.bashrc or ~/.zshrc):

export PATH="$HOME/.centipm/bin:$PATH"

List of available and planned commands (checkmarked means complete):

  • install <package>: Installs a package from the registry.
  • update [--package <package>]: Upgrades all installed packages or a specific package if --package is provided.
  • view: Lists all installed packages.
  • registry: Shows the registry URL,
  • config: Shows the config file path.
  • remove <package>: Uninstalls a package.
  • search <query>: Searches for packages in the registry matching the query.
  • run <package> [args...]: Runs the binary of the specified package with optional arguments.
  • registry add <registry_url>: Adds a new registry URL to the config file.
  • registry remove <registry_url>: Removes a registry URL from the config file
  • registry list: Lists all registry URLs in the config file.
  • update-self: Updates CentiPM itself to the latest version.
  • changelog: Shows the changelog of the latest version.
  • info: Shows detailed package info from the registry or offline.
  • doctor: Checks the health of your installation. Verify existing binaries, check if valid configurations, registry is reachable.
  • --silent and --dry-run flags throughout.

Adding your own registries

By default, CentiPM uses a registry hosted at a GitHub repo. However, you can add your own registries by modifying the config.toml file located in the CentiPM configuration directory (default at ~/.centipm/config.toml).

NOTICE: The registry in this repository has been deleted. The default is now The Dime/CentiPM Registry.

Your registry URL should point to a .toml file that follows the same format as the default registry. Once you've added your registry URL to the config file, CentiPM will fetch packages from it during installation and upgrades, just like that.

Registry Fields

Read the comments in the default registries.toml file for a guide on the required fields and format for adding packages to your registry.

Security Warning

The SHA256 field has been added to version 0.3.0 and above. This adds a tiny layer of protection. Still, attackers can hash-match, or upload a harmful software with a legit SHA256 sum, so use trusted registers only and be careful when installing software on the internet.

It is recommended to just use the default registry (Dime/CentiPM Registry), as it is maintained by me and I will try my best to ensure that it only contains safe and trustworthy packages. If you want to use a custom registry, make sure to review the packages in it before installing them.

To-do List

(Pre-rc releases that already implement these will not affect the to-do list.)

  • Implement basic package manager functionality (installing, upgrading, listing, removing packages).
  • Implement unchecked features in the usage section (e.g. registry management).
  • search to fallback to offline
  • Add runner field on the registry fields for script files.
  • Downgrade Python version as low as possible without sacrificing any functionality, so your smart fridge device can run it too.
  • Add sha256 hash verification for downloaded packages to ensure integrity and security.
  • Add a Rust extention module early (via PyO3) for improved performance.
  • Add support for archive formats (e.g. .zip, .tar.gz, etc.).
  • Add support for multiple registries and registry prioritization.
  • Add support for package dependencies.
  • Add support for package versioning and version constraints.

Contributing

Contributions are welcome! If you want to contribute, please fork the repository and create a pull request with your changes. Make sure to follow the existing code style and include tests for any new functionality.

License

This project is protected under the MIT License. See the LICENSE file for more details.

Cheers, tyydev1


Future Projects (very planned)

  • millicent-dime - centipm shrunk down. A micro package manager that only supports installing and removing packages, and has a smaller binary size. But, it supports Dime's registry format, so it can use the same registry as CentiPM, and it can be a good alternative for users who want a smaller and simpler package manager.
  • rscentipm - a completely Rust implementation of CentiPM, which will be faster and more efficient than the Python version. This is the last thing on the to-do list because it suggests that this project is already complete and fully-featured, which is not the case yet.

About

CentiPM is compact, standalone environmental package manager.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages