SkillAgentSearch skills...

Autopulse

๐Ÿ’ซ automated lightweight service that updates media servers like Plex and Jellyfin based on notifications from media organizers like Sonarr and Radarr

Install / Use

/learn @dan-online/Autopulse
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

[![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url]

<br /> <div align="center"> <a href="https://github.com/dan-online/autopulse"> <img src="https://github.com/dan-online/autopulse/raw/main/assets/logo.webp" alt="Logo" width="80" height="80"> </a> <h3 align="center">autopulse</h3> <p align="center"> ๐Ÿ’ซ automated lightweight service that updates media servers like Plex and Jellyfin<br> based on notifications from media organizers like Sonarr and Radarr <br /> <br /> <a href="https://github.com/dan-online/autopulse/issues">Report Bug</a> ยท <a href="https://github.com/dan-online/autopulse/issues">Request Feature</a> . <a href="https://autopulse.dancodes.online/">Documentation</a> . <a href="https://autopulseui.pages.dev/">autopulseUI</a> </p> </div>

About The Project

autopulse is a web server that receives notifications from media organizers like Sonarr/Radarr/Lidarr/etc (triggers) and updates the items in media servers like Plex/Jellyfin/Emby/etc (targets). It is designed to be efficient, only updating the items that have changed, reducing the load on media servers.

Why migrate from autoscan? autoscan is a great project and autopulse takes a lot of inspiration from it, but it is no longer maintained and isn't very efficient at updating libraries as it uses a more general "scan" on a folder rather than a specific file. autopulse finds the corresponding library item and sends an update request directly.

Terminology

We use the following terminology:

  • Trigger: A trigger is a specification for an endpoint that will be called when a file is ready to be processed
    • Manual (default: /triggers/manual)
    • Sonarr
    • Radarr
    • Lidarr
    • Readarr
    • Notify
      • Linux: inotify
      • MacOS: FSEvents
      • Windows: ReadDirectoryChangesW
      • Fallback: polling
  • Target: A target is a specification for a library that will be updated when a file is ready to be processed
    • Plex
    • Jellyfin
    • Emby
    • Command
    • Sonarr
    • Radarr
    • Tdarr
    • FileFlows
    • Audiobookshelf
    • Another autopulse instance

Example Flow

  1. Sonarr organizes an episode and sends a webhook notification to autopulse
  2. autopulse receives the notification and rewrites the path to the expected path for the target
  3. autopulse optionally checks the file exists and optionally waits for the file to match a provided hash
  4. autopulse sends a request to Plex to update or add the episode information/metadata

Features

  • Rewrites: rewrites the path provided by the trigger to the path expected by the target
  • Integration: integrates with Sonarr, Radarr, Plex, Jellyfin, and more in the future
  • Checks: checks the file exists before updating the target and optionally waits for the file to match a provided hash
  • Reliability: uses a database to store the state of the scan requests
  • Webhooks: allow for notifications to be sent when a file is ready to be processed with Discord, Matrix Hookshot, or generic JSON webhooks
  • User-Interface: provides a simple web interface to view/add scan requests

Getting Started

Docker

The easiest way to get started with autopulse is to use the provided docker image on ghcr.io or Docker Hub

Tags

  • latest - full image with support for postgres/sqlite

  • latest-postgres - smaller image that only supports Postgres

  • latest-sqlite - smaller image that only supports SQLite

  • stable - latest versioned release

  • ui - self-hostable UI for autopulse

All images are multi-arch and support linux/amd64, linux/arm64, however -amd64 and -arm64 suffixes can be used to specify the architecture

Compose

Docker Compose files for both SQLite and Postgres are provided in the example

CLI

# create a network
$ docker network create autopulse

# postgres database
$ docker run -d --net autopulse --name postgres -e POSTGRES_PASSWORD=autopulse -e POSTGRES_DB=autopulse postgres
$ docker run -d --net autopulse -e AUTOPULSE__APP__DATABASE_URL=postgres://postgres:autopulse@postgresql/autopulse --name autopulse ghcr.io/dan-online/autopulse

# sqlite database
$ docker run -d --net autopulse -e AUTOPULSE__APP__DATABASE_URL=sqlite://database.db --name autopulse ghcr.io/dan-online/autopulse
# or in-memory
$ docker run -d --net autopulse -e AUTOPULSE__APP__DATABASE_URL=sqlite://:memory: --name autopulse ghcr.io/dan-online/autopulse

Documentation

All the documentation can be found on the website

Here's some quick links:

Quick Start

Configuration

autopulse requires a configuration file to run. By default, it looks for config.toml in the current working directory. You can override the default values using a config file or by setting environment variables in the format of: AUTOPULSE__{SECTION}__{KEY}.

For example: AUTOPULSE__APP__DATABASE_URL

An example has been provided in the example directory

Note: You can provide the config with json, toml, yaml, json5, ron, or ini format

Note: You can also provide the path to a variable by appending __FILE For example: AUTOPULSE__AUTH__PASSWORD__FILE=/run/secrets/autopulse_password

Authorization

autopulse uses basic authorization for the API. You can set the username and password in the config file or by setting the AUTOPULSE__AUTH__USERNAME and AUTOPULSE__AUTH__PASSWORD environment variables.

auth:
  username: terry
  password: yoghurt

Note: By default the username and password are admin and password respectively, however it is HIGHLY recommended to change these values if you are exposing the API to the internet.

Examples

triggers:
  my_sonarr:
    type: "sonarr"
    rewrite:
      from: "/downloads"
      to: "/tvshows"

  my_radarr:
    type: "radarr"
    rewrite:
      from: "/downloads"
      to: "/movies"

  my_manual:
    type: "manual"
    rewrite:
      from: "/downloads"
      to: "/"
  
  my_notify:
    type: "notify"
    paths:
      - "/watch"
    rewrite:
      from: "/watch"
      to: "/media"

webhooks:
  my_discord:
    type: "discord"
    url: "https://discord.com/api/webhooks/1234567890/abcdefg"

  my_hookshot:
    type: "hookshot"
    url: "https://matrix.example.com/_matrix/hookshot/webhook/abcdefg"

  my_json:
    type: "json"
    url: "https://example.com/webhooks/autopulse"

targets:
  my_plex:
    type: "plex"
    url: "http://plex:32400"
    token: "<your_token>"

  my_different_plex:
    type: "plex"
    url: "http://plex:32401"
    token: "<your_token>"
    rewrite:
      from: "/media"
      to: "/plex"

  my_jellyfin:
    type: "jellyfin"
    url: "http://jellyfin:8096"
    token: "<your_token>"

  my_command:
    type: "command"
    raw: "echo $FILE_PATH >> list.txt"

Manual

By default a manual endpoint is provided which can be used to manually trigger a scan. This can be useful for testing or for when you want to trigger a scan without waiting for a file to be ready.

$ curl -u 'admin:password' 'http://localhost:2875/triggers/manual?path=/path/to/file&hash=1234567890' 
# or
$ curl -H 'Authorization: Basic <base_64_encoded_login>' 'http://localhost:2875/triggers/manual?path=/path/to/file&hash=1234567890'

Configuration Template API

autopulse provides a configuration template API that allows external applications to dynamically generate configurations without embedding static TOML files. This is useful for applications like Bazarr that need to configure autopulse programmatically.

GET /api/config-template

Returns configuration templates with optional parameters:

# Get basic templates
$ curl -u "admin:password" "http://localhost:2875/api/config-template"

# Get templates with specific types
$ curl -u "admin:password" "http://localhost:2875/api/config-template?database=postgres&triggers=sonarr,radarr&targets=plex,jellyfin&output=json"

Query Parameters:

  • database: Database type (sqlite, postgres)
  • triggers: Comma-separated trigger types (manual, sonarr, radarr, etc)
  • targets: Comma-separated target types (plex, jellyfin, emby, etc)
  • output: Output format (json, toml)

UI

The autopulse ui is a simple web interface that allows you to view and add scan requests. It is available hosted on Cloudflare Pages at autopulseui.pages.dev or you can host it yourself using the provided docker image. Note that requests are made server-side so you do not need to expose your autopulse instance to the internet, only the UI when self-hosting.

Environment Variables

| Variable | Description | Example | | --- | --- | --- | | FORCE_DEFAULT_SERVER_URL | Forces the default server URL to be used | true | | DEFAULT_SERVER_URL | The default server URL to use | http://localhost:2875 | | FORCE_AUTH | Forces the UI to use auth from env | true | | FORCE_SERVER_URL | Forces the server url | true | | FORCE_USERNAME | Forces the username | true | | FORCE_PASSWORD | Forces the password | true | | ORIGIN | Required wh

Related Skills

View on GitHub
GitHub Stars462
CategoryDevelopment
Updated20h ago
Forks10

Languages

Rust

Security Score

100/100

Audited on Mar 22, 2026

No findings