Skip to main content

Monitor TaskCards boards for changes using GraphQL API

Project description

taskcards-monitor

Monitor TaskCards boards for card changes via the GraphQL API.

Table of Contents

Features

  • Monitor both public and private TaskCards boards
  • Detect added/removed cards
  • Detect card title, description, and link changes
  • Track card movements between columns
  • Track file attachments (added/removed)
  • Complete change history with SQLite database
  • Query historical changes by date, card, or time range
  • Persistent state tracking with full board data
  • Email notifications when changes are detected (optional)

Installation

Using pipx (Recommended)

# Install from PyPI using pipx (recommended for CLI tools)
pipx install taskcards-monitor

# Or using pip
pip install taskcards-monitor

Using Docker

Option 1: Docker Compose

# 1. Create required directories and .env file
mkdir -p cache config
cp .env.example .env

# 2. Edit .env with your board details
# BOARD_ID=your-board-id
# VIEW_TOKEN=your-view-token

# 3. Run the monitor
docker compose run --rm taskcards-monitor

Option 2: Docker Run

# Pull the image
docker pull ghcr.io/molecode/taskcards-monitor:latest

# Run a check
docker run --rm \
  -v ~/.cache/taskcards-monitor:/app/.cache/taskcards-monitor \
  ghcr.io/molecode/taskcards-monitor:latest \
  check BOARD_ID --token VIEW_TOKEN

See Docker Usage Guide for detailed setup including cron jobs and email notifications.

From Source (Development)

# Clone the repository
git clone https://github.com/molecode/taskcards-monitor.git
cd taskcards-monitor

# Install dependencies
uv sync

Quick Start

Monitor a Public Board

taskcards-monitor check BOARD_ID

Monitor a Private Board

taskcards-monitor check BOARD_ID --token VIEW_TOKEN

Finding Board IDs and Tokens:

  • Board ID and token are in the URL when viewing a board:
    • Private: https://www.taskcards.de/#/board/BOARD_ID/view?token=VIEW_TOKEN
    • Public: https://www.taskcards.de/#/board/BOARD_ID/view

Usage

Commands

  • check BOARD_ID - Check a board for changes and save state
  • show BOARD_ID - Show the current saved state
  • list - List all boards that have been checked
  • history BOARD_ID - Show change history for a board
  • inspect BOARD_ID - Explore a board with detailed output (debugging, does NOT save state)

Options

  • --token TOKEN or -t TOKEN - View token for private/protected boards
  • -v, --verbose - Enable verbose logging
  • --email-config PATH or -e PATH - Path to email configuration YAML file (enables email notifications)

Examples

# Check a private board for changes (saves state)
taskcards-monitor check BOARD_ID --token VIEW_TOKEN

# Show saved state
taskcards-monitor show BOARD_ID

# List all monitored boards
taskcards-monitor list

# View change history for a board
taskcards-monitor history BOARD_ID

# View history with filters
taskcards-monitor history BOARD_ID --since 2025-12-01
taskcards-monitor history BOARD_ID --limit 50
taskcards-monitor history BOARD_ID --card CARD_ID

# Inspect board with detailed output (debugging, doesn't save state)
taskcards-monitor inspect BOARD_ID --token VIEW_TOKEN

# Verbose mode (shows detailed progress)
taskcards-monitor check BOARD_ID --token VIEW_TOKEN -v

# With email notifications
taskcards-monitor check BOARD_ID --email-config email-config.yaml

Email Notifications

Get notified via email when changes are detected on your boards.

Setup

  1. Copy the example configuration file:
cp email-config.example.yaml email-config.yaml
  1. Edit email-config.yaml with your SMTP settings and recipient emails:
smtp:
  host: <smtp-server>
  port: 587
  use_tls: true
  username: <your-username>
  password: <your-password>

email:
  from: your-email@gmail.com
  from_name: TaskCards Monitor
  to:
    - recipient1@example.com
    - recipient2@example.com
  # Subject supports Jinja2 variables: board_name, board_id, added_count, removed_count, changed_count
  subject: "📋 Changes on {{ board_name }} - {{ added_count }} added, {{ removed_count }} removed"
  1. Run the check command with the email config:
taskcards-monitor check BOARD_ID --email-config email-config.yaml

Email Features

  • Customizable subject line with Jinja2 template variables
  • Shows added, removed, and changed cards with full details
  • Displays card links as clickable hyperlinks
  • Shows file attachments with download links and sizes
  • Shows column information for each card
  • Only sends emails when changes are detected (not on first run)

What Changes Are Tracked?

taskcards-monitor detects the following changes:

  • Cards Added: New cards appear on the board
  • Cards Removed: Existing cards are deleted
  • Card Changes:
    • Title changes
    • Description changes
    • Link changes (URL added, removed, or modified)
    • Column movements (cards moved between lists)
    • Attachments added or removed (with filenames and file sizes)

All changes are displayed in the terminal and included in email notifications if configured.

Database Storage

Board state and change history are stored in a SQLite database at:

~/.cache/taskcards-monitor/taskcards-monitor.db

This database contains:

  • Current state of all monitored boards
  • Complete change history with timestamps
  • Temporal tracking of cards, lists, and attachments

Development

# Install dependencies (including dev tools)
uv sync --group dev

# Install pre-commit hooks
uv run pre-commit install

# Run linter
uv run ruff check taskcards_monitor/

# Auto-fix linting issues
uv run ruff check --fix taskcards_monitor/

# Format code
uv run ruff format taskcards_monitor/

# Run type checker
uv run ty check

# Run pre-commit checks manually
uv run pre-commit run --all-files

Project Structure

taskcards_monitor/
├── __init__.py          # Package initialization
├── changes.py           # Typed dataclasses for change detection
├── cli.py               # Click-based CLI interface
├── database.py          # Database connection and initialization
├── display.py           # Rich output formatting and tables
├── email_notifier.py    # Email notification functionality
├── email_template.html  # HTML template for email notifications
├── fetcher.py           # HTTP client for fetching board data via GraphQL API
├── models.py            # Peewee ORM models (Board, Card, List, Change, Attachment)
└── monitor.py           # Change detection logic and state management

AI-Generated Code

This project was developed mainly with the assistance of Claude Code.

While AI assisted in generating the code, all output has been reviewed and tested.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taskcards_monitor-0.7.2.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taskcards_monitor-0.7.2-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file taskcards_monitor-0.7.2.tar.gz.

File metadata

  • Download URL: taskcards_monitor-0.7.2.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for taskcards_monitor-0.7.2.tar.gz
Algorithm Hash digest
SHA256 340860ba54ab79f62be694bb04041898632e4068b55e7a04513fe07d51d3a5f7
MD5 3c00a5c42fc39ad7d8c50638ad96d9ad
BLAKE2b-256 52bcac753e7c4093c41756e94b53a4cb9e41ce269218382a01a48f836b57149d

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskcards_monitor-0.7.2.tar.gz:

Publisher: pypi-publish.yml on molecode/taskcards-monitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskcards_monitor-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for taskcards_monitor-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 939e152b9bfef558ae22473eb9447f891125736ebcd4f9d656a09b8ab9316b0b
MD5 cb07c9006c6e0522d618a125350b77a0
BLAKE2b-256 e2735862a424c0958175a116b23e65cb2be9eb5dfc50b7455f6e20ebf54dd318

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskcards_monitor-0.7.2-py3-none-any.whl:

Publisher: pypi-publish.yml on molecode/taskcards-monitor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page