{"id":22316692,"url":"https://github.com/developerstoolbox/template-package-cli","last_synced_at":"2025-07-29T12:30:34.149Z","repository":{"id":240065524,"uuid":"801596636","full_name":"DevelopersToolbox/template-package-cli","owner":"DevelopersToolbox","description":"A simple template for creating CLI based Python pacakges.","archived":false,"fork":false,"pushed_at":"2025-07-28T05:40:01.000Z","size":209,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-28T07:28:22.124Z","etag":null,"topics":["pypi","pypi-package","python","python-package","python-package-template","wolfsoftware"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevelopersToolbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["WolfSoftware","TGWolf"]}},"created_at":"2024-05-16T14:37:02.000Z","updated_at":"2025-07-28T05:38:52.000Z","dependencies_parsed_at":"2024-05-20T07:25:41.803Z","dependency_job_id":"66d484b2-cf11-4058-a2ca-a08157b8b699","html_url":"https://github.com/DevelopersToolbox/template-package-cli","commit_stats":null,"previous_names":["greyteamtoolbox/baseline-package"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/DevelopersToolbox/template-package-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Ftemplate-package-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Ftemplate-package-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Ftemplate-package-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Ftemplate-package-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevelopersToolbox","download_url":"https://codeload.github.com/DevelopersToolbox/template-package-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevelopersToolbox%2Ftemplate-package-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267686334,"owners_count":24127715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pypi","pypi-package","python","python-package","python-package-template","wolfsoftware"],"created_at":"2024-12-03T23:07:28.200Z","updated_at":"2025-07-29T12:30:33.848Z","avatar_url":"https://github.com/DevelopersToolbox.png","language":"Python","readme":"\u003c!-- markdownlint-disable --\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/\"\u003e\n        \u003cimg src=\"https://cdn.wolfsoftware.com/assets/images/github/organisations/developerstoolbox/black-and-white-circle-256.png\" alt=\"DevelopersToolbox logo\" /\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/actions/workflows/cicd.yml\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/DevelopersToolbox/template-package-cli/cicd.yml?branch=master\u0026label=build%20status\u0026style=for-the-badge\" alt=\"Github Build Status\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/blob/master/LICENSE.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/DevelopersToolbox/template-package-cli?color=blue\u0026label=License\u0026style=for-the-badge\" alt=\"License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/created-at/DevelopersToolbox/template-package-cli?color=blue\u0026label=Created\u0026style=for-the-badge\" alt=\"Created\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/DevelopersToolbox/template-package-cli?color=blue\u0026label=Latest%20Release\u0026style=for-the-badge\" alt=\"Release\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/release-date/DevelopersToolbox/template-package-cli?color=blue\u0026label=Released\u0026style=for-the-badge\" alt=\"Released\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/commits-since/DevelopersToolbox/template-package-cli/latest.svg?color=blue\u0026style=for-the-badge\" alt=\"Commits since release\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/blob/master/.github/CODE_OF_CONDUCT.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Code%20of%20Conduct-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/blob/master/.github/CONTRIBUTING.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contributing-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/blob/master/.github/SECURITY.md\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Report%20Security%20Concern-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/DevelopersToolbox/template-package-cli/issues\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Get%20Support-blue?style=for-the-badge\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\n\nThis is the package template that we use internally when creating new python cli based tools. 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 also provide 2 other templates which we use.\n\n- [template python project](https://github.com/DevelopersToolbox/template-python-project)\n- [template package importable](https://github.com/DevelopersToolbox/template-package-importable)\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 cli package, clone the repository and navigate to the project directory:\n\n```bash\ngit clone https://github.com/DevelopersToolbox/template-package-cli.git\ncd template-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 cli package, execute the `main` function from the main script:\n\n```bash\npython -m wolfsoftware.template_package_cli.main --required \u003cvalue\u003e\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.template_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\ntemplate-package-cli/\n├── wolfsoftware/\n│   └── template_package_cli/\n│       ├── __init__.py\n│       ├── cli.py\n│       ├── config.py\n│       ├── exceptions.py\n│       ├── globals.py\n│       └── main.py\n├── README.md\n├── setup.py\n└── requirements.txt\n```\n\n- `wolfsoftware/template_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\u003cbr /\u003e\n\u003cp align=\"right\"\u003e\u003ca href=\"https://wolfsoftware.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Created%20by%20Wolf%20on%20behalf%20of%20Wolf%20Software-blue?style=for-the-badge\" /\u003e\u003c/a\u003e\u003c/p\u003e\n","funding_links":["https://github.com/sponsors/WolfSoftware","https://github.com/sponsors/TGWolf"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperstoolbox%2Ftemplate-package-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloperstoolbox%2Ftemplate-package-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperstoolbox%2Ftemplate-package-cli/lists"}