Monitor PHP package versions on Packagist and receive Slack notifications when new versions are released.
┌──────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ config.yml │────>│ Packagist API │────>│ Compare with │
│ (packages) │ │ (fetch latest) │ │ stored version │
└──────────────┘ └──────────────────┘ └────────┬────────┘
│
┌────────▼────────┐
│ New version? │
│ Send Slack msg │
└─────────────────┘
- Reads the list of packages from
config.yml - Queries the Packagist API for the latest version of each package
- Compares with the last known version (stored locally in
versions/) - If a new version is detected, sends a Slack notification
- Repeats on a configurable interval (default: 15 minutes)
Go to Slack API Apps and create a new app (or use an existing one). The app needs the chat:write scope to send notifications.
Copy the example file and fill in your values:
cp .env.example .envEdit .env with your Slack token and channel ID:
SLACK_TOKEN=xoxb-your-token-here
SLACK_CHANNEL=C0123456789
Copy the example config and add your packages:
cp config.yml.example config.ymlEdit config.yml:
packages:
- symfony/symfony
- laravel/framework
- monolog/monologdocker compose up -d| Variable | Description | Default |
|---|---|---|
SLACK_TOKEN |
Slack Bot OAuth token | — |
SLACK_CHANNEL |
Slack channel ID for notifications | — |
CHECK_INTERVAL |
Seconds between checks | 900 |
LOG_LEVEL |
Logging level (DEBUG/INFO/WARNING) | INFO |
pip install -r requirements-dev.txtpytestruff check .
ruff format .mypy main.pypre-commit installpackagist-tracker/
├── .github/
│ ├── workflows/ci.yml # CI pipeline (lint, test, docker build)
│ └── dependabot.yml # Automated dependency updates
├── tests/
│ └── test_main.py # Unit tests
├── main.py # Application entry point
├── config.yml # Packages to track (user-created)
├── config.yml.example # Example configuration
├── docker-compose.yml # Docker Compose orchestration
├── Dockerfile # Container definition
├── requirements.txt # Production dependencies
├── requirements-dev.txt # Development dependencies
└── pyproject.toml # Project metadata and tool config