Skip to content

Getting Started

Mufeez Amjad edited this page Jan 9, 2023 · 11 revisions

Installation

avail can be installed by either:

Pre-built binary

To install a pre-built binary, you can use the install.sh script to install the binary from the latest release that is supported by your architecture and platform. The binary is installed to $HOME/.local/bin.

curl -fsSL https://raw.githubusercontent.com/mufeez-amjad/avail/master/install.sh | sh -

Alternatively, you may install the binary manually:

  1. Download the binary for your architecture and platform in the latest release.
  2. Untar/unzip to your desired folder.
  3. Ensuring that the folder is in your $PATH environment variable.

From source

To build from source, you need to have Rust installed.

To install Rust:

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Restart your terminal

# Test the installation
rustc --version

To build and install:

git clone https://github.com/mufeez-amjad/avail
cargo install --force --path ./avail

Setting up OAuth

avail needs to retrieve event data from your calendar(s) to determine availability. To do this, you need to specify your OAuth credentials in avail's config file.

Google Calendar (< 2 minutes to setup)

Sign in to Google with the account you wish to use with avail and navigate to https://console.cloud.google.com.

Here is a walkthrough you can follow to get set up:



Notes:

  • Required scope is https://www.googleapis.com/auth/calendar
  • If you wish to connect more Google accounts to avail, you can add them as test users.

avail config

Create/update the file at $HOME/.avail/conf.toml to have your credentials retrieved at the end of the walkthrough above:

[google]
client_id = '<client_id>'
client_secret = '<client_secret>'

Microsoft Outlook (< 1 minute to setup)

Navigate to https://portal.azure.com/#home and sign in with the account you want to use with avail.

Here is a walkthrough you can follow to get set up:



Notes:

  • The redirect URL is http://localhost:3003/redirect

avail config

Create/update the file at $HOME/.avail/conf.toml to have your credentials retrieved at the end of the walkthrough above:

[microsoft]
client_id = '<client_id>'
client_secret = '<client_secret>'