feat: Migrate Arbiter and Modpack Version Checker to monorepo
WHAT WAS DONE: - Migrated Arbiter (discord-oauth-arbiter) code to services/arbiter/ - Migrated Modpack Version Checker code to services/modpack-version-checker/ - Created .env.example for Arbiter with all required environment variables - Moved systemd service file to services/arbiter/deploy/ - Organized directory structure per Gemini monorepo recommendations WHY: - Consolidate all service code in one repository - Prepare for Gemini code review (Panel v1.12 compatibility check) - Enable service-prefixed Git tagging (arbiter-v2.1.0, modpack-v1.0.0) - Support npm workspaces for shared dependencies SERVICES MIGRATED: 1. Arbiter (Discord OAuth bot) - Originally written by Gemini + Claude - Full source code from ops-manual docs/implementation/ - Created comprehensive .env.example - Ready for Panel v1.12 compatibility verification 2. Modpack Version Checker (Python CLI tool) - Full source code from ops-manual docs/tasks/ - Written for Panel v1.11, needs Gemini review for v1.12 - Never had code review before STILL TODO: - Whitelist Manager - Pull from Billing VPS (38.68.14.188) - Currently deployed and running - Needs Panel v1.12 API compatibility fix (Task #86) - Requires SSH access to pull code NEXT STEPS: - Gemini code review for Panel v1.12 API compatibility - Create package.json for each service - Test npm workspaces integration - Deploy after verification FILES: - services/arbiter/ (25 new files, full application) - services/modpack-version-checker/ (21 new files, full application) Signed-off-by: The Golden Chronicler <claude@firefrostgaming.com>
This commit is contained in:
228
services/modpack-version-checker/docs/API.md
Normal file
228
services/modpack-version-checker/docs/API.md
Normal file
@@ -0,0 +1,228 @@
|
||||
# CLI Reference
|
||||
|
||||
Full reference for all `modpack-checker` commands and flags.
|
||||
|
||||
---
|
||||
|
||||
## Global Flags
|
||||
|
||||
| Flag | Description |
|
||||
|---|---|
|
||||
| `--version` | Show version and exit |
|
||||
| `-h`, `--help` | Show help for any command |
|
||||
|
||||
---
|
||||
|
||||
## config
|
||||
|
||||
Manage configuration settings stored in `~/.config/modpack-checker/config.json`.
|
||||
|
||||
### config set-key
|
||||
|
||||
```
|
||||
modpack-checker config set-key API_KEY
|
||||
```
|
||||
|
||||
Save and validate a CurseForge API key. The key is tested against the API immediately; a warning is shown if validation fails but the key is still saved.
|
||||
|
||||
**Get a free key at:** https://console.curseforge.com
|
||||
|
||||
---
|
||||
|
||||
### config set-webhook
|
||||
|
||||
```
|
||||
modpack-checker config set-webhook WEBHOOK_URL
|
||||
```
|
||||
|
||||
Save a Discord webhook URL. A test embed is sent immediately to confirm the webhook works.
|
||||
|
||||
---
|
||||
|
||||
### config set-interval
|
||||
|
||||
```
|
||||
modpack-checker config set-interval HOURS
|
||||
```
|
||||
|
||||
Set how many hours the scheduler waits between checks. Accepts values 1–168.
|
||||
|
||||
**Default:** 6
|
||||
|
||||
---
|
||||
|
||||
### config show
|
||||
|
||||
```
|
||||
modpack-checker config show
|
||||
```
|
||||
|
||||
Display the current configuration. The API key is masked (first 4 / last 4 characters shown).
|
||||
|
||||
---
|
||||
|
||||
## add
|
||||
|
||||
```
|
||||
modpack-checker add MODPACK_ID
|
||||
```
|
||||
|
||||
Add a CurseForge modpack to the watch list. The modpack name is fetched from the API and stored locally. Run `check` afterward to record the initial version.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
| Argument | Type | Description |
|
||||
|---|---|---|
|
||||
| `MODPACK_ID` | int | CurseForge project ID (from the modpack's URL) |
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
modpack-checker add 238222 # All The Mods 9
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## remove
|
||||
|
||||
```
|
||||
modpack-checker remove MODPACK_ID
|
||||
```
|
||||
|
||||
Remove a modpack and all its check history. Prompts for confirmation.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
| Argument | Type | Description |
|
||||
|---|---|---|
|
||||
| `MODPACK_ID` | int | CurseForge project ID |
|
||||
|
||||
---
|
||||
|
||||
## list
|
||||
|
||||
```
|
||||
modpack-checker list
|
||||
```
|
||||
|
||||
Display all watched modpacks in a table showing:
|
||||
- CurseForge ID
|
||||
- Name
|
||||
- Last known version
|
||||
- Last check timestamp
|
||||
- Whether Discord alerts are enabled
|
||||
|
||||
---
|
||||
|
||||
## check
|
||||
|
||||
```
|
||||
modpack-checker check [OPTIONS]
|
||||
```
|
||||
|
||||
Check watched modpacks against the CurseForge API and report on their status.
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Description |
|
||||
|---|---|
|
||||
| `--id INTEGER`, `-m INTEGER` | Check only this modpack ID |
|
||||
| `--notify` / `--no-notify` | Send Discord notifications (default: on) |
|
||||
|
||||
**Output:**
|
||||
- `✓` — up to date
|
||||
- `↑` — update available (version shown)
|
||||
- `→` — initial version recorded (first check)
|
||||
- `✗` — API error
|
||||
|
||||
---
|
||||
|
||||
## status
|
||||
|
||||
```
|
||||
modpack-checker status MODPACK_ID [OPTIONS]
|
||||
```
|
||||
|
||||
Show a detailed panel for one modpack plus its check history.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
| Argument | Type | Description |
|
||||
|---|---|---|
|
||||
| `MODPACK_ID` | int | CurseForge project ID |
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Default | Description |
|
||||
|---|---|---|
|
||||
| `--limit INTEGER`, `-n INTEGER` | 10 | Number of history entries to display |
|
||||
|
||||
---
|
||||
|
||||
## notifications
|
||||
|
||||
```
|
||||
modpack-checker notifications MODPACK_ID [--enable | --disable]
|
||||
```
|
||||
|
||||
Toggle Discord alerts for a specific modpack without removing it from the watch list.
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Description |
|
||||
|---|---|
|
||||
| `--enable` | Enable notifications (default) |
|
||||
| `--disable` | Suppress notifications for this modpack |
|
||||
|
||||
---
|
||||
|
||||
## schedule
|
||||
|
||||
```
|
||||
modpack-checker schedule [OPTIONS]
|
||||
```
|
||||
|
||||
Start a blocking background process that checks for updates on a repeating interval. Requires the `[scheduler]` extra (`pip install "modpack-version-checker[scheduler]"`).
|
||||
|
||||
**Options:**
|
||||
|
||||
| Flag | Description |
|
||||
|---|---|
|
||||
| `--hours INTEGER`, `-h INTEGER` | Override the configured interval |
|
||||
|
||||
Runs a check immediately on startup, then repeats at the configured interval. Press `Ctrl-C` to stop.
|
||||
|
||||
---
|
||||
|
||||
## Configuration File
|
||||
|
||||
Location: `~/.config/modpack-checker/config.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"curseforge_api_key": "your-key-here",
|
||||
"discord_webhook_url": "https://discord.com/api/webhooks/...",
|
||||
"database_path": "/home/user/.config/modpack-checker/modpacks.db",
|
||||
"check_interval_hours": 6,
|
||||
"notification_on_update": true
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Database
|
||||
|
||||
Location: `~/.config/modpack-checker/modpacks.db` (SQLite)
|
||||
|
||||
The database is managed automatically. To reset completely:
|
||||
```bash
|
||||
rm ~/.config/modpack-checker/modpacks.db
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Exit Codes
|
||||
|
||||
| Code | Meaning |
|
||||
|---|---|
|
||||
| `0` | Success |
|
||||
| `1` | Error (API failure, modpack not found, missing config, etc.) |
|
||||
Reference in New Issue
Block a user