Metadata-Version: 2.4
Name: commandman
Version: 1.0.0
Summary: Console utility for working with command packages. Storage, execution, autorun.
Home-page: https://github.com/smartlegionlab/commandman/
Author: Alexander Suvorov
Author-email: smartlegiondev@gmail.com
License: BSD 3-Clause License
Project-URL: Documentation, https://github.com/smartlegionlab/commandman/blob/master/README.md
Project-URL: Release notes, https://github.com/smartlegionlab/commandman/releases
Keywords: commandpack,commandoro,commandman,smartlegionlab,command execution
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click==8.0.1
Requires-Dist: smartcliapp==0.4.0
Requires-Dist: commandex==0.2.2
Dynamic: license-file

# commandman <sup>v1.0.0</sup>

Console command manager. Store your commands in one place for automatic
or manual launch and execution at any time.

---

![Platform](https://img.shields.io/badge/Windows%20%7C%20Linux%20%7C%20macOS%20%7C%20Termux-666?style=flat-square)
![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/commandman)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/commandman)](https://github.com/smartlegionlab/commandman/)
[![GitHub](https://img.shields.io/github/license/smartlegionlab/commandman)](https://github.com/smartlegionlab/commandman/blob/master/LICENSE)
[![GitHub Repo stars](https://img.shields.io/github/stars/smartlegionlab/commandman?style=social)](https://github.com/smartlegionlab/commandman/)
[![GitHub watchers](https://img.shields.io/github/watchers/smartlegionlab/commandman?style=social)](https://github.com/smartlegionlab/commandman/)
[![GitHub forks](https://img.shields.io/github/forks/smartlegionlab/commandman?style=social)](https://github.com/smartlegionlab/commandman/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/commandman?label=pypi%20downloads)](https://pypi.org/project/commandman/)
[![PyPI](https://img.shields.io/pypi/v/commandman)](https://pypi.org/project/commandman)
[![PyPI Downloads](https://static.pepy.tech/badge/commandman)](https://pepy.tech/projects/commandman)
[![PyPI - Format](https://img.shields.io/pypi/format/commandman)](https://pypi.org/project/commandman)

---

## ⚠️ Disclaimer

**By using this software, you agree to the full disclaimer terms.**

**Summary:** Software provided "AS IS" without warranty. You assume all risks.

**Full legal disclaimer:** See [DISCLAIMER.md](https://github.com/smartlegionlab/commandman/blob/master/DISCLAIMER.md)

---

## Images:

![commandman image](https://github.com/smartlegionlab/commandman/raw/master/data/images/commandman.png)

---

## Description:

___commandman___ - Cli command manager.

`pip install commandman`

The utility uses the package: [commandex](https://github.com/smartlegionlab/commandex).
The utility uses the package: [smartcliapp](https://github.com/smartlegionlab/smartcliapp).
The utility uses the package: [click](https://github.com/pallets/click) by [license](https://github.com/pallets/click/blob/main/LICENSE.rst).

Store your commands in one place for automatic
or manual launch and execution at any time.

It is convenient to store and run many commands for
automatic execution after system installation.

Recommended for use on `*nix` systems.

Possibilities:

- Storing named packages of commands in one file.
- Launching the execution of a batch or batch of commands from a file in automatic or manual mode.
- Add and run only certain packages.
- Exclusion of certain command packages from launch.
- Ability to run and skip command packets and individual commands in manual mode.

___File___ - a file in format 1 or 2 with the correct structure.

___A command package___ - name for grouping commands in a file.

___Command___ - a command to be executed in the console or terminal.

Create one or several files and store the necessary commands 
in them under names (in packages).  
The file must have the correct structure. 
At the moment, the simplest `*.cfg` and `*.json` are supported.

The file must have the correct structure.

`*.cfg` - The simplest file with command packages:

```text
[package name 1]
    command 1
    command 2
    command N
    [package name 2]
    command 1
    command 2
    command N
```

`*.json` - The simplest file with command packages:

```json
{
    "pack1":
      [
        "command1",
        "command2"
      ],
    "pack2":
      [
        "command1",
        "command2"
      ]
}
```

Packages:

Package names are placed in square brackets,
below the name are the commands included in this package.

Commands:

The commands are grouped under the desired names in packages.

To run the file use the command:

`python commandmanager.py [arguments] [file]`

A warning! If the file name contains spaces or invalid characters,
when typing a terminal, enclose it in quotation marks.

Arguments:

Using the `-a` option when starting the utility,
you can specify which command package to run using
the existing package name from the file. Use the option multiple
times to add multiple packages:

`python commandmanager.py -a name1 -a name2 -a name3 file.cfg`

Using the `-e` parameter, you can specify which command package
to exclude using the existing package name from the file.
Use the option multiple times to exclude multiple packages:

`python commandmanager.py -e name1 -e name2 -e name3 file.cfg`

A warning! If the command package name contains spaces or invalid characters,
when typing a terminal, enclose it in quotation marks.

The `--no-auto` option will cancel autorun of commands from the package.

Before executing each package and each command
the utility will ask for permission to execute.

The default is to autorun packages and commands `--auto`.

---

### Install and Use:

#### Install:

- `pip install commandman`

#### Use:

- `commandman [options] [path to the file with command packages]`

#### Build your command packages using example files:

- [example.cfg](https://github.com/smartlegionlab/commandman/blob/master/data/configs/example.cfg)


A warning! If the command package name or file name 
contains spaces or invalid characters,
when typing a terminal, enclose it in quotation marks.

Try to name your packages and files with short, meaningful names.

#### Variant 1:

- Go to the project folder
- `python setup.py install`
- `commandman -h`

#### Variant 2:

- Go to the project folder
- `pip install -r requirements.txt`
- `python3 commandmanager.py [options] [path to the file]`

### Termux support:

#### Variant 1:

- Install [Termux](https://termux.com)
- `apt update`
- `pkg install python`
- Go to the project folder
- `python setup.py install`
- `commandman -h`
or
- `pip3 install -r requirements.txt`
- `python3 commandmanager.py [options] [path to the file]`

---

## License

**[BSD 3-Clause License](https://github.com/smartlegionlab/commandman/blob/master/LICENSE)**

Copyright (©) 2026, [Alexander Suvorov](https://github.com/smartlegionlab)
