Skip to main content

routedel

Delete, add, list and monitor IPv4 routes on Linux, with notifications to multiple ntfy and Growl (GNTP) servers.

Install

pip install routedel
pip install "routedel[clipboard]"   # optional: read route rows from the clipboard

Usage

routedel -l                                    # list routes
routedel -m 100                                # delete route(s) by metric
routedel 0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0   # delete a full `route -n` row
routedel 0.0.0.0 192.168.1.1 100 eth0          # legacy: X GW METRIC DEV (default route)
routedel c                                     # delete using a route row from the clipboard
sudo routedel -a 10.0.0.0/8 -g 192.168.1.1 -i eth0 --met 50   # add route
sudo routedel -a -d -g 192.168.1.1 -i eth0 --met 100          # add default route
routedel --monitor --refresh 2                 # live monitor, notifies on changes

Route changes need root.

Notifications

Any number of servers of each type. Via CLI (repeatable):

routedel -m 100 --ntfy https://ntfy.sh/my-routes --ntfy https://ntfy.example.com/alerts \
                --growl 192.168.1.10 --growl 192.168.1.20:23053

Or via a JSON config (first found wins): --config FILE, $ROUTEDEL_CONFIG, ~/.config/routedel/config.json, ~/.routedel.json. CLI targets are added to the config targets.

{
  "ntfy":  [{"url": "https://ntfy.sh", "topic": "my-routes", "token": "tk_xxx"},
            {"url": "https://ntfy.example.com", "topic": "alerts", "user": "u", "password": "p"}],
  "growl": [{"host": "192.168.1.10", "port": 23053, "password": "secret"},
            {"host": "192.168.1.20"}]
}

Test with routedel --test-notify (or routedel config test); exit code is 1 if any target failed. Disable with --no-notify.

Managing the config: routedel config

routedel config init                      # create ~/.config/routedel/config.json (mode 0600); --example, --force
routedel config path [--all]              # file in use / full lookup order
routedel config add ntfy https://ntfy.sh/my-routes --token tk_xxx
routedel config add ntfy https://ntfy.example.com --topic alerts --user u --password p
routedel config add growl 192.168.1.10:23053 --password secret
routedel config show [--json [--reveal]]  # table of targets (secrets masked); aliases: list, ls
routedel config remove ntfy 2             # by # from `show`, or by text: `rm growl 192.168.1.20`
routedel config validate                  # schema check, exit 1 on errors
routedel config edit                      # $VISUAL / $EDITOR, then validates
routedel config test                      # send a test to every target

Every subcommand accepts -c/--config FILE to operate on a specific file. Servers are contacted in parallel; one failing server does not affect the others. Dependencies for notifications: none (stdlib urllib + raw GNTP 1.0 over sockets).

License

MIT

Development & release

pip install -e ".[dev]" && pytest
python -m build && twine check dist/*

Release to PyPI (GitHub Actions, Trusted Publishing — no token needed):

  1. On pypi.org → Publishing → add a pending publisher: owner cumulus13, repo routedel, workflow publish.yml, environment pypi. (Repeat on test.pypi.org with environment testpypi if wanted.)
  2. In the GitHub repo create environments pypi (and testpypi).
  3. Bump version in pyproject.toml and src/routedel/__init__.py, commit, then publish a GitHub Release tagged vX.Y.Z. The workflow tests, checks tag == version, builds and uploads.

Manual alternative: twine upload dist/* (API token).

👤 Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

Metadata

Release files for routedel 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for routedel 1.0.4
File Size Uploaded Provenance Actions
routedel-1.0.4.tar.gz 34.1 kB With provenance Details for routedel-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for routedel 1.0.4
File Interpreter ABI Platform Actions
routedel-1.0.4-py3-none-any.whl Python 3 none any Details for routedel-1.0.4-py3-none-any.whl

Total release size: 52.9 kB

Release files / routedel-1.0.4.tar.gz

Download URL routedel-1.0.4.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fffd97c8cd6860558a2f5c358645c95a6c00b1ddfde4b7d88f40f995ba3fd3a7
BLAKE2b-256 checksum
How to use checksums
7bb376174336fe89dccd30242498515effe97f25b834da493910a65188f57212
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / routedel-1.0.4-py3-none-any.whl

Download URL routedel-1.0.4-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6b60700d69844a0ba8bb75bb10195f56bd237d8d55ae22f48adfc1b019640b2
BLAKE2b-256 checksum
How to use checksums
e2c4b8a8fe3e3c9c5527d8f79d410d50c52d35abd9bdeb4373dce74a4a7ba5e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for routedel 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for routedel-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page