Skip to main content

No project description provided

Project description

telediff

Telediff is a CLI tool to send notifications when a file (or the output of your script) changes, with diff tracking and many notification channels (including Slack, WhatsApp, Telegram, Google Chat, Microsoft Teams, Pushover and 100+ others)

Installation

With pipx

pipx install telediff

With uv

uv tool install telediff

With docker

docker run --rm \
  -v "$HOME/.config/telediff:/app/.config/telediff" \
  -v "$HOME/.cache/telediff:/app/.cache/telediff" \
  ghcr.io/hacktegic/telediff:latest telediff --help

Configuration

Run telediff create-config to create the default config and print its path.

Default config looks like this:

[channels]
# Format: user_friendly_channel_name = apprise_url
#
# The value is an Apprise URL (see https://github.com/caronc/apprise/wiki for all supported services).
#
# You do not need to pay for Apprise, and your messages do not go through them; it's just a library providing abstraction.
#
# Examples:
#
# telegramexample = "tgram://bottoken/ChatID"

# slackexample = "slack://TokenA/TokenB/TokenC/"

# msteamsexample = "msteams://TokenA/TokenB/TokenC/"

# pushoverexample = "pover://user@token"

You can use telediff test -c yourchannel to send a test notification.

Usage

telediff --help
usage: telediff [-h] {test,clear-cache,notify,create-config} ...

Send notifications if a file/stream changes (with diff tracking in ~/.cache).

positional arguments:
  {test,clear-cache,notify,create-config}
                        Subcommands
    test                Send a test notification for a channel
    clear-cache         Remove all cached state
    notify              Send notification if file/stream changes
    create-config       Create the default config file and output its location

options:
  -h, --help            show this help message and exit

telediff notify

telediff notify --help
usage: telediff notify [-h] --channel CHANNEL [--title TITLE] [--body BODY]
                       [--body-prepend BODY_PREPEND]
                       [--body-append BODY_APPEND]
                       [--title-prepend TITLE_PREPEND]
                       [--title-append TITLE_APPEND] --file FILE
                       [--max-length MAX_LENGTH] [--no-path-in-body]
                       [--no-color] [--attach]

options:
  -h, --help            show this help message and exit
  --channel, -c CHANNEL
                        Channel to send notification to
  --title, -t TITLE     Title for notification (default: 'telediff update')
  --body, -b BODY       Body for notification (default: file contents or diff)
  --body-prepend BODY_PREPEND
                        Text to prepend to the notification body (default:
                        empty)
  --body-append BODY_APPEND
                        Text to append to the notification body (default:
                        empty)
  --title-prepend TITLE_PREPEND
                        Text to prepend to the notification title (default:
                        empty)
  --title-append TITLE_APPEND
                        Text to append to the notification title (default:
                        empty)
  --file, -f FILE       Path to the file to monitor for changes. If the file
                        does not exist, contents of STDIN are taken and
                        written to this path. If STDIN is provided, it always
                        replaces the file contents. Notification is sent if
                        the file (or STDIN) changes compared to the cached
                        copy.
  --max-length MAX_LENGTH
                        Max body length (default: 0=channel-specific limit)
  --no-path-in-body     Do not include the file path in the notification body
  --no-color            Disable colored and emoji output for this notification
  --attach              Attach the diff as a file if supported by the channel
                        (text files only)

telediff test

telediff test --help
usage: telediff test [-h] --channel CHANNEL [--title TITLE]

options:
  -h, --help            show this help message and exit
  --channel, -c CHANNEL
                        Channel to test
  --title, -t TITLE     Title for test notification (default: 'telediff test')

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

telediff-1.2.tar.gz (122.8 kB view details)

Uploaded Source

Built Distribution

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

telediff-1.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file telediff-1.2.tar.gz.

File metadata

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

File hashes

Hashes for telediff-1.2.tar.gz
Algorithm Hash digest
SHA256 555edc8e5a53624d0c35f6828afc06a5324c4a44f9a00c6fd8f07455b4d910f1
MD5 12a808a4cc0f2197263470ca00036613
BLAKE2b-256 ec9bc2e905d30cc6558d9a387604303f3e18e5b6fce8d42b01e8af21d2b121d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for telediff-1.2.tar.gz:

Publisher: trunk.yml on hacktegic/telediff

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

File details

Details for the file telediff-1.2-py3-none-any.whl.

File metadata

  • Download URL: telediff-1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for telediff-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0be90d4ce5b8df01f975839ebbec83597b82274ba95b938c0c6908a76ff71d80
MD5 bbd16b1b38df9974bca9bfab8a5fee79
BLAKE2b-256 fb1a4059bf8db3c637d1e71a360481b71539ffbb5ef25cab7f668304c5ad2ed4

See more details on using hashes here.

Provenance

The following attestation bundles were made for telediff-1.2-py3-none-any.whl:

Publisher: trunk.yml on hacktegic/telediff

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