Skip to main content

Prerequisites

1

Python 3.9 or higher

Morning Brain Starter requires Python 3.9+. Check your Python version:
python3 --version
On macOS and Linux, the command is typically python3. On Windows, it’s usually python. If the command isn’t found, download Python from the official website.
On Windows, make sure to check “Add Python to PATH” during installation.
2

Google account

You’ll need a Google account for Calendar access. This is the only required integration—Asana and Gmail are optional.
3

Optional: Asana account

If you want task management features, you’ll need an Asana account and a Personal Access Token.
4

Optional: Gmail

Email sync uses the same Google OAuth as Calendar, so no additional setup is required beyond granting Gmail permissions during OAuth.

Get your copy of the project

You have two options for getting the code:

Install dependencies

1

Create a virtual environment

A virtual environment keeps this project’s dependencies isolated from your system Python.
python3 -m venv .venv
This creates a .venv directory in your project root.
2

Activate the virtual environment

source .venv/bin/activate
Your terminal prompt will change to show (.venv) when the environment is active.
3

Install required packages

Install all dependencies from requirements.txt:
pip install -r requirements.txt
This installs:
  • google-api-python-client - Google Calendar and Gmail APIs
  • google-auth-oauthlib - OAuth authentication
  • google-auth-httplib2 - HTTP library for Google APIs
  • asana - Asana API client (optional integration)
  • python-dotenv - Environment variable management
  • PyYAML - YAML configuration file support

Directory structure

After installation, your project structure looks like this:
morning-brain-starter/
├── .venv/                  # Virtual environment (created by you)
├── config/
│   ├── clients.yaml        # Client name mappings for logs
│   ├── calendar.yaml       # Calendar names to check
│   ├── email.yaml          # Email sync configuration
│   └── asana_order.yaml    # Task ordering by day of week
├── context/
│   └── clients/            # Per-client log files (created at runtime)
├── resources/
│   └── secrets/            # Your credentials (not in version control)
│       └── .env            # Environment variables
├── scripts/
│   ├── setup_oauth.py      # OAuth setup script
│   ├── calendar_lite.py    # Calendar operations
│   ├── asana_lite.py       # Asana operations
│   └── email_lite.py       # Email operations
├── run_morning.py          # Main morning routine script
├── requirements.txt        # Python dependencies
└── .env.example            # Template for your .env file
The resources/secrets/ directory is excluded from version control (.gitignore). Your credentials stay private.

Next steps

Quickstart

Set up your credentials and run your first morning routine

Build docs developers (and LLMs) love