> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relaycli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From zero to "Hello inbox" in under 5 minutes

## Manage your emails in your console

<Steps>
  <Step title="Grab your mailbox credentials">
    <Tabs>
      <Tab title="Gmail">
        * Head over to [App passwords](https://myaccount.google.com/apppasswords)
        * Enter an App name (e.g. "Relay")
        * Click on "Create" and save the password

        <Info>
          If you encounter any issue, make sure that App passwords are available for your account ([Gmail Help](https://support.google.com/mail/answer/185833)).
          As of July 2025, all you need is to turn [2-Step verification](https://support.google.com/accounts/answer/185839) on.
        </Info>
      </Tab>

      <Tab title="Outlook">
        Follow the steps in [How to get and use app passwords](https://support.microsoft.com/en-us/account-billing/how-to-get-and-use-app-passwords-5896ed9b-4263-e681-128a-a6f2979a7944)
      </Tab>

      <Tab title="Custom IMAP host">
        Copy your account password
      </Tab>
    </Tabs>
  </Step>

  <Step title="Install the CLI">
    <CodeGroup>
      ```shell title="pip" icon="python" theme={null}
      pip install relaycli
      ```

      ```shell title="uv" icon="zap" theme={null}
      uv pip install --system relaycli
      ```
    </CodeGroup>

    If you encounter issues, please follow the installation steps for either [pip](https://pip.pypa.io/en/stable/installation/) or [uv](https://docs.astral.sh/uv/getting-started/installation) and then run the corresponding installation command.
  </Step>

  <Step title="Connect the inbox">
    ```shell theme={null}
    relay accounts add
    ```
  </Step>

  <Step title="Try out CLI commands">
    <Tabs>
      <Tab title="Fetch recent emails">
        ```shell theme={null}
        relay messages ls --unread
        ```

        ```
        Using account: piedpiper
                                    Messages from richard@piedpiper.com
        ┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
        ┃ UID   ┃ Timestamp                ┃ From                          ┃ Subject    ┃ Snippet    ┃
        ┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
        │ 15443 │ 2025-06-23 12:35:44 UTC  │ gilfoyle@piedpiper.com        │ Server     │ The        │
        │       │                          │                               │ migration  │ migration  │
        │       │                          │                               │ complete   │ is done... │
        │ 15467 │ 2025-06-26 12:46:09 UTC  │ dinesh@piedpiper.com          │ RE: My     │ Actually   │
        │       │                          │                               │ code is    │ Gilfoyle,  │
        │       │                          │                               │ perfect    │ your cod...│
        └───────┴──────────────────────────┴───────────────────────────────┴────────────┴────────────┘
        Showing 2 of 2 unread messages
        ```
      </Tab>

      <Tab title="Search your inbox">
        ```shell theme={null}
        relay messages grep "Son of Anton"
        ```

        ```console wrap theme={null}
        Using account: piedpiper
        No messages found containing 'Son of Anton'
        ```
      </Tab>

      <Tab title="Read a specific message">
        ```shell theme={null}
        relay messages cat 15443
        ```

        ```console wrap expandable theme={null}
        Using account: piedpiper

        Message Details
        UID: 15443
        Timestamp: 2025-06-23 12:35:44 UTC
        Subject: Server migration complete
        From: "Bertram Gilfoyle" <gilfoyle@piedpiper.com>
        To: richard@piedpiper.com
        CC: dinesh@piedpiper.com, jared@piedpiper.com
        BCC: N/A

        Message Body:
        The migration is done. Obviously.

        While you were all probably panicking about downtime (which never happened),
        I successfully migrated our entire server infrastructure to the new data center.

        Key accomplishments:
        - Migrated 47 servers in 3.2 hours
        - Implemented redundant failsafes
        - Optimized database queries by 340%
        - Fixed 23 security vulnerabilities

        Richard, the system is now running at 99.97% efficiency. The remaining 0.03%
        is due to the laws of physics, which even I cannot override.

        Dinesh, I've documented everything in a way that even you might comprehend,
        though I make no guarantees.

        The servers are purring like a well-fed cat. You may now return to your
        regularly scheduled mediocrity.

        --
        Bertram Gilfoyle
        Senior Systems Architect
        Pied Piper Inc.

        No attachments
        ```

        ```shell theme={null}
        relay messages cat 15467
        ```

        ```console wrap expandable theme={null}
        Using account: piedpiper

        Message Details
        UID: 15467
        Timestamp: 2025-06-26 12:46:09 UTC
        Subject: RE: My code is perfect
        From: "Dinesh Chugtai" <dinesh@piedpiper.com>
        To: richard@piedpiper.com

        Message Body:
        Actually Gilfoyle, your code has a memory leak in the compression algorithm.
        I've already fixed it. You're welcome.

        No attachments
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Make something cool">
    Now it's your turn!
  </Step>
</Steps>
