<!-- markdownlint-disable -->
<p align="center">
<a href="https://github.com/GreyTeamToolbox/">
<img src="https://cdn.wolfsoftware.com/assets/images/github/organisations/greyteamtoolbox/black-and-white-circle-256.png" alt="GreyTeamToolbox logo" />
</a>
<br />
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/actions/workflows/cicd.yml">
<img src="https://img.shields.io/github/actions/workflow/status/GreyTeamToolbox/baseline-package-cli/cicd.yml?branch=master&label=build%20status&style=for-the-badge" alt="Github Build Status" />
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/LICENSE.md">
<img src="https://img.shields.io/github/license/GreyTeamToolbox/baseline-package-cli?color=blue&label=License&style=for-the-badge" alt="License">
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli">
<img src="https://img.shields.io/github/created-at/GreyTeamToolbox/baseline-package-cli?color=blue&label=Created&style=for-the-badge" alt="Created">
</a>
<br />
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest">
<img src="https://img.shields.io/github/v/release/GreyTeamToolbox/baseline-package-cli?color=blue&label=Latest%20Release&style=for-the-badge" alt="Release">
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest">
<img src="https://img.shields.io/github/release-date/GreyTeamToolbox/baseline-package-cli?color=blue&label=Released&style=for-the-badge" alt="Released">
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest">
<img src="https://img.shields.io/github/commits-since/GreyTeamToolbox/baseline-package-cli/latest.svg?color=blue&style=for-the-badge" alt="Commits since release">
</a>
<br />
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/CODE_OF_CONDUCT.md">
<img src="https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge" />
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/CONTRIBUTING.md">
<img src="https://img.shields.io/badge/Contributing-blue?style=for-the-badge" />
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/SECURITY.md">
<img src="https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge" />
</a>
<a href="https://github.com/GreyTeamToolbox/baseline-package-cli/issues">
<img src="https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge" />
</a>
</p>
## Overview
This is the baseline package template that we use internally when creating new python cli based tools for the [Blue Team Toolbox](https://github.com/BlueTeamToolbox)
and [Red Team Toolbox](https://github.com/RedTeamToolbox). It has all of the basic functionality and workflows needed to create,
build and publish new package to [PyPI](https://pypi.org/).
This package provides a command-line utility for processing and handling various tasks using a set of predefined arguments and configurations. The project
aims to serve as a baseline for developing similar command-line applications.
It includes features such as argument parsing, configuration management, and a modular structure to facilitate scalable and maintainable code development.
We decided to make this available along with our other tools to allow people to use a well engineered starting point when creating their own tools.
We also have a [baseline project](https://github.com/GreyTeamToolbox/baseline-project) which can be used to create scripts and tools for local
execution. It comes with all the same base functionality but without the package build and publish.
## Features
- **Modular Architecture**: Organize your code into modules for better maintainability.
- **Argument Parsing**: Easily handle command-line arguments using `argparse`.
- **Configuration Management**: Generate configuration objects from command-line arguments.
- **Custom Exceptions**: Implement custom exceptions for specific error handling.
## Installation
To install the Baseline Package, clone the repository and navigate to the project directory:
```bash
git clone https://github.com/GreyTeamToolbox/baseline-package-cli.git
cd baseline-package-cli
```
It is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:
```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```
Install the required dependencies:
```bash
pip install -r requirements.txt
```
## Usage
To run the Baseline Package, execute the `main` function from the main script:
```bash
python -m wolfsoftware.baseline_package_cli.main --required <value>
```
### Command-Line Arguments
The application supports several command-line arguments:
- `-h, --help`: Show help message and exit.
- `-d, --debug`: Enable debug mode for verbose output.
- `-v, --verbose`: Enable verbose output to show scan results as they come in.
- `-V, --version`: Show the program's version number and exit.
- `-i, --optional-integer`: An optional integer argument (default: 2).
- `-s, --optional-string`: An optional string argument (default: "me").
- `-r, --required`: A required string argument.
Example usage:
```bash
python -m wolfsoftware.baseline_package_cli.main -r "required_value" -i 10 -s "optional_string"
```
## Project Structure
The project is organized as follows:
```sh
baseline-package-cli/
├── wolfsoftware/
│ └── baseline_package_cli/
│ ├── __init__.py
│ ├── cli.py
│ ├── config.py
│ ├── exceptions.py
│ ├── globals.py
│ └── main.py
├── README.md
├── setup.py
└── requirements.txt
```
- `wolfsoftware/baseline_package_cli`: Contains the core modules of the application.
- `cli.py`: Handles the command-line arguments and main program flow.
- `config.py`: Handles configuration creation from command-line arguments.
- `exceptions.py`: Handles custom exceptions.
- `globals.py`: Defines global constants used across the application.
- `main.py`: The main script that orchestrates argument parsing and program execution.
- `requirements.txt`: Lists the dependencies required for the project.
- `README.md`: The file you are currently reading.
<br />
<p align="right"><a href="https://wolfsoftware.com/"><img src="https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge" /></a></p>
Raw data
{
"_id": null,
"home_page": "https://github.com/GreyTeamToolbox/baseline-package-cli",
"name": "wolfsoftware.baseline-package-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Wolf Software",
"author_email": "pypi@wolfsoftware.com",
"download_url": "https://files.pythonhosted.org/packages/09/53/c2a3b410f30fb956204711e7c9f2deb58b6bb148b3b90d6a799b82184f1e/wolfsoftware_baseline_package_cli-0.1.0.tar.gz",
"platform": null,
"description": "<!-- markdownlint-disable -->\n<p align=\"center\">\n <a href=\"https://github.com/GreyTeamToolbox/\">\n <img src=\"https://cdn.wolfsoftware.com/assets/images/github/organisations/greyteamtoolbox/black-and-white-circle-256.png\" alt=\"GreyTeamToolbox logo\" />\n </a>\n <br />\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/actions/workflows/cicd.yml\">\n <img src=\"https://img.shields.io/github/actions/workflow/status/GreyTeamToolbox/baseline-package-cli/cicd.yml?branch=master&label=build%20status&style=for-the-badge\" alt=\"Github Build Status\" />\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/LICENSE.md\">\n <img src=\"https://img.shields.io/github/license/GreyTeamToolbox/baseline-package-cli?color=blue&label=License&style=for-the-badge\" alt=\"License\">\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli\">\n <img src=\"https://img.shields.io/github/created-at/GreyTeamToolbox/baseline-package-cli?color=blue&label=Created&style=for-the-badge\" alt=\"Created\">\n </a>\n <br />\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest\">\n <img src=\"https://img.shields.io/github/v/release/GreyTeamToolbox/baseline-package-cli?color=blue&label=Latest%20Release&style=for-the-badge\" alt=\"Release\">\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest\">\n <img src=\"https://img.shields.io/github/release-date/GreyTeamToolbox/baseline-package-cli?color=blue&label=Released&style=for-the-badge\" alt=\"Released\">\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/releases/latest\">\n <img src=\"https://img.shields.io/github/commits-since/GreyTeamToolbox/baseline-package-cli/latest.svg?color=blue&style=for-the-badge\" alt=\"Commits since release\">\n </a>\n <br />\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/CODE_OF_CONDUCT.md\">\n <img src=\"https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/CONTRIBUTING.md\">\n <img src=\"https://img.shields.io/badge/Contributing-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/blob/master/.github/SECURITY.md\">\n <img src=\"https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge\" />\n </a>\n <a href=\"https://github.com/GreyTeamToolbox/baseline-package-cli/issues\">\n <img src=\"https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge\" />\n </a>\n</p>\n\n## Overview\n\nThis is the baseline package template that we use internally when creating new python cli based tools for the [Blue Team Toolbox](https://github.com/BlueTeamToolbox)\nand [Red Team Toolbox](https://github.com/RedTeamToolbox). It has all of the basic functionality and workflows needed to create,\nbuild and publish new package to [PyPI](https://pypi.org/).\n\nThis package provides a command-line utility for processing and handling various tasks using a set of predefined arguments and configurations. The project\naims to serve as a baseline for developing similar command-line applications.\n\nIt includes features such as argument parsing, configuration management, and a modular structure to facilitate scalable and maintainable code development.\n\nWe decided to make this available along with our other tools to allow people to use a well engineered starting point when creating their own tools.\n\nWe also have a [baseline project](https://github.com/GreyTeamToolbox/baseline-project) which can be used to create scripts and tools for local\nexecution. It comes with all the same base functionality but without the package build and publish.\n\n## Features\n\n- **Modular Architecture**: Organize your code into modules for better maintainability.\n- **Argument Parsing**: Easily handle command-line arguments using `argparse`.\n- **Configuration Management**: Generate configuration objects from command-line arguments.\n- **Custom Exceptions**: Implement custom exceptions for specific error handling.\n\n## Installation\n\nTo install the Baseline Package, clone the repository and navigate to the project directory:\n\n```bash\ngit clone https://github.com/GreyTeamToolbox/baseline-package-cli.git\ncd baseline-package-cli\n```\n\nIt is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:\n\n```bash\npython -m venv venv\nsource venv/bin/activate # On Windows, use `venv\\Scripts\\activate`\n```\n\nInstall the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\nTo run the Baseline Package, execute the `main` function from the main script:\n\n```bash\npython -m wolfsoftware.baseline_package_cli.main --required <value>\n```\n\n### Command-Line Arguments\n\nThe application supports several command-line arguments:\n\n- `-h, --help`: Show help message and exit.\n- `-d, --debug`: Enable debug mode for verbose output.\n- `-v, --verbose`: Enable verbose output to show scan results as they come in.\n- `-V, --version`: Show the program's version number and exit.\n- `-i, --optional-integer`: An optional integer argument (default: 2).\n- `-s, --optional-string`: An optional string argument (default: \"me\").\n- `-r, --required`: A required string argument.\n\nExample usage:\n\n```bash\npython -m wolfsoftware.baseline_package_cli.main -r \"required_value\" -i 10 -s \"optional_string\"\n```\n\n## Project Structure\n\nThe project is organized as follows:\n\n```sh\nbaseline-package-cli/\n\u251c\u2500\u2500 wolfsoftware/\n\u2502 \u2514\u2500\u2500 baseline_package_cli/\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u251c\u2500\u2500 cli.py\n\u2502 \u251c\u2500\u2500 config.py\n\u2502 \u251c\u2500\u2500 exceptions.py\n\u2502 \u251c\u2500\u2500 globals.py\n\u2502 \u2514\u2500\u2500 main.py\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 setup.py\n\u2514\u2500\u2500 requirements.txt\n```\n\n- `wolfsoftware/baseline_package_cli`: Contains the core modules of the application.\n - `cli.py`: Handles the command-line arguments and main program flow.\n - `config.py`: Handles configuration creation from command-line arguments.\n - `exceptions.py`: Handles custom exceptions.\n - `globals.py`: Defines global constants used across the application.\n - `main.py`: The main script that orchestrates argument parsing and program execution.\n- `requirements.txt`: Lists the dependencies required for the project.\n- `README.md`: The file you are currently reading.\n\n<br />\n<p align=\"right\"><a href=\"https://wolfsoftware.com/\"><img src=\"https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge\" /></a></p>\n",
"bugtrack_url": null,
"license": null,
"summary": "A nice description will go here",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/GreyTeamToolbox/baseline-package-cli",
"Homepage": "https://github.com/GreyTeamToolbox/baseline-package-cli",
"Source": "https://github.com/GreyTeamToolbox/baseline-package-cli",
"Sponsor": "https://github.com/sponsors/WolfSoftware",
"Tracker": "https://github.com/GreyTeamToolbox/baseline-package-cli/issues/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0f10eceb85750fa60cfcb6379e8203c3f1e74011d0ff67c65d0bd27844b67cb4",
"md5": "0ca99209eb35d14d28ad8c8a71f52bdb",
"sha256": "e1b7e40dcfb1acaae76d03817cb42991527f6b0c1f13f0dbba2c6b08fd2029ce"
},
"downloads": -1,
"filename": "wolfsoftware.baseline_package_cli-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ca99209eb35d14d28ad8c8a71f52bdb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9315,
"upload_time": "2024-05-25T18:15:44",
"upload_time_iso_8601": "2024-05-25T18:15:44.279921Z",
"url": "https://files.pythonhosted.org/packages/0f/10/eceb85750fa60cfcb6379e8203c3f1e74011d0ff67c65d0bd27844b67cb4/wolfsoftware.baseline_package_cli-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0953c2a3b410f30fb956204711e7c9f2deb58b6bb148b3b90d6a799b82184f1e",
"md5": "61dbd2df7c936e0f40b271fe0171d887",
"sha256": "80354941f3dfbfe89977868384f5238c0e12c7dd583d3128a249689a8719df23"
},
"downloads": -1,
"filename": "wolfsoftware_baseline_package_cli-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "61dbd2df7c936e0f40b271fe0171d887",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 9415,
"upload_time": "2024-05-25T18:15:45",
"upload_time_iso_8601": "2024-05-25T18:15:45.439461Z",
"url": "https://files.pythonhosted.org/packages/09/53/c2a3b410f30fb956204711e7c9f2deb58b6bb148b3b90d6a799b82184f1e/wolfsoftware_baseline_package_cli-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-25 18:15:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GreyTeamToolbox",
"github_project": "baseline-package-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "wolfsoftware.baseline-package-cli"
}