Skip to content
프로젝트

소개

CLI to watch PIM collection changes

개발 도구

이 수치를 측정하는 방법

What you can do

  • Mail, contacts and calendars over IMAP, JMAP, Maildir, CalDAV, CardDAV, Microsoft Graph and the Google APIs
  • Push where offered: IMAP IDLE and the JMAP event stream, a poll everywhere else
  • Hooks: a command, a desktop notification or both on any change, the item given as variables
  • Alarms of events and tasks, birthdays and anniversaries of contacts, over CalDAV, CardDAV or pimdir

측정된 스타 증가

in 24h
0
in 7 days
+2
in 15 days
+4
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

🔔 Carillon Matrix Mastodon Sponsor

CLI to watch PIM collection changes

$ carillon watch
[personal] watching mailbox `INBOX` over maildir, polling
[personal] mailbox `INBOX`: message 1795248000.1.laptop added
Watch stopped by a signal

Table of contents

Features

  • Mail, contacts and calendars over IMAP, JMAP, Maildir, CalDAV, CardDAV, Microsoft Graph and the Google APIs
  • Push where offered: IMAP IDLE and the JMAP event stream, a poll everywhere else
  • Hooks: a command, a desktop notification or both on any change, the item given as variables
  • Alarms of events and tasks, birthdays and anniversaries of contacts, over CalDAV, CardDAV or pimdir
  • Multi-account: every account watched at once, each reconnecting on its own
  • Account check proving every backend connects and authenticates
  • JSON output of every event and result, described by carillon json-schema
  • TLS via Rustls (rustls-ring default, rustls-aws) or Native TLS (native-tls), client certificates included

Installation

Debian, Ubuntu

Carillon is not in the official repositories yet, but the signed APT repository of pkg.pimalaya.org ships the latest release with its man pages and shell completions. Add the repository once:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://pkg.pimalaya.org/pimalaya.asc | sudo tee /etc/apt/keyrings/pimalaya.asc >/dev/null
sudo tee /etc/apt/sources.list.d/pimalaya.sources >/dev/null <<EOF
Types: deb
URIs: https://pkg.pimalaya.org/apt
Suites: stable
Components: main
Signed-By: /etc/apt/keyrings/pimalaya.asc
EOF
sudo apt update

Then install Carillon:

sudo apt install carillon
Fedora, RHEL, Rocky Linux, AlmaLinux

Carillon is not in the official repositories yet, but the signed DNF repository of pkg.pimalaya.org ships the latest release with its man pages and shell completions:

sudo curl -fsSL -o /etc/yum.repos.d/pimalaya.repo https://pkg.pimalaya.org/pimalaya.repo
sudo dnf install carillon
Homebrew (macOS, Linux)

Carillon is not in homebrew-core yet, but the pimalaya/tap formula installs the latest release with its man pages and shell completions:

brew install pimalaya/tap/carillon
Pre-built binary

For other systems, Carillon can be installed with the installer:

As root:

curl -sSL https://raw.githubusercontent.com/pimalaya/carillon/master/install.sh | sudo sh

As a regular user:

curl -sSL https://raw.githubusercontent.com/pimalaya/carillon/master/install.sh | PREFIX=~/.local sh

These commands install the latest release, built with the default cargo features. For a build of master, check out the releases GitHub workflow and look for the Artifacts section.

Cargo
cargo install --locked carillon

For a build of master:

cargo install --locked --git https://github.com/pimalaya/carillon.git
Nix
nix profile install github:pimalaya/carillon
Sources

Requires Rust 1.89 or later:

git clone https://github.com/pimalaya/carillon
cd carillon
cargo build --release --locked

The binary lands at target/release/carillon.

Configuration

A TOML configuration is loaded from every existing path among the following, each one deep-merged on top of the ones before:

  • $XDG_CONFIG_HOME/carillon/config.toml
  • $HOME/.config/carillon/config.toml
  • $HOME/.carillonrc

Override the path with -c <PATH>, repeated to merge several files.

[!TIP] See config.sample.toml for a complete configuration of one example account with commented fields; rename the account and uncomment what you need, or start from a provider below.

An account declares the backend it watches, the collection it watches there and the hooks it fires, each named on-<subject>-<verb>. Carillon never issues nor refreshes an OAuth 2.0 token, so Google and Microsoft accounts read theirs from Ortie.

Google

Watch the inbox through the Gmail API, with a token from Ortie's Google account, or a calendar through gcal with the same token.

[accounts.google]

gmail.mailbox = "INBOX"
gmail.auth.token.command = ["ortie", "token", "show", "-a", "google"]
gmail.hooks.on-message-add.notify.summary = "New mail from $sender"
gmail.hooks.on-message-add.notify.body = "$subject"

Microsoft

Watch the inbox and the calendar through Microsoft Graph, with a token from Ortie's Graph account.

[accounts.microsoft]

msgraph.mailbox = "inbox"
msgraph.calendar = "Calendar"
msgraph.auth.token.command = ["ortie", "token", "show", "-a", "microsoft-graph"]
msgraph.hooks.on-message-add.notify.summary = "New mail from $sender"
msgraph.hooks.on-event-change.notify.summary = "Event changed in $calendar"

Fastmail

Watch the inbox over the JMAP event stream, with a token from Ortie or an API token.

[accounts.fastmail]

jmap.mailbox = "INBOX"
jmap.server = "https://api.fastmail.com/jmap/session"
jmap.auth.bearer.token.command = ["ortie", "token", "show", "-a", "fastmail"]
jmap.hooks.on-message-add.notify.summary = "New mail from $sender"
jmap.hooks.on-message-add.notify.body = "$subject"

Usage

Step 1: once your first account is configured, check that every backend connects and authenticates:

carillon account check

Step 2: watch every account, firing its hooks, until interrupted:

carillon watch

A watch covers every account and any other command the default one, unless -a names another, and the --help of each command details its flags, exit codes and JSON output. More use cases:

# Watch the work account only
carillon -a work watch

# Pick the backend of an account declaring several
carillon -b jmap watch

# Feed a status bar with every change
carillon watch --json | jq -r --unbuffered 'select(.event == "changed") | "\(.account): \(.change.kind)"'

# List the accounts and the backends each declares
carillon account list

Alternatives

  • goimapnotify: runs a command on IMAP IDLE events, IMAP only
  • inotifywait: watches a local Maildir for new files, Linux only

License

This project is licensed under either of:

Social

Sponsoring

nlnet

Special thanks to the NLnet foundation and the European Commission that have been financially supporting the project for years:

This program is part of Pimalaya, free software funded entirely by grants and donations. If you find it useful, consider sponsoring its development:

GitHub Ko-fi Buy Me a Coffee Liberapay thanks.dev PayPal

관련 프로젝트 살펴보기

불러오는 중…