Skip to content

Commit b01e556

Browse files
committed
2 parents a084d4a + 784e3d5 commit b01e556

File tree

13 files changed

+237
-54
lines changed

13 files changed

+237
-54
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Publish Artifacts
55
on:
66
push:
77
tags:
8-
- 'v*'
8+
- '\d+\.\d+\.\d+' # Tags like 1.0.0, 1.0.0, etc.
99

1010
permissions:
1111
id-token: write

.pylintrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[MESSAGES CONTROL]
2+
disable=
3+
too-few-public-methods,
4+
broad-except,
5+
import-error
6+
7+
[MASTER]
8+
ignore-patterns=test_.*\.py
9+
10+
[FORMAT]
11+
max-line-length=100
12+
13+
[REPORTS]
14+
output-format=colorized
15+
reports=no

README.md

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,86 @@
1-
# GuildMaster CLI
1+
# 🧙 GuildMaster CLI
22

3-
🚧 This repository is still in progress, and won't be complete until for a little while. 🚧
3+
[![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg?style=for-the-badge)](https://www.python.org/)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
5+
[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg?style=for-the-badge)](https://makeapullrequest.com)
6+
![Status](https://img.shields.io/badge/status-in--progress-yellow?style=for-the-badge)
7+
[![Join Our Discord](https://img.shields.io/discord/1269864144903864381?label=Join%20Discord\&logo=discord\&style=for-the-badge)](discord.gg/enMmUNq8jc)
48

5-
command to bump version:
9+
> ⚔️ **GuildMaster CLI** is an administrative command-line interface built for managing the [DSB Discord](https://discord.gg/devsecblueprint) server. Automate tedious tasks like role synchronization and more as this tool evolves.
610
11+
## 🚧 Project Status
12+
13+
GuildMaster CLI is currently under active development. Right now, it includes core functionality to update all Discord roles via a single command.
14+
15+
Stay tuned as new features (like event management, audit logging, and quest assignments 👀) are rolled out!
16+
17+
## 🧰 Features
18+
19+
- ✅ Update all Discord roles with a single command
20+
- 🚧 Built with [Python Fire](https://github.com/google/python-fire) for rapid CLI development
21+
- ✨ Designed for server maintainers, moderators, and admins in the DSB community
22+
23+
24+
## 📦 Installation
25+
26+
1. **Clone the repo**:
27+
```bash
28+
git clone https://github.com/The-DevSec-Blueprint/guildmaster-cli.git
29+
cd guildmaster-cli
30+
```
31+
32+
2. **(Optional) Create and activate a virtual environment**:
33+
34+
```bash
35+
python -m venv venv
36+
source venv/bin/activate # or venv\Scripts\activate on Windows
37+
```
38+
39+
3. **Install dependencies**:
40+
41+
```bash
42+
pip install -r requirements.txt
43+
```
44+
45+
## 🚀 Usage
46+
47+
You must have your Discord bot token and configuration ready in a `.env` file or exported as environment variables.
48+
49+
```bash
50+
python guildmaster.py update_roles
51+
```
52+
53+
This command will trigger a role sync across the DSB Discord server using your preconfigured bot permissions.
54+
55+
56+
## 🛠 Version Management
57+
58+
This project uses [bumpver](https://github.com/mbarkhau/bumpver) for consistent versioning.
59+
60+
```bash
61+
# Patch bump (e.g., 1.0.0 → 1.0.1)
762
bumpver update --patch
8-
bumpver update --major
63+
64+
# Minor bump (e.g., 1.0.1 → 1.1.0)
965
bumpver update --minor
66+
67+
# Major bump (e.g., 1.1.0 → 2.0.0)
68+
bumpver update --major
69+
```
70+
71+
72+
## 🧪 Contributing
73+
74+
We welcome pull requests! If you'd like to contribute:
75+
76+
1. Fork the repo
77+
2. Create a new branch (`git checkout -b feat/add-feature`)
78+
3. Commit your changes (`git commit -m 'add cool feature'`)
79+
4. Push to your branch (`git push origin feat/add-feature`)
80+
5. Open a PR!
81+
82+
## 📜 License
83+
84+
Licensed under the [MIT License](https://opensource.org/licenses/MIT).
85+
86+
> Made with ❤️ for the builders who shift left and secure everything—code, cloud, and community.

pyproject.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "guildmaster-cli"
7+
dynamic = ["version"]
8+
authors = [
9+
{name = "Damien Burks", email = "[email protected]"}
10+
]
11+
description = "A collection of scripts for managing Discord channels and other administrative tasks"
12+
readme = "README.md"
13+
requires-python = ">=3.12"
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"License :: OSI Approved :: MIT License",
17+
"Operating System :: OS Independent",
18+
]
19+
dependencies = [
20+
"fire",
21+
"discord.py",
22+
]
23+
24+
[project.urls]
25+
Homepage = "https://github.com/devsecblueprint/guildmaster-cli"
26+
27+
[project.scripts]
28+
guildmaster = "guildmaster.cli:main"
29+
30+
[tool.setuptools]
31+
zip-safe = true
32+
include-package-data = true
33+
34+
[tool.setuptools.dynamic]
35+
version = {attr = "guildmaster.__version__"}
36+
37+
[tool.setuptools.packages.find]
38+
where = ["src"]
39+
exclude = ["tests"]
40+
41+
[tool.setuptools.package-data]
42+
"*" = ["*.md"]
43+
44+
[tool.bumpver]
45+
current_version = "1.1.3"
46+
version_pattern = "MAJOR.MINOR.PATCH"
47+
commit = true
48+
tag = true
49+
50+
[tool.bumpver.file_patterns]
51+
"pyproject.toml" = [
52+
'current_version = "{version}"',
53+
]
54+
"src/guildmaster/__init__.py" = [
55+
'__version__ = "{version}"',
56+
]

requirements.txt

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,61 @@
1-
aiohappyeyeballs==2.4.6
2-
aiohttp==3.11.13
3-
aiosignal==1.3.2
1+
aiohappyeyeballs==2.6.1
2+
aiohttp==3.12.15
3+
aiosignal==1.4.0
4+
astroid==3.3.11
45
attrs==25.1.0
5-
build==1.2.2.post1
66
black==25.1.0
7+
build==1.2.2.post1
78
bumpver==2024.1130
9+
certifi==2025.7.14
10+
cffi==1.17.1
11+
charset-normalizer==3.4.2
812
click==8.1.8
913
colorama==0.4.6
14+
cryptography==45.0.5
15+
dill==0.4.0
1016
discord.py==2.5.0
17+
docutils==0.22
1118
fire==0.7.0
1219
frozenlist==1.5.0
20+
id==1.5.0
1321
idna==3.10
1422
iniconfig==2.1.0
23+
isort==6.0.1
24+
jaraco.classes==3.4.0
25+
jaraco.context==6.0.1
26+
jaraco.functools==4.2.1
27+
jeepney==0.9.0
28+
keyring==25.6.0
1529
lexid==2021.1006
30+
markdown-it-py==3.0.0
31+
mccabe==0.7.0
32+
mdurl==0.1.2
33+
more-itertools==10.7.0
1634
multidict==6.1.0
35+
mypy_extensions==1.1.0
36+
nh3==0.3.0
1737
packaging==24.2
38+
pathspec==0.12.1
39+
platformdirs==4.3.8
1840
pluggy==1.5.0
1941
propcache==0.3.0
42+
pycparser==2.22
43+
Pygments==2.19.2
2044
pylint==3.3.6
2145
pyproject_hooks==1.2.0
2246
pytest==8.3.5
23-
setuptools==75.8.2
47+
readme_renderer==44.0
48+
requests==2.32.4
49+
requests-toolbelt==1.0.0
50+
rfc3986==2.0.0
51+
rich==14.1.0
52+
SecretStorage==3.3.3
53+
setuptools==80.9.0
2454
termcolor==2.5.0
2555
toml==0.10.2
56+
tomlkit==0.13.3
2657
tqdm==4.67.1
58+
twine==6.1.0
59+
typing_extensions==4.14.1
60+
urllib3==2.5.0
2761
yarl==1.18.3

setup.cfg

Lines changed: 0 additions & 41 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/guildmaster/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""
2+
This is the __init__.py file for the GuildMaster package.
3+
It initializes the package and sets the version.
4+
"""
5+
6+
__version__ = "1.1.3"

src/guildmaster/_init_.py

Whitespace-only changes.

src/guildmaster/cli.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
# guildmaster.cli
3+
A command line interface for managing Discord server tasks and settings.
4+
"""
5+
16
import sys
27
import fire
38
from tasks.role_manager import DiscordRoleManager
@@ -13,6 +18,10 @@ def __init__(self):
1318

1419

1520
def main():
21+
"""
22+
Main entry point for the GuildMaster CLI.
23+
Initializes the command line interface and handles exceptions.
24+
"""
1625
try:
1726
fire.Fire(name="guildmaster", component=GuildMasterCommands)
1827
except KeyboardInterrupt:

0 commit comments

Comments
 (0)