# π
Calendula [](https://matrix.to/#/#pimalaya:matrix.org)
CLI to manage calendars
## Table of contents
- [Features](#features)
- [Usage](#usage)
- [List calendars](#list-calendars)
- [List calendar items](#list-calendar-items)
- [Edit calendar item](#edit-calendar-item)
- [Installation](#installation)
- [Configuration](#configuration)
- [Google](#google)
- [Apple](#apple)
- [Microsoft](#microsoft)
- [Posteo](#posteo)
- [FAQ](#faq)
- [Sponsoring](#sponsoring)
## Features
- **CalDAV** and **Vdir** support
- Native TLS support via [native-tls](https://crates.io/crates/native-tls) crate (requires `native-tls` feature)
- Rust TLS support via [rustls](https://crates.io/crates/rustls) crate with:
- AWS crypto support (requires `rustls-aws` feature)
- Ring crypto support (requires `rustls-ring` feature)
- Shell command and keyring **storages** (requires `command` and `keyring` features)
- **JSON** support with `--json`
*Calendula CLI is written in [Rust](https://www.rust-lang.org/), and relies on [cargo features](https://doc.rust-lang.org/cargo/reference/features.html) to enable or disable functionalities. Default features can be found in the `features` section of the [`Cargo.toml`](https://github.com/pimalaya/calendula/blob/master/Cargo.toml#L18), or on [docs.rs](https://docs.rs/crate/calendula/latest/features).*
## Usage
### List calendars
```
$ calendula calendars list
βββββββββββ¬ββββββββββββββββ¬βββββββ¬ββββββββ
β ID β NAME β DESC β COLOR β
βββββββββββͺββββββββββββββββͺβββββββͺββββββββ‘
β default β ClΓ©ment DOUIN β β β
βββββββββββ΄ββββββββββββββββ΄βββββββ΄ββββββββ
```
### List calendar items
```
$ calendula items list default
βββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
β ID β DESC β COMPONENTS β DATE β
βββββββββββββββββββββββββββββββββββββββββββͺβββββββββββββββββββββββͺββββββββββββββββββββββββββββββββββββββββββͺββββββββββββββββββββββββββββ‘
β 289e89c0-b351-4bc3-a7a4-4ababca26161 β Appeler Didier β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-12T18:20:36+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 005ca92b-211f-4c7e-8c18-0a3644ec8792 β Garage β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-07T13:54:57+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 9045759c-1752-45e2-a9ba-d0faa72d6750 β Charlie β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-07T13:54:57+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 5a90ec56-d5f6-4e03-b143-3c992e472e16 β Ball-trap β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-07T13:54:57+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 6df73dd4-aae7-437d-8438-6f052774d77a β Garage Dacia β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-02T09:22:05+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 9de2158d-15ca-447d-b7cd-5e3e432d140d β Garage β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-02T09:22:05+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 942db423-edcf-4ddb-a5e5-dac5b079ab3d β Garage Fiat β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-10-02T09:22:05+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 02405656-00a3-4242-a7c2-0e668d39ca8e β Sage femme β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-09-20T13:15:59+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββ€
β 236b94a6-ee38-4b3e-a434-a4fd24d9c987 β Internet β VCALENDAR, VEVENT, VALARM, VTIMEZONE, β 2025-09-20T13:11:56+00:00 β
β β β STANDARD, DAYLIGHT β β
βββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ
```
### Edit calendar item
```
$ calendula item update default 62196d36-65cb-4a6b-b107-f3d8dc8d8b62
```
You text editor opens with the content of your iCalendar:
```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
DTSTART:19970714T170000Z
DTEND:19970715T035900Z
SUMMARY:FΓͺte Γ la Bastille
END:VEVENT
END:VCALENDAR
```
Once edition done, you should see the following message:
```
Item successfully updated
```
## Installation
### Pre-built binary
Calendula CLI can be installed with the installer:
*As root:*
```
curl -sSL https://raw.githubusercontent.com/pimalaya/calendula/master/install.sh | sudo sh
```
*As a regular user:*
```
curl -sSL https://raw.githubusercontent.com/pimalaya/calendula/master/install.sh | PREFIX=~/.local sh
```
These commands install the latest binary from the GitHub [releases](https://github.com/pimalaya/calendula/releases) section.
If you want a more up-to-date version than the latest release, check out the [releases](https://github.com/pimalaya/calendula/actions/workflows/releases.yml) GitHub workflow and look for the *Artifacts* section. You should find a pre-built binary matching your OS. These pre-built binaries are built from the `master` branch, using default features.
### Cargo
Calendula CLI can be installed with [cargo](https://doc.rust-lang.org/cargo/):
```
cargo install calendula
```
*With only Vdir support:*
```
cargo install calendula --no-default-features --features vdir
```
You can also use the git repository for a more up-to-date (but less stable) version:
```
cargo install --locked --git https://github.com/pimalaya/calendula.git
```
### Nix
Calendula CLI can be installed with [Nix](https://serokell.io/blog/what-is-nix):
```
nix-env -i calendula
```
You can also use the git repository for a more up-to-date (but less stable) version:
```
nix-env -if https://github.com/pimalaya/calendula/archive/master.tar.gz
```
*Or, from within the source tree checkout:*
```
nix-env -if .
```
If you have the [Flakes](https://nixos.wiki/wiki/Flakes) feature enabled:
```
nix profile install calendula
```
*Or, from within the source tree checkout:*
```
nix profile install
```
*You can also run Calendula directly without installing it:*
```
nix run calendula
```
## Configuration
The wizard is not yet available (it should come soon, see [#7](https://github.com/pimalaya/calendula/issues/7)), so the only way to configure Calendula CLI is to copy the [sample config file](https://github.com/pimalaya/calendula/blob/master/config.sample.toml), to store it either at `~/.config/calendula.toml` or `~/.calendularc` then to customize it by commenting or uncommenting the options you need.
### Google
Google Calendar requires OAuth 2.0. The first step is to configure an OAuth 2.0 token manager like [Ortie](https://github.com/pimalaya/ortie#google), with the calendar scope `https://www.googleapis.com/auth/calendar`:
```toml
caldav.auth.bearer.command = ["ortie", "token", "show"]
```
Google Calendar does not propose discovery service, nor server URI. You need to directly use the following home URI:
```toml
caldav.home-uri = "https://apidata.googleusercontent.com/caldav/v2/your.email@gmail.com"
```
### Apple
Apple Calendars does not propose discovery service. The only way is to use their server URI combined with basic authentication:
```toml
caldav.server-uri = "https://calendars.icloud.com"
caldav.auth.basic.username = "your.email@icloud.com"
caldav.auth.basic.password.raw = "your.password"
```
If you check attentively the `--trace` logs, you should see the home URI. It is not recommended to use it directly, but it can make the CLI definitely faster. It should look like this:
```toml
caldav.home-uri = "https://p156-caldav.icloud.com:443/17170244959/calendars/"
```
### Microsoft
Microsoft only proposes a proprietary, non-standard API.
### Posteo
Posteo proposes a discovery service, combined with basic authentication:
```toml
caldav.discover.host = "posteo.de"
caldav.auth.basic.username = "your.email"
caldav.auth.basic.password.raw = "your.password"
```
Discovery is the recommended way to go, but it is slow. If you want faster calls you can "hardcode" the server URI and/or the home URI, at your own risk:
```toml
caldav.server-uri = "https://posteo.de:8843"
caldav.home-uri = "https://posteo.de:8843/calendars/your.email/"
```
## FAQ
## Sponsoring
[](https://nlnet.nl/)
Special thanks to the [NLnet foundation](https://nlnet.nl/) and the [European Commission](https://www.ngi.eu/) that helped the project to receive financial support from various programs:
- [NGI Assure](https://nlnet.nl/project/Himalaya/) in 2022
- [NGI Zero Entrust](https://nlnet.nl/project/Pimalaya/) in 2023
- [NGI Zero Core](https://nlnet.nl/project/Pimalaya-PIM/) in 2024 *(still ongoing)*
If you appreciate the project, feel free to donate using one of the following providers:
[](https://github.com/sponsors/soywod)
[](https://ko-fi.com/soywod)
[](https://www.buymeacoffee.com/soywod)
[](https://liberapay.com/soywod)
[](https://thanks.dev/soywod)
[](https://www.paypal.com/paypalme/soywod)