Metadata-Version: 2.4
Name: cmgr
Version: 0.3.0
Summary: A configuratable config manager for your packages.
Author-email: Kyan <k@kyan001.com>
License: BSD 3-Clause License
        
        Copyright (c) 2024, Kyan
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://github.com/kyan001/PyConfigManager
Project-URL: Changelog, https://github.com/kyan001/PyConfigManager/blob/master/CHANGELOG.md
Project-URL: Issue Tracker, https://github.com/kyan001/PyConfigManager/issues
Project-URL: Source Code, https://github.com/kyan001/PyConfigManager
Keywords: python3,configuratable,config,manager
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: consoleiotools
Requires-Dist: consolecmdtools>=6.6.1
Requires-Dist: click
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# Config Manager (cmgr)
[CHANGELOG](CHANGELOG.md)

[cmgr](https://github.com/kyan001/PyConfigManager) is a command-line tool to manage configurations and packages. It's designed to be simple and easy to use. It's written in Python and can be installed via pip and pipx.

## Get Started

```sh
pip install cmgr  # Install cmgr
cmgr  # Run cmgr. Detect all `cmgr.toml` under current folder.
```

## Installation

```sh
# using pip
pip install --user cmgr  # install cmgr
pip install --upgrade cmgr # upgrade cmgr
pip uninstall cmgr  # uninstall cmgr

# using pipx
pipx install cmgr  # install cmgr
pipx upgrade cmgr  # upgrade cmgr
pipx uninstall cmgr  # uninstall cmgr
```

## Usage

```sh
# Shell
cmgr --help  # Command-line help message.
cmgr --version  # Show version information.

cmgr  # Run cgmr. Will looking for all cmgr.toml under current folder.
cmgr -p/--profile '/path/to/root/cmgr.toml'  # Run cmgr with specific profile.
cmgr -r/--root '/path/to/root/'  # Run cmgr with specific root folder.
cmgr -n/--name 'my-cmgr.toml'  # Run cmgr with specific profile's filename.
cmgr -y/--yes  # Automatically confirm all prompts.

# Install package
cmgr install ping3  # Install a package named ping3. Using default package manager.
cmgr install ping3 -c/--command 'ping3'  # Use specific command to detect if the package is installed before install.
cmgr install ping3 -m/--manager 'pip'  # Use specific package manager to install the package.

# Copy configuration
cmgr config "bash.conf" "~/.bashrc"  # Copy `./bash.conf` to `~/.bashrc`.
cmgr config "bash.conf" "~/.bashrc" -n/--name "BASH"  # Copy `bash.conf` to `~/` as `.bashrc` with specific name in output.
```

## Profile
* A cmgr profile example: [cmgr-example.toml](cmgr-example.toml)
* A minimal cmgr profile: [cmgr-minimal.toml](cmgr-minimal.toml)
